summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-06-10 16:49:49 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-06-10 16:49:49 (GMT)
commit7214d768dca85a6d43892169d5008898249dce73 (patch)
tree0f8b2820c9cb58f058263c78306987d934fec526 /Swift/QtUI/QtSwift.cpp
parentfd89da91d12b270d56f60544cad6f1ddc809af28 (diff)
downloadswift-7214d768dca85a6d43892169d5008898249dce73.zip
swift-7214d768dca85a6d43892169d5008898249dce73.tar.bz2
Moved UI/Qt -> Swift/QtUI.
Diffstat (limited to 'Swift/QtUI/QtSwift.cpp')
-rw-r--r--Swift/QtUI/QtSwift.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp
new file mode 100644
index 0000000..e7d4152
--- /dev/null
+++ b/Swift/QtUI/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_;
+}
+
+}