2 * This file is part of jSpeed.
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.
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.
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/>.
19 #ifndef WIDGETSCREEN_H
20 #define WIDGETSCREEN_H
22 #include <QtCore/QMap>
23 #include <QtCore/QSet>
24 #include <QtGui/QStackedWidget>
25 #include "abstractscreen.h"
32 class WidgetScreen : public QStackedWidget, public AbstractScreen
37 enum Orientation {LANDSCAPE, PORTRAIT};
38 WidgetScreen(QWidget* parent = 0);
40 void addScreen(ThemeScreen* screen, Orientation orientation);
41 bool load(Orientation orientation, QDomNode const& data, Reader* reader);
42 bool load(QDomNode const& data, Reader* reader);
43 bool orientationEnabled(Orientation orientation) const;
44 bool orientationLoaded(Orientation orientation) const;
45 void setColor(Orientation orientation, QString const& color);
46 void setColor(QString const& color);
49 virtual void reArrange();
52 void removeUnloaded();
55 void minimizePressed();
56 void settingsPressed();
61 QMap<Orientation, ThemeScreen*> screens_;
62 QSet<Orientation> loadedScreens_;
63 Orientation currentOrientation_;