summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtLoginWindow.cpp9
-rw-r--r--Swift/QtUI/QtLoginWindow.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/Swift/QtUI/QtLoginWindow.cpp b/Swift/QtUI/QtLoginWindow.cpp
index 2fd27c6..a222e8e 100644
--- a/Swift/QtUI/QtLoginWindow.cpp
+++ b/Swift/QtUI/QtLoginWindow.cpp
@@ -133,6 +133,15 @@ void QtLoginWindow::setGentleGeometry(const QRect& rect) {
move(rect.topLeft());
}
+void QtLoginWindow::selectUser(const String& username) {
+ for (int i = 0; i < usernames_.count(); i++) {
+ if (P2QSTRING(username) == usernames_[i]) {
+ username_->setCurrentIndex(i);
+ break;
+ }
+ }
+}
+
QRect QtLoginWindow::defaultPosition() {
QDesktopWidget desktop;
int windowWidth = 200;
diff --git a/Swift/QtUI/QtLoginWindow.h b/Swift/QtUI/QtLoginWindow.h
index 491521b..38852ce 100644
--- a/Swift/QtUI/QtLoginWindow.h
+++ b/Swift/QtUI/QtLoginWindow.h
@@ -30,6 +30,7 @@ namespace Swift {
virtual void addAvailableAccount(const String& defaultJID, const String& defaultPassword, const String& defaultCertificate);
static QRect defaultPosition();
void setGentleGeometry(const QRect&);
+ void selectUser(const String& user);
signals:
void geometryChanged();