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.zip
rockbox-c32728c91c2579688d3e7ffc4afbea1acf2385e0.tar.gz
rockbox-c32728c91c2579688d3e7ffc4afbea1acf2385e0.tar.bz2
rockbox-c32728c91c2579688d3e7ffc4afbea1acf2385e0.tar.xz
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 ca9f2b6..289d730 100644
--- a/utils/themeeditor/graphics/rbrenderinfo.cpp
+++ b/utils/themeeditor/graphics/rbrenderinfo.cpp
@@ -22,9 +22,10 @@
#include "rbrenderinfo.h"
RBRenderInfo::RBRenderInfo(ParseTreeModel* model, ProjectModel* project,
- QMap<QString, QString>* settings, RBScreen* screen)
+ QMap<QString, QString>* settings,
+ DeviceState* device, RBScreen* screen)
:mProject(project), mSettings(settings),
- mScreen(screen), mModel(model)
+ mDevice(device), mScreen(screen), mModel(model)
{
}
@@ -32,6 +33,7 @@ RBRenderInfo::RBRenderInfo(const RBRenderInfo &other)
{
mProject = other.mProject;
mSettings = other.mSettings;
+ mDevice = other.mDevice;
mScreen = other.mScreen;
mModel = other.mModel;
}
@@ -40,6 +42,7 @@ const RBRenderInfo& RBRenderInfo::operator=(const RBRenderInfo& other)
{
mProject = other.mProject;
mSettings = other.mSettings;
+ mDevice = other.mDevice;
mScreen = other.mScreen;
mModel = other.mModel;
diff --git a/utils/themeeditor/graphics/rbrenderinfo.h b/utils/themeeditor/graphics/rbrenderinfo.h
index c80cb00..c65c4de 100644
--- a/utils/themeeditor/graphics/rbrenderinfo.h
+++ b/utils/themeeditor/graphics/rbrenderinfo.h
@@ -27,18 +27,21 @@
class RBScreen;
class ProjectModel;
class ParseTreeModel;
+class DeviceState;
class RBRenderInfo
{
public:
RBRenderInfo(ParseTreeModel* model, ProjectModel* project,
- QMap<QString, QString>* settings, RBScreen* screen);
+ QMap<QString, QString>* settings, DeviceState* device,
+ RBScreen* screen);
RBRenderInfo(const RBRenderInfo& other);
virtual ~RBRenderInfo();
const RBRenderInfo& operator=(const RBRenderInfo& other);
ProjectModel* project() const{ return mProject; }
+ DeviceState* device() const{ return mDevice; }
QMap<QString, QString>* settings() const{ return mSettings; }
RBScreen* screen() const{ return mScreen; }
ParseTreeModel* model() const{ return mModel; }
@@ -46,6 +49,7 @@ public:
private:
ProjectModel* mProject;
QMap<QString, QString>* mSettings;
+ DeviceState* mDevice;
RBScreen* mScreen;
ParseTreeModel* mModel;
};
diff --git a/utils/themeeditor/graphics/rbscreen.cpp b/utils/themeeditor/graphics/rbscreen.cpp
index d6a9aa6..da6d20b 100644
--- a/utils/themeeditor/graphics/rbscreen.cpp
+++ b/utils/themeeditor/graphics/rbscreen.cpp
@@ -21,6 +21,7 @@
#include "rbscreen.h"
#include "rbviewport.h"
+#include "devicestate.h"
#include <QPainter>
#include <QFile>
@@ -29,8 +30,13 @@ RBScreen::RBScreen(const RBRenderInfo& info, QGraphicsItem *parent) :
QGraphicsItem(parent), backdrop(0), project(project)
{
+ /*
width = info.settings()->value("#screenwidth", "300").toInt();
height = info.settings()->value("#screenheight", "200").toInt();
+*/
+
+ width = info.device()->data("screenwidth").toInt();
+ height = info.device()->data("screenheight").toInt();
QString bg = info.settings()->value("background color", "FFFFFF");
bgColor = stringToColor(bg, Qt::white);
diff --git a/utils/themeeditor/graphics/rbviewport.h b/utils/themeeditor/graphics/rbviewport.h
index 5726c5c..1ee85f2 100644
--- a/utils/themeeditor/graphics/rbviewport.h
+++ b/utils/themeeditor/graphics/rbviewport.h
@@ -52,9 +52,9 @@ public:
private:
QRectF size;
- QColor background;
- QColor foreground;
RBFont* font;
+ QColor foreground;
+ QColor background;
bool customUI;
QPoint textOffset;