Use qtpaths directly
[kdepim.git] / grantleeeditor / headerthemeeditor / themeeditormainwindow.h
blob25a49b17cc4fe32dbef1016a8283fe9d3e454b43
1 /*
2 Copyright (c) 2013-2015 Montel Laurent <montel@kde.org>
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License, version 2, as
6 published by the Free Software Foundation.
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
13 You should have received a copy of the GNU General Public License along
14 with this program; if not, write to the Free Software Foundation, Inc.,
15 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 #ifndef THEMEEDITORMAINWINDOW_H
19 #define THEMEEDITORMAINWINDOW_H
21 #include <KXmlGuiWindow>
23 class ThemeEditorPage;
24 class QAction;
25 class KToggleAction;
26 class KRecentFilesAction;
27 class QUrl;
29 class ThemeEditorMainWindow : public KXmlGuiWindow
31 Q_OBJECT
32 public:
33 explicit ThemeEditorMainWindow();
34 ~ThemeEditorMainWindow();
36 protected:
37 void closeEvent(QCloseEvent *) Q_DECL_OVERRIDE;
39 private Q_SLOTS:
40 void slotNewTheme();
41 void slotCloseTheme();
42 void slotAddExtraPage();
43 void slotOpenTheme();
44 void slotUploadTheme();
45 void slotQuitApp();
46 bool slotSaveTheme();
47 void slotConfigure();
48 void slotInstallTheme();
49 void slotInsertFile();
50 void slotPrintingMode();
51 void slotNormalMode();
52 void slotManageTheme();
53 void slotUpdateView();
54 void slotCanInsertFile(bool b);
55 void slotThemeSelected(const QUrl &);
56 void slotSaveAsTheme();
58 private:
59 enum ActionSaveTheme {
60 SaveOnly = 0,
61 SaveAndCloseTheme,
62 SaveAndCreateNewTheme
65 bool loadTheme(const QString &directory);
66 void readConfig();
67 void updateActions();
68 bool saveCurrentProject(ActionSaveTheme act);
69 void setupActions();
70 void closeThemeEditor();
71 ThemeEditorPage *mThemeEditor;
72 QAction *mNewThemeAction;
73 QAction *mCloseThemeAction;
74 QAction *mAddExtraPage;
75 QAction *mCloseAction;
76 QAction *mOpenAction;
77 QAction *mUploadTheme;
78 QAction *mSaveAction;
79 QAction *mInstallTheme;
80 QAction *mInsertFile;
81 QAction *mManageTheme;
82 QAction *mUpdateView;
83 QAction *mSaveAsAction;
84 KToggleAction *mPrintingMode;
85 KToggleAction *mNormalMode;
86 KRecentFilesAction *mRecentFileAction;
89 #endif // THEMEEDITORMAINWINDOW_H