Remove unused includes
[kdepim.git] / grantleeeditor / contactthemeeditor / contacteditormainwindow.h
blobba61c0040702520f8a1173b02e0d0a227e9f3e6c
1 /*
2 Copyright (C) 2013-2016 Montel Laurent <montel@kde.org>
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; see the file COPYING. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
19 #ifndef CONTACTEDITORMAINWINDOW_H
20 #define CONTACTEDITORMAINWINDOW_H
22 #include <KXmlGuiWindow>
24 class ContactEditorPage;
25 class QAction;
26 class KRecentFilesAction;
27 class QUrl;
29 class ContactEditorMainWindow : public KXmlGuiWindow
31 Q_OBJECT
32 public:
33 explicit ContactEditorMainWindow();
34 ~ContactEditorMainWindow();
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 slotInstallTheme();
48 void slotInsertFile();
49 void slotManageTheme();
50 void slotUpdateView();
51 void slotConfigure();
52 void slotCanInsertFile(bool b);
53 void slotThemeSelected(const QUrl &);
54 void slotSaveAsTheme();
56 private:
57 enum ActionSaveTheme {
58 SaveOnly = 0,
59 SaveAndCloseTheme,
60 SaveAndCreateNewTheme
63 bool loadTheme(const QString &directory);
64 void readConfig();
65 void updateActions();
66 bool saveCurrentProject(ActionSaveTheme act);
67 void setupActions();
68 void closeThemeEditor();
69 ContactEditorPage *mContactEditor;
70 QAction *mNewThemeAction;
71 QAction *mCloseThemeAction;
72 QAction *mAddExtraPage;
73 QAction *mCloseAction;
74 QAction *mOpenAction;
75 QAction *mUploadTheme;
76 QAction *mSaveAction;
77 QAction *mInstallTheme;
78 QAction *mInsertFile;
79 QAction *mManageTheme;
80 QAction *mUpdateView;
81 QAction *mSaveAsAction;
82 KRecentFilesAction *mRecentFileAction;
85 #endif // CONTACTEDITORMAINWINDOW_H