Commit 3cc75197 authored by Laurent Montel's avatar Laurent Montel 😁

Allow to call import/upload

parent ca5738dd
...@@ -304,6 +304,28 @@ void SieveEditorMainWidget::slotReplace() ...@@ -304,6 +304,28 @@ void SieveEditorMainWidget::slotReplace()
} }
} }
void SieveEditorMainWidget::slotShare()
{
QWidget *w = mTabWidget->currentWidget();
if (w) {
SieveEditorPageWidget *page = qobject_cast<SieveEditorPageWidget *>(w);
if (page) {
page->share();
}
}
}
void SieveEditorMainWidget::slotImport()
{
QWidget *w = mTabWidget->currentWidget();
if (w) {
SieveEditorPageWidget *page = qobject_cast<SieveEditorPageWidget *>(w);
if (page) {
page->import();
}
}
}
void SieveEditorMainWidget::slotCheckSpelling() void SieveEditorMainWidget::slotCheckSpelling()
{ {
QWidget *w = mTabWidget->currentWidget(); QWidget *w = mTabWidget->currentWidget();
......
...@@ -61,6 +61,8 @@ public Q_SLOTS: ...@@ -61,6 +61,8 @@ public Q_SLOTS:
void slotCut(); void slotCut();
void slotSaveAs(); void slotSaveAs();
void slotCheckSpelling(); void slotCheckSpelling();
void slotShare();
void slotImport();
Q_SIGNALS: Q_SIGNALS:
void updateButtons(bool newScriptAction, bool editScriptAction, bool deleteScriptAction, bool desactivateScriptAction); void updateButtons(bool newScriptAction, bool editScriptAction, bool deleteScriptAction, bool desactivateScriptAction);
......
...@@ -206,6 +206,16 @@ void SieveEditorPageWidget::replace() ...@@ -206,6 +206,16 @@ void SieveEditorPageWidget::replace()
mSieveEditorWidget->replace(); mSieveEditorWidget->replace();
} }
void SieveEditorPageWidget::share()
{
mSieveEditorWidget->slotUploadScripts();
}
void SieveEditorPageWidget::import()
{
mSieveEditorWidget->slotImport();
}
void SieveEditorPageWidget::checkSpelling() void SieveEditorPageWidget::checkSpelling()
{ {
mSieveEditorWidget->checkSpelling(); mSieveEditorWidget->checkSpelling();
......
...@@ -61,6 +61,8 @@ public: ...@@ -61,6 +61,8 @@ public:
void selectAll(); void selectAll();
void saveAs(); void saveAs();
void checkSpelling(); void checkSpelling();
void share();
void import();
Q_SIGNALS: Q_SIGNALS:
void refreshList(); void refreshList();
void scriptModified(bool, SieveEditorPageWidget *); 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