2 Copyright (c) 2013, 2014 Montel Laurent <montel@kde.org>
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 #ifndef SIEVEEDITORMAINWIDGET_H
22 #define SIEVEEDITORMAINWIDGET_H
26 #include "ksieveui/editor/sieveeditorwidget.h"
28 class SieveEditorTabWidget
;
29 class SieveEditorScriptManagerWidget
;
30 class SieveEditorPageWidget
;
31 class SieveEditorMainWidget
: public QSplitter
35 explicit SieveEditorMainWidget(QWidget
*parent
=0);
36 ~SieveEditorMainWidget();
38 void createNewScript();
40 void updateServerList();
42 void desactivateScript();
45 bool needToSaveScript();
47 KTabWidget
*tabWidget() const;
49 KSieveUi::SieveEditorWidget::EditorMode
pageMode() const;
54 void updateButtons(bool newScriptAction
, bool editScriptAction
, bool deleteScriptAction
, bool desactivateScriptAction
);
55 void updateScriptList();
56 void modeEditorChanged(KSieveUi::SieveEditorWidget::EditorMode
);
59 void slotCreateScriptPage(const KUrl
&url
, const QStringList
&capabilities
, bool isNewScript
);
60 void slotScriptDeleted(const KUrl
&url
);
61 void slotScriptModified(bool modified
, SieveEditorPageWidget
*page
);
62 void slotGeneralPaletteChanged();
63 void slotTabCloseRequested(int index
);
64 void slotTabRemoveAllExclude(int index
);
66 QWidget
*hasExistingPage(const KUrl
&url
);
67 QColor mModifiedScriptColor
;
69 SieveEditorTabWidget
*mTabWidget
;
70 SieveEditorScriptManagerWidget
*mScriptManagerWidget
;
74 #endif // SIEVEEDITORMAINWIDGET_H