X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=Client%2Floginwindow.cpp;h=330b782472bd72e1a314526ab084c4e70041db1a;hb=53225de3244dc1b1589a8a7f8daa3f3a9b9ea710;hp=28d53abdc9cd2dc594f4c4d82dfaff334255226f;hpb=cd05761834f2faaeb31b59a18d5c8afbe6bfc499;p=speedfreak diff --git a/Client/loginwindow.cpp b/Client/loginwindow.cpp index 28d53ab..330b782 100644 --- a/Client/loginwindow.cpp +++ b/Client/loginwindow.cpp @@ -1,3 +1,12 @@ +/* + * Loginwindow class to maintain username for user + * + * @author Olavi Pulkkinen + * @author + * @copyright (c) 2010 Speed Freak team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + */ + #include "loginwindow.h" #include "ui_loginwindow.h" @@ -6,7 +15,7 @@ LoginWindow::LoginWindow(QWidget *parent) : ui(new Ui::LoginWindow) { ui->setupUi(this); - this->setWindowTitle("Login to Speed Freak server"); + this->setWindowTitle("Setting username"); } LoginWindow::~LoginWindow() @@ -31,12 +40,38 @@ void LoginWindow::on_cancelPushButton_clicked() close(); } +void setUser(QString uN, QString pW); + void LoginWindow::on_loginPushButton_clicked() { - // To do - //loginToServer(ui->userNameLineEdit->text(), - // ui->passwordLineEdit->text()); + this->username = ui->userNameLineEdit->text(); + this->password = ui->passwordLineEdit->text(); + + emit userNameChanged(); + close(); +} + +void LoginWindow::setUserName(QString username) +{ + this->username = username; +} + +void LoginWindow::setPassword(QString password) +{ + this->password = password; } +QString LoginWindow::getUserName() +{ + return this->username; +} + +QString LoginWindow::getPassword() +{ + return this->password; +} + + +