summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-06-01 08:48:42 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-06-01 09:24:28 (GMT)
commit2812bddd81f8a1b804c7460f4e14cd0aa393d129 (patch)
treed46294f35150c4f0f43deaf2d31fceaf945ae715 /UI/Qt/QtSwift.cpp
downloadswift-contrib-2812bddd81f8a1b804c7460f4e14cd0aa393d129.zip
swift-contrib-2812bddd81f8a1b804c7460f4e14cd0aa393d129.tar.bz2
Import.
Diffstat (limited to 'UI/Qt/QtSwift.cpp')
-rw-r--r--UI/Qt/QtSwift.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/UI/Qt/QtSwift.cpp b/UI/Qt/QtSwift.cpp
new file mode 100644
index 0000000..e7d4152
--- /dev/null
+++ b/UI/Qt/QtSwift.cpp
@@ -0,0 +1,43 @@
+#include "QtSwift.h"
+
+#include "QtLoginWindowFactory.h"
+#include "QtChatWindowFactory.h"
+#include "QtMainWindowFactory.h"
+#include "QtTreeWidgetFactory.h"
+
+#include <boost/bind.hpp>
+
+#include "Swiften/Application/Application.h"
+#include "Swiften/Application/Platform/PlatformApplication.h"
+#include "Swiften/Base/String.h"
+#include "Swiften/Elements/Presence.h"
+#include "Swiften/Client/Client.h"
+#include "Swiften/Controllers/ChatController.h"
+#include "Swiften/Controllers/MainController.h"
+
+namespace Swift{
+
+QtSwift::QtSwift() :
+ treeWidgetFactory_(new QtTreeWidgetFactory()),
+ chatWindowFactory_(new QtChatWindowFactory(treeWidgetFactory_)),
+ rosterWindowFactory_(new QtMainWindowFactory(treeWidgetFactory_)),
+ loginWindowFactory_(new QtLoginWindowFactory()) {
+ QCoreApplication::setApplicationName("Swift");
+ QCoreApplication::setOrganizationName("Swift");
+ QCoreApplication::setOrganizationDomain("swift.im");
+ settings_ = new QtSettingsProvider();
+ application_ = new PlatformApplication("Swift");
+ mainController_ = new MainController(chatWindowFactory_, rosterWindowFactory_, loginWindowFactory_, treeWidgetFactory_, settings_, application_);
+}
+
+QtSwift::~QtSwift() {
+ delete chatWindowFactory_;
+ delete rosterWindowFactory_;
+ delete loginWindowFactory_;
+ delete treeWidgetFactory_;
+ delete mainController_;
+ delete settings_;
+ delete application_;
+}
+
+}