summaryrefslogtreecommitdiff
path: root/utils/themeeditor/graphics/rbscreen.h
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-21 20:11:58 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-21 20:11:58 +0000
commite1d8a3dc63391098f9381a3cb33d73e69b46c006 (patch)
tree0f503320d4fda330a003fe88ae7482537037db85 /utils/themeeditor/graphics/rbscreen.h
parentbd380b399323d15a1572cdc017e0f95b1b9db151 (diff)
downloadrockbox-e1d8a3dc63391098f9381a3cb33d73e69b46c006.tar.gz
rockbox-e1d8a3dc63391098f9381a3cb33d73e69b46c006.zip
Theme Editor: Reworked information passing among render functions, now loads all viewports and shows Custom UI viewport in blue
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27026 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/graphics/rbscreen.h')
-rw-r--r--utils/themeeditor/graphics/rbscreen.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/utils/themeeditor/graphics/rbscreen.h b/utils/themeeditor/graphics/rbscreen.h
index 78bbcfd8b2..6a9da2fcda 100644
--- a/utils/themeeditor/graphics/rbscreen.h
+++ b/utils/themeeditor/graphics/rbscreen.h
@@ -25,12 +25,15 @@
25#include <QGraphicsItem> 25#include <QGraphicsItem>
26 26
27#include "projectmodel.h" 27#include "projectmodel.h"
28#include "rbrenderinfo.h"
29
30class RBViewport;
28 31
29class RBScreen : public QGraphicsItem 32class RBScreen : public QGraphicsItem
30{ 33{
31 34
32public: 35public:
33 RBScreen(ProjectModel* project = 0, QGraphicsItem *parent = 0); 36 RBScreen(const RBRenderInfo& info, QGraphicsItem *parent = 0);
34 virtual ~RBScreen(); 37 virtual ~RBScreen();
35 38
36 QPainterPath shape() const; 39 QPainterPath shape() const;
@@ -41,14 +44,11 @@ public:
41 int getWidth() const{ return width; } 44 int getWidth() const{ return width; }
42 int getHeight() const{ return height; } 45 int getHeight() const{ return height; }
43 46
44 static QString safeSetting(ProjectModel* project, QString key, 47 void loadViewport(QString name, RBViewport* view)
45 QString fallback)
46 { 48 {
47 if(project) 49 namedViewports.insert(name, view);
48 return project->getSetting(key, fallback);
49 else
50 return fallback;
51 } 50 }
51 void showViewport(QString name);
52 52
53 static QColor stringToColor(QString str, QColor fallback); 53 static QColor stringToColor(QString str, QColor fallback);
54 54
@@ -62,6 +62,8 @@ private:
62 62
63 ProjectModel* project; 63 ProjectModel* project;
64 64
65 QMap<QString, RBViewport*> namedViewports;
66
65}; 67};
66 68
67#endif // RBSCREEN_H 69#endif // RBSCREEN_H