1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Robert Bieber 2010-06-23 20:18:31 +00:00
parent 168eba1aec
commit 6d6156603c
6 changed files with 116 additions and 2 deletions

View file

@ -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)
{