summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtXMLConsoleWidgetFactory.cpp')
-rw-r--r--Swift/QtUI/QtXMLConsoleWidgetFactory.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/Swift/QtUI/QtXMLConsoleWidgetFactory.cpp b/Swift/QtUI/QtXMLConsoleWidgetFactory.cpp
new file mode 100644
index 0000000..9e32b0a
--- /dev/null
+++ b/Swift/QtUI/QtXMLConsoleWidgetFactory.cpp
@@ -0,0 +1,22 @@
+#include "QtXMLConsoleWidgetFactory.h"
+
+#include "QtXMLConsoleWidget.h"
+#include "QtChatTabs.h"
+
+namespace Swift {
+
+QtXMLConsoleWidgetFactory::QtXMLConsoleWidgetFactory(QtChatTabs* tabs) {
+ tabs_ = tabs;
+}
+
+XMLConsoleWidget* QtXMLConsoleWidgetFactory::createXMLConsoleWidget() {
+ QtXMLConsoleWidget* widget = new QtXMLConsoleWidget();
+ tabs_->addTab(widget);
+ if (!tabs_->isVisible()) {
+ tabs_->show();
+ }
+ widget->show();
+ return widget;
+}
+
+}