summaryrefslogtreecommitdiff
path: root/utils/themeeditor/graphics/rbscreen.cpp
diff options
context:
space:
mode:
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()
67{ 67{
68 if(backdrop) 68 if(backdrop)
69 delete backdrop; 69 delete backdrop;
70
71 QMap<int, RBFont*>::iterator i;
72 for(i = fonts.begin(); i != fonts.end(); i++)
73 if(*i)
74 delete (*i);
70} 75}
71 76
72QPainterPath RBScreen::shape() const 77QPainterPath RBScreen::shape() const
@@ -103,6 +108,23 @@ void RBScreen::showViewport(QString name)
103 update(); 108 update();
104} 109}
105 110
111void RBScreen::loadFont(int id, RBFont* font)
112{
113 if(id < 2 || id > 9)
114 return;
115
116 fonts.insert(id, font);
117}
118
119RBFont* RBScreen::getFont(int id)
120{
121 if(fonts.value(id, 0) != 0)
122 return fonts.value(id);
123 else
124 return fonts.value(0, 0);
125}
126
127
106void RBScreen::setBackdrop(QString filename) 128void RBScreen::setBackdrop(QString filename)
107{ 129{
108 130