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
24 namespace GrantleeThemeEditor
26 class ThemeEditorTabWidget
;
28 class DesktopFilePage
;
33 class ContactEditorPage
: public QWidget
37 explicit ContactEditorPage(const QString
&projectDir
, const QString
&themeName
, QWidget
*parent
= Q_NULLPTR
);
40 bool saveTheme(bool withConfirmation
= true);
41 void loadTheme(const QString
&filename
);
46 void installTheme(const QString
&themePath
);
48 bool themeWasChanged() const;
56 void saveThemeAs(const QString
&directory
);
60 void canInsertFile(bool);
63 void slotUpdateViewer();
64 void slotCloseTab(int);
66 void slotCurrentWidgetChanged(int);
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
;
87 #endif // CONTACTEDITORPAGE_H