1 #include "settingsdialog.h"
2 #include "ui_settingsdialog.h"
4 SettingsDialog::SettingsDialog(QWidget *parent) :
6 ui(new Ui::SettingsDialog)
9 this->setWindowTitle("Settings");
10 instructionsDialog = new InstructionsDialog;
13 SettingsDialog::~SettingsDialog()
18 void SettingsDialog::changeEvent(QEvent *e)
20 QDialog::changeEvent(e);
22 case QEvent::LanguageChange:
23 ui->retranslateUi(this);
33 void SettingsDialog::on_pushButtonHelp_clicked()
35 instructionsDialog->show();
41 void SettingsDialog::on_registratePushButton_clicked()
43 // Send username, password and email to SpeedFreak server
44 this->regUsername = ui->regUserNameLineEdit->text();
45 this->regPassword = ui->regPasswordLineEdit->text();
46 this->regEmail = ui->regEMailLineEdit->text();
48 //emit sendregistration();
53 // Next 6 functions can be removed if Settingsdialog is implemented without
54 // own copy of username, password & email
55 void SettingsDialog::setRegUserName(QString username)
57 this->regUsername = username;
60 void SettingsDialog::setRegPassword(QString password)
62 this->regPassword = password;
65 void SettingsDialog::setRegEmail(QString email)
67 this->regEmail = email;
70 QString SettingsDialog::getRegUserName()
72 return this->regUsername;
75 QString SettingsDialog::getRegPassword()
77 return this->regPassword;
80 QString SettingsDialog::getRegEmail()
82 return this->regEmail;
88 void SettingsDialog::on_setUserPushButton_clicked()
90 this->username = ui->setUserUsernameLineEdit->text();
91 this->password = ui->setUserPasswordLineEdit->text();
93 //emit userNameChanged();
97 // Next 4 functions can be removed if Settingsdialog is implemented without
98 // own copy of username & password
99 void SettingsDialog::setUserName(QString username)
101 this->username = username;
104 void SettingsDialog::setPassword(QString password)
106 this->password = password;
109 QString SettingsDialog::getUserName()
111 return this->username;
114 QString SettingsDialog::getPassword()
116 return this->password;