Settings dialog changed. Log in/Log out functionality improved.
[speedfreak] / Client / settingsdialog.h
1 /*
2  * SettingsDialog class
3  *
4  * @author     Olavi Pulkkinen <olavi.pulkkinen@fudeco.com>
5  * @copyright  (c) 2010 Speed Freak team
6  * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
7  */
8
9 #ifndef SETTINGSDIALOG_H
10 #define SETTINGSDIALOG_H
11
12 #include <QDialog>
13
14 #include "instructionsdialog.h"
15
16 namespace Ui {
17     class SettingsDialog;
18 }
19
20 class SettingsDialog : public QDialog {
21     Q_OBJECT
22 public:
23     SettingsDialog(QWidget *parent = 0);
24     ~SettingsDialog();
25     void setRegUserName(QString username);
26     void setRegPassword(QString password);
27     void setRegEmail(QString email);
28     QString getRegUserName();
29     QString getRegPassword();
30     QString getRegEmail();
31     void setUserName(QString username);
32     void setPassword(QString password);
33     QString getUserName();
34     QString getPassword();
35     void setLabelInfoToUser(QString infoText);
36     void usernameOk(bool isOk);
37
38 signals:
39     void sendregistration();
40     void userNameChanged();
41     void logout();
42
43 protected:
44     void changeEvent(QEvent *e);
45
46 private:
47     Ui::SettingsDialog *ui;
48     QString regUsername;
49     QString regPassword;
50     QString regEmail;
51     QString username;
52     QString password;
53
54 private slots:
55     void on_setUserPushButton_clicked();
56     void on_registratePushButton_clicked();
57 };
58
59 #endif // SETTINGSDIALOG_H