summaryrefslogtreecommitdiff
path: root/utils/themeeditor/gui/skindocument.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/themeeditor/gui/skindocument.cpp')
-rw-r--r--utils/themeeditor/gui/skindocument.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/utils/themeeditor/gui/skindocument.cpp b/utils/themeeditor/gui/skindocument.cpp
index 8c98255..4f48d34 100644
--- a/utils/themeeditor/gui/skindocument.cpp
+++ b/utils/themeeditor/gui/skindocument.cpp
@@ -30,9 +30,9 @@
#include <iostream>
SkinDocument::SkinDocument(QLabel* statusLabel, ProjectModel* project,
- QWidget *parent)
+ DeviceState* device, QWidget *parent)
:TabContent(parent), statusLabel(statusLabel),
- project(project)
+ project(project), device(device)
{
setupUI();
@@ -44,9 +44,11 @@ SkinDocument::SkinDocument(QLabel* statusLabel, ProjectModel* project,
}
SkinDocument::SkinDocument(QLabel* statusLabel, QString file,
- ProjectModel* project, QWidget *parent)
+ ProjectModel* project, DeviceState* device,
+ QWidget *parent)
:TabContent(parent), fileName(file),
- statusLabel(statusLabel), project(project)
+ statusLabel(statusLabel), project(project),
+ device(device)
{
setupUI();
blockUpdate = false;
@@ -145,6 +147,10 @@ void SkinDocument::setupUI()
QObject::connect(editor, SIGNAL(cursorPositionChanged()),
this, SLOT(cursorChanged()));
+ /* Connecting to device setting changes */
+ QObject::connect(device, SIGNAL(settingsChanged()),
+ this, SLOT(deviceChanged()));
+
settingsChanged();
}
@@ -257,7 +263,7 @@ void SkinDocument::codeChanged()
else
emit titleChanged(titleText);
- model->render(project, &fileName);
+ model->render(project, device, &fileName);
cursorChanged();