From deab1bb2f57692d383e6ad6fb87d2d80fa84f5eb Mon Sep 17 00:00:00 2001 From: Robert Bieber Date: Wed, 23 Jun 2010 19:41:30 +0000 Subject: Theme Editor: Added rendering support for some more tags git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27094 a1c6a512-1295-4272-9138-f99709370657 --- utils/themeeditor/graphics/rbscreen.cpp | 12 ++++++++++++ utils/themeeditor/graphics/rbscreen.h | 1 + utils/themeeditor/graphics/rbviewport.h | 6 ++++++ 3 files changed, 19 insertions(+) (limited to 'utils/themeeditor/graphics') diff --git a/utils/themeeditor/graphics/rbscreen.cpp b/utils/themeeditor/graphics/rbscreen.cpp index 0a04037..004d2e0 100644 --- a/utils/themeeditor/graphics/rbscreen.cpp +++ b/utils/themeeditor/graphics/rbscreen.cpp @@ -117,6 +117,18 @@ void RBScreen::setBackdrop(QString filename) backdrop = 0; } +void RBScreen::makeCustomUI(QString id) +{ + if(namedViewports.value(id, 0) != 0) + { + QMap::iterator i; + for(i = namedViewports.begin(); i != namedViewports.end(); i++) + (*i)->clearCustomUI(); + namedViewports.value(id)->makeCustomUI(); + namedViewports.value(id)->show(); + } +} + QColor RBScreen::stringToColor(QString str, QColor fallback) { diff --git a/utils/themeeditor/graphics/rbscreen.h b/utils/themeeditor/graphics/rbscreen.h index bc44071..51fa32c 100644 --- a/utils/themeeditor/graphics/rbscreen.h +++ b/utils/themeeditor/graphics/rbscreen.h @@ -59,6 +59,7 @@ public: RBImage* getImage(QString name){ return images.value(name, 0); } void setBackdrop(QString filename); + void makeCustomUI(QString id); static QColor stringToColor(QString str, QColor fallback); diff --git a/utils/themeeditor/graphics/rbviewport.h b/utils/themeeditor/graphics/rbviewport.h index 6f67bae..29d0b0a 100644 --- a/utils/themeeditor/graphics/rbviewport.h +++ b/utils/themeeditor/graphics/rbviewport.h @@ -40,6 +40,12 @@ public: void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); + void setBGColor(QColor color){ background = color; } + void setFGColor(QColor color){ foreground = color; } + void makeCustomUI(){ customUI = true; } + void clearCustomUI(){ customUI = false; } + + void newline(); private: -- cgit v1.1