summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtSingleWindow.cpp')
-rw-r--r--Swift/QtUI/QtSingleWindow.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/Swift/QtUI/QtSingleWindow.cpp b/Swift/QtUI/QtSingleWindow.cpp
index 733571f..c970296 100644
--- a/Swift/QtUI/QtSingleWindow.cpp
+++ b/Swift/QtUI/QtSingleWindow.cpp
@@ -6,8 +6,10 @@
#include <Swift/QtUI/QtSingleWindow.h>
-#include <Swift/QtUI/QtSettingsProvider.h>
+
#include <Swiften/Base/foreach.h>
+#include <Swift/QtUI/QtSettingsProvider.h>
+#include <Swift/QtUI/QtChatTabs.h>
namespace Swift {
@@ -28,6 +30,18 @@ QtSingleWindow::~QtSingleWindow() {
}
+void QtSingleWindow::addWidget(QWidget* widget) {
+ QtChatTabs* tabs = dynamic_cast<QtChatTabs*>(widget);
+ if (tabs) {
+ connect(tabs, SIGNAL(onTitleChanged(const QString&)), this, SLOT(handleTabsTitleChanged(const QString&)));
+ }
+ QSplitter::addWidget(widget);
+}
+
+void QtSingleWindow::handleTabsTitleChanged(const QString& title) {
+ setWindowTitle(title);
+}
+
void QtSingleWindow::handleSplitterMoved(int, int) {
QList<QVariant> variantValues;
QList<int> intValues = sizes();