Remove unused includes
[kdepim.git] / grantleeeditor / contactthemeeditor / contacteditorpage.h
blob8e529cebf44abbfe9a7876ba305cee5ae763858d
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 CONTACTEDITORPAGE_H
20 #define CONTACTEDITORPAGE_H
22 #include <QWidget>
24 namespace GrantleeThemeEditor
26 class ThemeEditorTabWidget;
27 class ThemeSession;
28 class DesktopFilePage;
30 class EditorPage;
31 class KZip;
33 class ContactEditorPage : public QWidget
35 Q_OBJECT
36 public:
37 explicit ContactEditorPage(const QString &projectDir, const QString &themeName, QWidget *parent = Q_NULLPTR);
38 ~ContactEditorPage();
40 bool saveTheme(bool withConfirmation = true);
41 void loadTheme(const QString &filename);
43 void addExtraPage();
45 void uploadTheme();
46 void installTheme(const QString &themePath);
48 bool themeWasChanged() const;
50 void reloadConfig();
52 void insertFile();
54 void updatePreview();
56 void saveThemeAs(const QString &directory);
58 Q_SIGNALS:
59 void changed(bool);
60 void canInsertFile(bool);
62 private Q_SLOTS:
63 void slotUpdateViewer();
64 void slotCloseTab(int);
65 void slotChanged();
66 void slotCurrentWidgetChanged(int);
68 private:
69 void setChanged(bool b);
70 void storeTheme(const QString &directory = QString());
71 QString projectDirectory() const;
72 void createZip(const QString &themeName, KZip *zip);
73 EditorPage *createExtraPage(const QString &filename);
74 EditorPage *createCustomPage(const QString &filename);
75 QList<EditorPage *> mExtraPage;
77 GrantleeThemeEditor::ThemeEditorTabWidget *mTabWidget;
78 EditorPage *mEditorPage;
79 EditorPage *mEditorGroupPage;
80 EditorPage *mEditorGroupEmbeddedPage;
81 EditorPage *mEditorEmbeddedPage;
82 GrantleeThemeEditor::DesktopFilePage *mDesktopPage;
83 GrantleeThemeEditor::ThemeSession *mThemeSession;
84 bool mChanged;
87 #endif // CONTACTEDITORPAGE_H