Improved special field handling in text element.
[jspeed] / src / theme.h
1 /*
2  * This file is part of jSpeed.
3  *
4  * jSpeed is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * jSpeed 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
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with jSpeed.  If not, see <http://www.gnu.org/licenses/>.
16  *
17  */
18
19 #ifndef THEME_H
20 #define THEME_H
21
22 #include "widgetscreen.h"
23
24 class QString;
25 class Reader;
26 class ThemeScreen;
27
28 class Theme : public WidgetScreen
29 {
30     Q_OBJECT
31
32 public:
33     Theme(QWidget* parent = 0);
34     ~Theme();
35     bool load();
36     bool portraitEnabled() const;
37     bool landscapeEnabled() const;
38     QString const& error() const;
39     static QString getThemeDir();
40     static QString const& getThemeSuffix();
41
42 public slots:
43     virtual void reArrange();
44     virtual void flip();
45
46 private:
47     bool read();
48     void connectSignals(ThemeScreen* screen);
49     int portraitId_;
50     int landscapeId_;
51     Reader* reader_;
52     QString error_;
53     ThemeScreen* portrait_;
54     ThemeScreen* landscape_;
55     bool portraitMode_;
56
57 };
58
59 #endif