summaryrefslogtreecommitdiff
path: root/utils/themeeditor/gui/skindocument.cpp
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-17 06:59:46 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-17 06:59:46 +0000
commit75560845aad0cc8d1fccfeda5534489ca278ac80 (patch)
treecd51bb9dfb0a8a94677ac4b4beced11de9afd5b1 /utils/themeeditor/gui/skindocument.cpp
parent36b934d241d2560be6693f90c9aba501a1ec0ae7 (diff)
downloadrockbox-75560845aad0cc8d1fccfeda5534489ca278ac80.zip
rockbox-75560845aad0cc8d1fccfeda5534489ca278ac80.tar.gz
rockbox-75560845aad0cc8d1fccfeda5534489ca278ac80.tar.bz2
rockbox-75560845aad0cc8d1fccfeda5534489ca278ac80.tar.xz
Theme Editor: Working on renderer infrastructure
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26878 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to '')
-rw-r--r--utils/themeeditor/gui/skindocument.cpp24
1 files changed, 18 insertions, 6 deletions
diff --git a/utils/themeeditor/gui/skindocument.cpp b/utils/themeeditor/gui/skindocument.cpp
index 82c7106..aeefcc3 100644
--- a/utils/themeeditor/gui/skindocument.cpp
+++ b/utils/themeeditor/gui/skindocument.cpp
@@ -29,8 +29,10 @@
#include <iostream>
-SkinDocument::SkinDocument(QLabel* statusLabel, QWidget *parent) :
- TabContent(parent), statusLabel(statusLabel)
+SkinDocument::SkinDocument(QLabel* statusLabel, ProjectModel* project,
+ QWidget *parent)
+ :TabContent(parent), statusLabel(statusLabel),
+ project(project)
{
setupUI();
@@ -41,8 +43,10 @@ SkinDocument::SkinDocument(QLabel* statusLabel, QWidget *parent) :
blockUpdate = false;
}
-SkinDocument::SkinDocument(QLabel* statusLabel, QString file, QWidget *parent):
- TabContent(parent), fileName(file), statusLabel(statusLabel)
+SkinDocument::SkinDocument(QLabel* statusLabel, QString file,
+ ProjectModel* project, QWidget *parent)
+ :TabContent(parent), fileName(file),
+ statusLabel(statusLabel), project(project)
{
setupUI();
blockUpdate = false;
@@ -65,8 +69,8 @@ SkinDocument::SkinDocument(QLabel* statusLabel, QString file, QWidget *parent):
SkinDocument::~SkinDocument()
{
- delete highlighter;
- delete model;
+ highlighter->deleteLater();
+ model->deleteLater();
}
void SkinDocument::connectPrefs(PreferencesDialog* prefs)
@@ -309,3 +313,11 @@ void SkinDocument::saveAs()
emit titleChanged(titleText);
}
+
+QString SkinDocument::findSetting(QString key, QString fallback)
+{
+ if(!project)
+ return fallback;
+ else
+ return project->getSetting(key, fallback);
+}