summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThilo Cestonaro <thilo@cestona.ro>2012-09-02 20:27:42 (GMT)
committerThilo Cestonaro <thilo@cestona.ro>2012-09-02 20:32:56 (GMT)
commitc889fadf1dede0955ce74ce6897094e4f0c3e341 (patch)
treebe6a461a337fa9f46d9d9ac5e973d4e035c67a46 /Swift/QtUI/QtChatViewFactory.cpp
parent6856199274e9c5e581220fccf520b8f011519d17 (diff)
downloadswift-contrib-c889fadf1dede0955ce74ce6897094e4f0c3e341.zip
swift-contrib-c889fadf1dede0955ce74ce6897094e4f0c3e341.tar.bz2
moved QtChatWindow Log stuff into QtWebKitChatViewephraim/chatview
added QtChatViewFactory started implementation of QtBarriersFreeChatView License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php
Diffstat (limited to 'Swift/QtUI/QtChatViewFactory.cpp')
-rw-r--r--Swift/QtUI/QtChatViewFactory.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/Swift/QtUI/QtChatViewFactory.cpp b/Swift/QtUI/QtChatViewFactory.cpp
new file mode 100644
index 0000000..5c55627
--- /dev/null
+++ b/Swift/QtUI/QtChatViewFactory.cpp
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2012 Thilo Cestonaro
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+#include "QtChatViewFactory.h"
+#include "QtBarriersFreeChatView.h"
+#include "QtWebKitChatView.h"
+#include <Swift/Controllers/UIEvents/UIEventStream.h>
+
+#include <QDebug>
+
+namespace Swift {
+QtChatView* QtChatViewFactory::createChatView(QtChatTheme* theme, QWidget* parent, UIEventStream* eventStream, SettingsProvider* settings, QMap<QString, QString> emoticons) {
+ bool barriersFreeChat = settings->getSetting(QtUISettingConstants::BARRIERS_FREE_CHAT_VIEW);
+
+ qDebug() << "[QtChatViewFactory::createChatView] - barriersFreeChat: " << barriersFreeChat;
+
+ if(barriersFreeChat) {
+ qDebug() << "[QtChatViewFactory::createChatView] - using barriers free chat view ...";
+ return new QtBarriersFreeChatView(theme, parent, eventStream, settings, emoticons);
+ }
+ else {
+ qDebug() << "[QtChatViewFactory::createChatView] - using normal chat view ...";
+ return new QtWebKitChatView(theme, parent, eventStream, settings, emoticons);
+ }
+}
+
+}
+