diff options
Diffstat (limited to 'utils/themeeditor/editorwindow.cpp')
-rw-r--r-- | utils/themeeditor/editorwindow.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/utils/themeeditor/editorwindow.cpp b/utils/themeeditor/editorwindow.cpp index 4d2ed87169..bc66fec425 100644 --- a/utils/themeeditor/editorwindow.cpp +++ b/utils/themeeditor/editorwindow.cpp | |||
@@ -84,6 +84,10 @@ void EditorWindow::setupUI() | |||
84 | QObject::connect(ui->editorTabs, SIGNAL(tabCloseRequested(int)), | 84 | QObject::connect(ui->editorTabs, SIGNAL(tabCloseRequested(int)), |
85 | this, SLOT(closeTab(int))); | 85 | this, SLOT(closeTab(int))); |
86 | 86 | ||
87 | /* Connecting the code gen button */ | ||
88 | QObject::connect(ui->fromTree, SIGNAL(pressed()), | ||
89 | this, SLOT(updateCurrent())); | ||
90 | |||
87 | } | 91 | } |
88 | 92 | ||
89 | void EditorWindow::setupMenus() | 93 | void EditorWindow::setupMenus() |
@@ -133,6 +137,8 @@ void EditorWindow::shiftTab(int index) | |||
133 | ui->actionSave_Document->setEnabled(false); | 137 | ui->actionSave_Document->setEnabled(false); |
134 | ui->actionSave_Document_As->setEnabled(false); | 138 | ui->actionSave_Document_As->setEnabled(false); |
135 | ui->actionClose_Document->setEnabled(false); | 139 | ui->actionClose_Document->setEnabled(false); |
140 | ui->actionToolbarSave->setEnabled(false); | ||
141 | ui->fromTree->setEnabled(false); | ||
136 | } | 142 | } |
137 | else | 143 | else |
138 | { | 144 | { |
@@ -141,6 +147,8 @@ void EditorWindow::shiftTab(int index) | |||
141 | ui->actionSave_Document->setEnabled(true); | 147 | ui->actionSave_Document->setEnabled(true); |
142 | ui->actionSave_Document_As->setEnabled(true); | 148 | ui->actionSave_Document_As->setEnabled(true); |
143 | ui->actionClose_Document->setEnabled(true); | 149 | ui->actionClose_Document->setEnabled(true); |
150 | ui->actionToolbarSave->setEnabled(true); | ||
151 | ui->fromTree->setEnabled(true); | ||
144 | } | 152 | } |
145 | } | 153 | } |
146 | 154 | ||
@@ -211,6 +219,15 @@ void EditorWindow::closeEvent(QCloseEvent* event) | |||
211 | event->accept(); | 219 | event->accept(); |
212 | } | 220 | } |
213 | 221 | ||
222 | void EditorWindow::updateCurrent() | ||
223 | { | ||
224 | if(ui->editorTabs->currentIndex() < 0) | ||
225 | return; | ||
226 | |||
227 | dynamic_cast<SkinDocument*> | ||
228 | (ui->editorTabs->currentWidget())->genCode(); | ||
229 | } | ||
230 | |||
214 | EditorWindow::~EditorWindow() | 231 | EditorWindow::~EditorWindow() |
215 | { | 232 | { |
216 | delete ui; | 233 | delete ui; |