Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
PIM Sieve Editor
Commits
d0603268
Commit
d0603268
authored
Mar 09, 2015
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add code for comment/uncomment
parent
69a33524
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
0 deletions
+36
-0
sieveeditormainwidget.cpp
sieveeditormainwidget.cpp
+22
-0
sieveeditormainwidget.h
sieveeditormainwidget.h
+2
-0
sieveeditorpagewidget.cpp
sieveeditorpagewidget.cpp
+10
-0
sieveeditorpagewidget.h
sieveeditorpagewidget.h
+2
-0
No files found.
sieveeditormainwidget.cpp
View file @
d0603268
...
...
@@ -337,6 +337,28 @@ void SieveEditorMainWidget::slotCheckSyntax()
}
}
void
SieveEditorMainWidget
::
slotComment
()
{
QWidget
*
w
=
mTabWidget
->
currentWidget
();
if
(
w
)
{
SieveEditorPageWidget
*
page
=
qobject_cast
<
SieveEditorPageWidget
*>
(
w
);
if
(
page
)
{
page
->
comment
();
}
}
}
void
SieveEditorMainWidget
::
slotUncomment
()
{
QWidget
*
w
=
mTabWidget
->
currentWidget
();
if
(
w
)
{
SieveEditorPageWidget
*
page
=
qobject_cast
<
SieveEditorPageWidget
*>
(
w
);
if
(
page
)
{
page
->
uncomment
();
}
}
}
void
SieveEditorMainWidget
::
slotImport
()
{
...
...
sieveeditormainwidget.h
View file @
d0603268
...
...
@@ -65,6 +65,8 @@ public Q_SLOTS:
void
slotImport
();
void
slotAutoGenerateScript
();
void
slotCheckSyntax
();
void
slotComment
();
void
slotUncomment
();
Q_SIGNALS:
void
updateButtons
(
bool
newScriptAction
,
bool
editScriptAction
,
bool
deleteScriptAction
,
bool
desactivateScriptAction
);
...
...
sieveeditorpagewidget.cpp
View file @
d0603268
...
...
@@ -216,6 +216,16 @@ void SieveEditorPageWidget::import()
mSieveEditorWidget
->
slotImport
();
}
void
SieveEditorPageWidget
::
comment
()
{
mSieveEditorWidget
->
comment
();
}
void
SieveEditorPageWidget
::
uncomment
()
{
mSieveEditorWidget
->
uncomment
();
}
void
SieveEditorPageWidget
::
checkSpelling
()
{
mSieveEditorWidget
->
checkSpelling
();
...
...
sieveeditorpagewidget.h
View file @
d0603268
...
...
@@ -65,6 +65,8 @@ public:
void
import
();
void
autoGenerateScript
();
void
checkSyntax
();
void
comment
();
void
uncomment
();
Q_SIGNALS:
void
refreshList
();
void
scriptModified
(
bool
,
SieveEditorPageWidget
*
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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