Commit d0603268 authored by Laurent Montel's avatar Laurent Montel 😁

Add code for comment/uncomment

parent 69a33524
......@@ -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()
{
......
......@@ -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);
......
......@@ -216,6 +216,16 @@ void SieveEditorPageWidget::import()
mSieveEditorWidget->slotImport();
}
void SieveEditorPageWidget::comment()
{
mSieveEditorWidget->comment();
}
void SieveEditorPageWidget::uncomment()
{
mSieveEditorWidget->uncomment();
}
void SieveEditorPageWidget::checkSpelling()
{
mSieveEditorWidget->checkSpelling();
......
......@@ -65,6 +65,8 @@ public:
void import();
void autoGenerateScript();
void checkSyntax();
void comment();
void uncomment();
Q_SIGNALS:
void refreshList();
void scriptModified(bool, SieveEditorPageWidget *);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment