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
776e365d
Commit
776e365d
authored
Feb 07, 2022
by
Laurent Montel
Browse files
Add info about argument
parent
92a4ecbc
Pipeline
#134291
failed with stage
in 13 minutes and 49 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
plugins/messageviewerconfigureplugins/openurlwith/openurlwithconfigurecreatewidget.cpp
View file @
776e365d
...
...
@@ -9,6 +9,7 @@
#include
<QFormLayout>
#include
<QLabel>
#include
<QLineEdit>
#include
<QWhatsThis>
OpenUrlWithConfigureCreateWidget
::
OpenUrlWithConfigureCreateWidget
(
QWidget
*
parent
)
:
QWidget
{
parent
}
,
mServerName
(
new
QLineEdit
(
this
))
...
...
@@ -22,6 +23,20 @@ OpenUrlWithConfigureCreateWidget::OpenUrlWithConfigureCreateWidget(QWidget *pare
mServerName
->
setObjectName
(
QStringLiteral
(
"mServerName"
));
mainLayout
->
addRow
(
i18n
(
"Server Name:"
),
mServerName
);
auto
formatHelp
=
new
QLabel
(
i18n
(
"<qt><a href=
\"
whatsthis1
\"
>Argument format information...</a></qt>"
),
this
);
formatHelp
->
setObjectName
(
QStringLiteral
(
"formatHelp"
));
formatHelp
->
setContextMenuPolicy
(
Qt
::
NoContextMenu
);
connect
(
formatHelp
,
&
QLabel
::
linkActivated
,
this
,
&
OpenUrlWithConfigureCreateWidget
::
slotLinkClicked
);
mCommandWhatsThis
=
i18n
(
"<qt><p><strong>These expressions may be used for the arguments:"
"</strong></p>"
"<ul>"
"<li>%u - url used by command</li>"
"</ul>"
"</strong></p></qt>"
);
formatHelp
->
setWhatsThis
(
mCommandWhatsThis
);
mCommand
->
setObjectName
(
QStringLiteral
(
"mCommand"
));
mainLayout
->
addRow
(
i18n
(
"Command:"
),
mCommand
);
}
...
...
@@ -30,6 +45,13 @@ OpenUrlWithConfigureCreateWidget::~OpenUrlWithConfigureCreateWidget()
{
}
void
OpenUrlWithConfigureCreateWidget
::
slotLinkClicked
(
const
QString
&
link
)
{
if
(
link
==
QLatin1String
(
"whatsthis1"
))
{
QWhatsThis
::
showText
(
QCursor
::
pos
(),
mCommandWhatsThis
);
}
}
OpenUrlWithConfigureCreateWidget
::
OpenUrlWithInfo
OpenUrlWithConfigureCreateWidget
::
info
()
const
{
OpenUrlWithConfigureCreateWidget
::
OpenUrlWithInfo
info
;
...
...
plugins/messageviewerconfigureplugins/openurlwith/openurlwithconfigurecreatewidget.h
View file @
776e365d
...
...
@@ -24,6 +24,8 @@ public:
Q_REQUIRED_RESULT
OpenUrlWithInfo
info
()
const
;
void
setInfo
(
const
OpenUrlWithInfo
&
i
);
private:
void
slotLinkClicked
(
const
QString
&
link
);
QString
mCommandWhatsThis
;
QLineEdit
*
const
mServerName
;
QLineEdit
*
const
mCommand
;
};
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