summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtChatTabs.cpp')
-rw-r--r--Swift/QtUI/QtChatTabs.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/Swift/QtUI/QtChatTabs.cpp b/Swift/QtUI/QtChatTabs.cpp
new file mode 100644
index 0000000..f2349a9
--- /dev/null
+++ b/Swift/QtUI/QtChatTabs.cpp
@@ -0,0 +1,27 @@
+#pragma once
+
+#include "QtChatTabs.h"
+
+#include <QTabWidget>
+#include <QLayout>
+
+namespace Swift {
+QtChatTabs::QtChatTabs() {
+ tabs_ = new QTabWidget(this);
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->setSpacing(0);
+ layout->setContentsMargins(0, 3, 0, 0);
+ layout->addWidget(tabs_);
+ setLayout(layout);
+ resize(400, 300);
+}
+
+void QtChatTabs::addTab(QWidget* tab) {
+ tabs_->addTab(tab, tab->windowTitle());
+}
+
+void QtChatTabs::tabClosing() {
+
+}
+
+} \ No newline at end of file