summaryrefslogtreecommitdiff
path: root/utils/themeeditor/graphics
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-26 05:18:21 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-26 05:18:21 +0000
commitc32728c91c2579688d3e7ffc4afbea1acf2385e0 (patch)
treece1732eadbc0f4160fbe434563f2bf8b3e5b5d1c /utils/themeeditor/graphics
parentd93164d6c94791d7be6ab71c4a6a2a84f982ba09 (diff)
downloadrockbox-c32728c91c2579688d3e7ffc4afbea1acf2385e0.tar.gz
rockbox-c32728c91c2579688d3e7ffc4afbea1acf2385e0.zip
Theme Editor: Began integrating device configuration panel with renderer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27135 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/graphics')
-rw-r--r--utils/themeeditor/graphics/rbrenderinfo.cpp7
-rw-r--r--utils/themeeditor/graphics/rbrenderinfo.h6
-rw-r--r--utils/themeeditor/graphics/rbscreen.cpp6
-rw-r--r--utils/themeeditor/graphics/rbviewport.h4
4 files changed, 18 insertions, 5 deletions
diff --git a/utils/themeeditor/graphics/rbrenderinfo.cpp b/utils/themeeditor/graphics/rbrenderinfo.cpp
index ca9f2b632d..289d730600 100644
--- a/utils/themeeditor/graphics/rbrenderinfo.cpp
+++ b/utils/themeeditor/graphics/rbrenderinfo.cpp
@@ -22,9 +22,10 @@
22#include "rbrenderinfo.h" 22#include "rbrenderinfo.h"
23 23
24RBRenderInfo::RBRenderInfo(ParseTreeModel* model, ProjectModel* project, 24RBRenderInfo::RBRenderInfo(ParseTreeModel* model, ProjectModel* project,
25 QMap<QString, QString>* settings, RBScreen* screen) 25 QMap<QString, QString>* settings,
26 DeviceState* device, RBScreen* screen)
26 :mProject(project), mSettings(settings), 27 :mProject(project), mSettings(settings),
27 mScreen(screen), mModel(model) 28 mDevice(device), mScreen(screen), mModel(model)
28{ 29{
29} 30}
30 31
@@ -32,6 +33,7 @@ RBRenderInfo::RBRenderInfo(const RBRenderInfo &other)
32{ 33{
33 mProject = other.mProject; 34 mProject = other.mProject;
34 mSettings = other.mSettings; 35 mSettings = other.mSettings;
36 mDevice = other.mDevice;
35 mScreen = other.mScreen; 37 mScreen = other.mScreen;
36 mModel = other.mModel; 38 mModel = other.mModel;
37} 39}
@@ -40,6 +42,7 @@ const RBRenderInfo& RBRenderInfo::operator=(const RBRenderInfo& other)
40{ 42{
41 mProject = other.mProject; 43 mProject = other.mProject;
42 mSettings = other.mSettings; 44 mSettings = other.mSettings;
45 mDevice = other.mDevice;
43 mScreen = other.mScreen; 46 mScreen = other.mScreen;
44 mModel = other.mModel; 47 mModel = other.mModel;
45 48
diff --git a/utils/themeeditor/graphics/rbrenderinfo.h b/utils/themeeditor/graphics/rbrenderinfo.h
index c80cb00a9d..c65c4deafa 100644
--- a/utils/themeeditor/graphics/rbrenderinfo.h
+++ b/utils/themeeditor/graphics/rbrenderinfo.h
@@ -27,18 +27,21 @@
27class RBScreen; 27class RBScreen;
28class ProjectModel; 28class ProjectModel;
29class ParseTreeModel; 29class ParseTreeModel;
30class DeviceState;
30 31
31class RBRenderInfo 32class RBRenderInfo
32{ 33{
33public: 34public:
34 RBRenderInfo(ParseTreeModel* model, ProjectModel* project, 35 RBRenderInfo(ParseTreeModel* model, ProjectModel* project,
35 QMap<QString, QString>* settings, RBScreen* screen); 36 QMap<QString, QString>* settings, DeviceState* device,
37 RBScreen* screen);
36 RBRenderInfo(const RBRenderInfo& other); 38 RBRenderInfo(const RBRenderInfo& other);
37 virtual ~RBRenderInfo(); 39 virtual ~RBRenderInfo();
38 40
39 const RBRenderInfo& operator=(const RBRenderInfo& other); 41 const RBRenderInfo& operator=(const RBRenderInfo& other);
40 42
41 ProjectModel* project() const{ return mProject; } 43 ProjectModel* project() const{ return mProject; }
44 DeviceState* device() const{ return mDevice; }
42 QMap<QString, QString>* settings() const{ return mSettings; } 45 QMap<QString, QString>* settings() const{ return mSettings; }
43 RBScreen* screen() const{ return mScreen; } 46 RBScreen* screen() const{ return mScreen; }
44 ParseTreeModel* model() const{ return mModel; } 47 ParseTreeModel* model() const{ return mModel; }
@@ -46,6 +49,7 @@ public:
46private: 49private:
47 ProjectModel* mProject; 50 ProjectModel* mProject;
48 QMap<QString, QString>* mSettings; 51 QMap<QString, QString>* mSettings;
52 DeviceState* mDevice;
49 RBScreen* mScreen; 53 RBScreen* mScreen;
50 ParseTreeModel* mModel; 54 ParseTreeModel* mModel;
51}; 55};
diff --git a/utils/themeeditor/graphics/rbscreen.cpp b/utils/themeeditor/graphics/rbscreen.cpp
index d6a9aa6240..da6d20bbe8 100644
--- a/utils/themeeditor/graphics/rbscreen.cpp
+++ b/utils/themeeditor/graphics/rbscreen.cpp
@@ -21,6 +21,7 @@
21 21
22#include "rbscreen.h" 22#include "rbscreen.h"
23#include "rbviewport.h" 23#include "rbviewport.h"
24#include "devicestate.h"
24 25
25#include <QPainter> 26#include <QPainter>
26#include <QFile> 27#include <QFile>
@@ -29,8 +30,13 @@ RBScreen::RBScreen(const RBRenderInfo& info, QGraphicsItem *parent) :
29 QGraphicsItem(parent), backdrop(0), project(project) 30 QGraphicsItem(parent), backdrop(0), project(project)
30{ 31{
31 32
33 /*
32 width = info.settings()->value("#screenwidth", "300").toInt(); 34 width = info.settings()->value("#screenwidth", "300").toInt();
33 height = info.settings()->value("#screenheight", "200").toInt(); 35 height = info.settings()->value("#screenheight", "200").toInt();
36*/
37
38 width = info.device()->data("screenwidth").toInt();
39 height = info.device()->data("screenheight").toInt();
34 40
35 QString bg = info.settings()->value("background color", "FFFFFF"); 41 QString bg = info.settings()->value("background color", "FFFFFF");
36 bgColor = stringToColor(bg, Qt::white); 42 bgColor = stringToColor(bg, Qt::white);
diff --git a/utils/themeeditor/graphics/rbviewport.h b/utils/themeeditor/graphics/rbviewport.h
index 5726c5c256..1ee85f2fcd 100644
--- a/utils/themeeditor/graphics/rbviewport.h
+++ b/utils/themeeditor/graphics/rbviewport.h
@@ -52,9 +52,9 @@ public:
52private: 52private:
53 53
54 QRectF size; 54 QRectF size;
55 QColor background;
56 QColor foreground;
57 RBFont* font; 55 RBFont* font;
56 QColor foreground;
57 QColor background;
58 58
59 bool customUI; 59 bool customUI;
60 QPoint textOffset; 60 QPoint textOffset;