summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2009-06-21 15:16:22 (GMT)
committerKevin Smith <git@kismith.co.uk>2009-06-21 15:18:49 (GMT)
commitb1cc881c57dc8498e2ccdf1552421e116a01d3dd (patch)
treed209bbc0046397cd7e3798574ccb4af25bb88592 /Swift/QtUI
parent1ac73ccac3f25efcf4f98f77f9d073c11553f983 (diff)
downloadswift-contrib-b1cc881c57dc8498e2ccdf1552421e116a01d3dd.zip
swift-contrib-b1cc881c57dc8498e2ccdf1552421e116a01d3dd.tar.bz2
Unconditional netbookremix mode
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtLoginWindowFactory.cpp11
-rw-r--r--Swift/QtUI/QtLoginWindowFactory.h8
-rw-r--r--Swift/QtUI/QtMainWindowFactory.cpp7
-rw-r--r--Swift/QtUI/QtMainWindowFactory.h4
-rw-r--r--Swift/QtUI/QtSwift.cpp5
5 files changed, 23 insertions, 12 deletions
diff --git a/Swift/QtUI/QtLoginWindowFactory.cpp b/Swift/QtUI/QtLoginWindowFactory.cpp
index 4874828..5d63ebc 100644
--- a/Swift/QtUI/QtLoginWindowFactory.cpp
+++ b/Swift/QtUI/QtLoginWindowFactory.cpp
@@ -2,7 +2,16 @@
#include "QtLoginWindow.h"
namespace Swift {
+
+QtLoginWindowFactory::QtLoginWindowFactory(QSplitter* splitter) {
+ splitter_ = splitter;
+}
+
LoginWindow* QtLoginWindowFactory::createLoginWindow(const String& defaultJID, const String& defaultPassword, const String& defaultCertificate) {
- return new QtLoginWindow(defaultJID, defaultPassword, defaultCertificate);
+ QtLoginWindow* window = new QtLoginWindow(defaultJID, defaultPassword, defaultCertificate);
+ if (splitter_) {
+ splitter_->insertWidget(0, window);
+ }
+ return window;
}
}
diff --git a/Swift/QtUI/QtLoginWindowFactory.h b/Swift/QtUI/QtLoginWindowFactory.h
index 17f2453..617851e 100644
--- a/Swift/QtUI/QtLoginWindowFactory.h
+++ b/Swift/QtUI/QtLoginWindowFactory.h
@@ -3,9 +3,15 @@
#include "Swift/Controllers/LoginWindowFactory.h"
+#include <QSplitter>
+
namespace Swift {
class QtLoginWindowFactory : public LoginWindowFactory{
- LoginWindow* createLoginWindow(const String& defaultJID, const String& defaultPassword, const String& defaultCertificate);
+ public:
+ QtLoginWindowFactory(QSplitter* splitter);
+ LoginWindow* createLoginWindow(const String& defaultJID, const String& defaultPassword, const String& defaultCertificate);
+ private:
+ QSplitter* splitter_;
};
}
diff --git a/Swift/QtUI/QtMainWindowFactory.cpp b/Swift/QtUI/QtMainWindowFactory.cpp
index b62e698..288d182 100644
--- a/Swift/QtUI/QtMainWindowFactory.cpp
+++ b/Swift/QtUI/QtMainWindowFactory.cpp
@@ -4,15 +4,12 @@
namespace Swift {
-QtMainWindowFactory::QtMainWindowFactory(QtTreeWidgetFactory *treeWidgetFactory, QSplitter* splitter) : treeWidgetFactory_(treeWidgetFactory) {
- splitter_ = splitter;
+QtMainWindowFactory::QtMainWindowFactory(QtTreeWidgetFactory *treeWidgetFactory) : treeWidgetFactory_(treeWidgetFactory) {
+
}
MainWindow* QtMainWindowFactory::createMainWindow() {
QtMainWindow* window = new QtMainWindow(treeWidgetFactory_);
- if (splitter_) {
- splitter_->addWidget(window);
- }
return window;
}
diff --git a/Swift/QtUI/QtMainWindowFactory.h b/Swift/QtUI/QtMainWindowFactory.h
index 1792f8a..1e45b23 100644
--- a/Swift/QtUI/QtMainWindowFactory.h
+++ b/Swift/QtUI/QtMainWindowFactory.h
@@ -2,17 +2,15 @@
#define SWIFT_QtMainWindowFactory_H
#include "Swift/Controllers/MainWindowFactory.h"
-#include <QSplitter>
namespace Swift {
class QtTreeWidgetFactory;
class QtMainWindowFactory : public MainWindowFactory{
public:
- QtMainWindowFactory(QtTreeWidgetFactory *treeWidgetFactory, QSplitter* splitter);
+ QtMainWindowFactory(QtTreeWidgetFactory *treeWidgetFactory);
MainWindow* createMainWindow();
private:
QtTreeWidgetFactory *treeWidgetFactory_;
- QSplitter* splitter_;
};
}
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp
index 205f396..8670ddb 100644
--- a/Swift/QtUI/QtSwift.cpp
+++ b/Swift/QtUI/QtSwift.cpp
@@ -22,15 +22,16 @@ namespace Swift{
QtSwift::QtSwift() {
QSplitter* splitter = new QSplitter();
treeWidgetFactory_ = new QtTreeWidgetFactory();
+ loginWindowFactory_ = new QtLoginWindowFactory(splitter);
+ rosterWindowFactory_ = new QtMainWindowFactory(treeWidgetFactory_);
chatWindowFactory_ = new QtChatWindowFactory(treeWidgetFactory_, splitter);
- rosterWindowFactory_ = new QtMainWindowFactory(treeWidgetFactory_, splitter);
- loginWindowFactory_ = new QtLoginWindowFactory();
systemTray_ = new QtSystemTray();
QCoreApplication::setApplicationName("Swift");
QCoreApplication::setOrganizationName("Swift");
QCoreApplication::setOrganizationDomain("swift.im");
settings_ = new QtSettingsProvider();
application_ = new PlatformApplication("Swift");
+ splitter->show();
mainController_ = new MainController(chatWindowFactory_, rosterWindowFactory_, loginWindowFactory_, treeWidgetFactory_, settings_, application_, systemTray_);
}