summaryrefslogtreecommitdiff
path: root/utils/themeeditor/editorwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/themeeditor/editorwindow.cpp')
-rw-r--r--utils/themeeditor/editorwindow.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/utils/themeeditor/editorwindow.cpp b/utils/themeeditor/editorwindow.cpp
index a2fc11a..cadc631 100644
--- a/utils/themeeditor/editorwindow.cpp
+++ b/utils/themeeditor/editorwindow.cpp
@@ -106,6 +106,10 @@ void EditorWindow::newTab()
{
SkinDocument* doc = new SkinDocument;
ui->editorTabs->addTab(doc, doc->getTitle());
+
+ /* Connecting to title change events */
+ QObject::connect(doc, SIGNAL(titleChanged(QString)),
+ this, SLOT(tabTitleChanged(QString)));
}
void EditorWindow::shiftTab(int index)
@@ -128,6 +132,12 @@ void EditorWindow::closeTab(int index)
}
}
+void EditorWindow::tabTitleChanged(QString title)
+{
+ SkinDocument* sender = dynamic_cast<SkinDocument*>(QObject::sender());
+ ui->editorTabs->setTabText(ui->editorTabs->indexOf(sender), title);
+}
+
void EditorWindow::showPanel()
{
if(sender() == ui->actionFile_Panel)