Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KDE PIM Add-ons
Commits
a30c0a19
Commit
a30c0a19
authored
Mar 10, 2022
by
Laurent Montel
Browse files
const'ify pointer
parent
2f7762a1
Pipeline
#147921
passed with stage
in 18 minutes and 39 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
kmail/editorconvertertextplugins/markdown/markdownlib/markdowncreateimagewidget.cpp
View file @
a30c0a19
...
...
@@ -13,21 +13,26 @@
#include
<QSpinBox>
MarkdownCreateImageWidget
::
MarkdownCreateImageWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
)
,
mTitle
(
new
QLineEdit
(
this
))
,
mImageUrl
(
new
QLineEdit
(
this
))
,
mAlternateText
(
new
QLineEdit
(
this
))
,
mKeepOriginalSize
(
new
QCheckBox
(
i18n
(
"Keep original size"
),
this
))
,
mLabWidth
(
new
QLabel
(
i18n
(
"Width:"
),
this
))
,
mWidth
(
new
QSpinBox
(
this
))
,
mLabHeight
(
new
QLabel
(
i18n
(
"Height:"
),
this
))
,
mHeight
(
new
QSpinBox
(
this
))
{
auto
mainLayout
=
new
QFormLayout
(
this
);
mainLayout
->
setObjectName
(
QStringLiteral
(
"mainlayout"
));
mainLayout
->
setContentsMargins
({});
mTitle
=
new
QLineEdit
(
this
);
mTitle
->
setObjectName
(
QStringLiteral
(
"title"
));
mTitle
->
setClearButtonEnabled
(
true
);
connect
(
mTitle
,
&
QLineEdit
::
textChanged
,
this
,
&
MarkdownCreateImageWidget
::
slotEnableButton
);
mImageUrl
=
new
QLineEdit
(
this
);
mImageUrl
->
setObjectName
(
QStringLiteral
(
"image"
));
mImageUrl
->
setClearButtonEnabled
(
true
);
connect
(
mImageUrl
,
&
QLineEdit
::
textChanged
,
this
,
&
MarkdownCreateImageWidget
::
slotEnableButton
);
mAlternateText
=
new
QLineEdit
(
this
);
mAlternateText
->
setObjectName
(
QStringLiteral
(
"alternatetext"
));
mAlternateText
->
setClearButtonEnabled
(
true
);
...
...
@@ -35,7 +40,6 @@ MarkdownCreateImageWidget::MarkdownCreateImageWidget(QWidget *parent)
mainLayout
->
addRow
(
i18n
(
"Image Link:"
),
mImageUrl
);
mainLayout
->
addRow
(
i18n
(
"Alternate text:"
),
mAlternateText
);
mKeepOriginalSize
=
new
QCheckBox
(
i18n
(
"Keep original size"
),
this
);
mKeepOriginalSize
->
setObjectName
(
QStringLiteral
(
"keeporiginalsize"
));
mKeepOriginalSize
->
setChecked
(
true
);
mainLayout
->
addRow
(
mKeepOriginalSize
);
...
...
@@ -48,10 +52,8 @@ MarkdownCreateImageWidget::MarkdownCreateImageWidget(QWidget *parent)
sizeWidgetLayout
->
setContentsMargins
({});
mainLayout
->
addRow
(
sizeWidget
);
mLabWidth
=
new
QLabel
(
i18n
(
"Width:"
),
this
);
mLabWidth
->
setObjectName
(
QStringLiteral
(
"labwidth"
));
mLabWidth
->
setEnabled
(
false
);
mWidth
=
new
QSpinBox
(
this
);
mWidth
->
setObjectName
(
QStringLiteral
(
"mwidth"
));
mWidth
->
setMinimum
(
1
);
mWidth
->
setMaximum
(
999
);
...
...
@@ -61,10 +63,8 @@ MarkdownCreateImageWidget::MarkdownCreateImageWidget(QWidget *parent)
sizeWidgetLayout
->
addWidget
(
mLabWidth
);
sizeWidgetLayout
->
addWidget
(
mWidth
);
mLabHeight
=
new
QLabel
(
i18n
(
"Height:"
),
this
);
mLabHeight
->
setObjectName
(
QStringLiteral
(
"labheight"
));
mLabHeight
->
setEnabled
(
false
);
mHeight
=
new
QSpinBox
(
this
);
mHeight
->
setObjectName
(
QStringLiteral
(
"mheight"
));
mHeight
->
setMinimum
(
1
);
mHeight
->
setMaximum
(
999
);
...
...
kmail/editorconvertertextplugins/markdown/markdownlib/markdowncreateimagewidget.h
View file @
a30c0a19
...
...
@@ -26,13 +26,13 @@ Q_SIGNALS:
private:
void
slotKeepOriginalSizeChanged
();
void
slotEnableButton
();
QLineEdit
*
mTitle
=
nullptr
;
QLineEdit
*
mImageUrl
=
nullptr
;
QLineEdit
*
mAlternateText
=
nullptr
;
QCheckBox
*
mKeepOriginalSize
=
nullptr
;
QLabel
*
mLabWidth
=
nullptr
;
QSpinBox
*
mWidth
=
nullptr
;
QLabel
*
mLabHeight
=
nullptr
;
QSpinBox
*
mHeight
=
nullptr
;
QLineEdit
*
const
mTitle
;
QLineEdit
*
const
mImageUrl
;
QLineEdit
*
const
mAlternateText
;
QCheckBox
*
const
mKeepOriginalSize
;
QLabel
*
const
mLabWidth
;
QSpinBox
*
const
mWidth
;
QLabel
*
const
mLabHeight
;
QSpinBox
*
const
mHeight
;
};
kmail/editorconvertertextplugins/markdown/markdownlib/markdowncreatelinkdialog.cpp
View file @
a30c0a19
...
...
@@ -15,12 +15,12 @@
MarkdownCreateLinkDialog
::
MarkdownCreateLinkDialog
(
QWidget
*
parent
)
:
QDialog
(
parent
)
,
mMarkdownCreateLinkWidget
(
new
MarkdownCreateLinkWidget
(
this
))
{
setWindowTitle
(
i18nc
(
"@title:window"
,
"Add Link"
));
auto
mainLayout
=
new
QVBoxLayout
(
this
);
mainLayout
->
setObjectName
(
QStringLiteral
(
"mainlayout"
));
mMarkdownCreateLinkWidget
=
new
MarkdownCreateLinkWidget
(
this
);
mMarkdownCreateLinkWidget
->
setObjectName
(
QStringLiteral
(
"markdowncreatelinkwidget"
));
mainLayout
->
addWidget
(
mMarkdownCreateLinkWidget
);
...
...
kmail/editorconvertertextplugins/markdown/markdownlib/markdowncreatelinkdialog.h
View file @
a30c0a19
...
...
@@ -22,7 +22,7 @@ private:
void
writeConfig
();
void
readConfig
();
void
slotEnabledOkButton
(
bool
enabled
);
MarkdownCreateLinkWidget
*
mMarkdownCreateLinkWidget
=
nullptr
;
MarkdownCreateLinkWidget
*
const
mMarkdownCreateLinkWidget
;
QPushButton
*
mOkButton
=
nullptr
;
};
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment