summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor/graphics/rbscreen.cpp
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-23 20:18:31 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-23 20:18:31 +0000
commit6d6156603cf2ac5facf08734f12e0b4d0c1fcce0 (patch)
tree25340c9fdac15f4bf88d7f6e5bd935d1f1934211 /utils/themeeditor/graphics/rbscreen.cpp
parent168eba1aecddc21231d922608380fe811a8a0473 (diff)
downloadrockbox-6d6156603cf2ac5facf08734f12e0b4d0c1fcce0.tar.gz
rockbox-6d6156603cf2ac5facf08734f12e0b4d0c1fcce0.zip
Theme Editor: Added dummy font class and implemented font load tag
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27096 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/graphics/rbscreen.cpp')
-rw-r--r--utils/themeeditor/graphics/rbscreen.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/utils/themeeditor/graphics/rbscreen.cpp b/utils/themeeditor/graphics/rbscreen.cpp
index 004d2e0990..a090c2f9f2 100644
--- a/utils/themeeditor/graphics/rbscreen.cpp
+++ b/utils/themeeditor/graphics/rbscreen.cpp
@@ -67,6 +67,11 @@ RBScreen::~RBScreen()
{
if(backdrop)
delete backdrop;
+
+ QMap<int, RBFont*>::iterator i;
+ for(i = fonts.begin(); i != fonts.end(); i++)
+ if(*i)
+ delete (*i);
}
QPainterPath RBScreen::shape() const
@@ -103,6 +108,23 @@ void RBScreen::showViewport(QString name)
update();
}
+void RBScreen::loadFont(int id, RBFont* font)
+{
+ if(id < 2 || id > 9)
+ return;
+
+ fonts.insert(id, font);
+}
+
+RBFont* RBScreen::getFont(int id)
+{
+ if(fonts.value(id, 0) != 0)
+ return fonts.value(id);
+ else
+ return fonts.value(0, 0);
+}
+
+
void RBScreen::setBackdrop(QString filename)
{