Fix Bug 362152 - Font selection is not honored
[kdepim.git] / sieveeditor / sieveeditormainwindow.h
blobc145bfd2713b58f4a7348c31d3e2910179d7a43b
1 /*
2 Copyright (c) 2013-2016 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
17 02110-1301, USA.
21 #ifndef SIEVEEDITORMAINWINDOW_H
22 #define SIEVEEDITORMAINWINDOW_H
24 #include <KXmlGuiWindow>
26 class QAction;
27 class SieveEditorCentralWidget;
28 class QLabel;
29 class QNetworkConfigurationManager;
30 class SieveEditorBookmarks;
31 class KActionMenu;
32 namespace PimCommon
34 class KActionMenuChangeCase;
37 class SieveEditorMainWindow : public KXmlGuiWindow
39 Q_OBJECT
40 public:
41 explicit SieveEditorMainWindow();
42 ~SieveEditorMainWindow();
44 QString currentHelpTitle() const;
45 QUrl currentHelpUrl() const;
47 protected:
48 void closeEvent(QCloseEvent *e) Q_DECL_OVERRIDE;
50 private Q_SLOTS:
51 void slotConfigure();
52 void slotAddServerSieve();
53 void slotCreateNewScript();
54 void slotDeleteScript();
55 void slotUpdateButtons(bool newScriptAction, bool editScriptAction, bool deleteScriptAction, bool desactivateScriptAction);
56 void slotEditScript();
57 void slotDesactivateScript();
58 void slotRefreshList();
59 void slotUploadScript();
60 void slotUpdateActions();
61 void slotSystemNetworkOnlineStateChanged(bool state);
62 void slotUndoAvailable(bool);
63 void slotRedoAvailable(bool);
64 void slotCopyAvailable(bool b);
65 void slotOpenBookmarkUrl(const QUrl &url);
66 private:
67 void initStatusBar();
68 void readConfig();
69 void setupActions();
70 SieveEditorCentralWidget *mMainWidget;
71 QAction *mDeleteScript;
72 QAction *mNewScript;
73 QAction *mEditScript;
74 QAction *mDesactivateScript;
75 QAction *mRefreshList;
76 QAction *mUploadScript;
77 QAction *mGoToLine;
78 QAction *mFindAction;
79 QAction *mReplaceAction;
80 QAction *mUndoAction;
81 QAction *mRedoAction;
82 QAction *mCopyAction;
83 QAction *mPasteAction;
84 QAction *mCutAction;
85 QAction *mSelectAllAction;
86 QAction *mSaveAsAction;
87 QAction *mImportAction;
88 QAction *mShareAction;
89 QAction *mSpellCheckAction;
90 QAction *mCheckSyntaxAction;
91 QAction *mAutoGenerateScriptAction;
92 QAction *mCommentAction;
93 QAction *mUncommentAction;
94 QAction *mZoomInAction;
95 QAction *mZoomOutAction;
96 QAction *mZoomResetAction;
97 QAction *mDebugSieveScriptAction;
98 QAction *mWrapTextAction;
99 PimCommon::KActionMenuChangeCase *mMenuChangeCaseAction;
101 QLabel *mStatusBarInfo;
102 QNetworkConfigurationManager *mNetworkConfigurationManager;
103 SieveEditorBookmarks *mSieveEditorBookmarks;
104 KActionMenu *mBookmarkMenu;
105 bool mNetworkIsDown;
108 #endif // SIEVEEDITORMAINWINDOW_H