summaryrefslogtreecommitdiff
path: root/utils/themeeditor/graphics/rbscreen.h
diff options
context:
space:
mode:
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