summaryrefslogtreecommitdiffstats
blob: 2405dd6284094c5290953ff40318195f59a8ccb6 (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(bringToFront()));
	return window;
}
}