summaryrefslogtreecommitdiffstats
blob: c150892b70af947ba4e85a5da89325f414cc59e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "QtLoginWindowFactory.h"
#include "QtLoginWindow.h"

namespace Swift {

QtLoginWindowFactory::QtLoginWindowFactory(QSplitter* splitter, QtSystemTray* systemTray) : QObject() {
	splitter_ = splitter;
	systemTray_ = systemTray;
}

LoginWindow* QtLoginWindowFactory::createLoginWindow(const String& defaultJID, const String& defaultPassword, const String& defaultCertificate) {
	QtLoginWindow* window = new QtLoginWindow(defaultJID, defaultPassword, defaultCertificate);
	if (splitter_) {
		splitter_->insertWidget(0, window);
	}
	connect(systemTray_, SIGNAL(clicked()), window, SLOT(show()));
	return window;
}
}