-
Notifications
You must be signed in to change notification settings - Fork 0
/
signupwindow.h
60 lines (44 loc) · 1.64 KB
/
signupwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*! \class SignUpWindow
* \brief This class controls the signupwindow.ui UI.
* */
#ifndef SIGNUP_H
#define SIGNUP_H
#include "userdatabasemanager.h"
#include "loginwindow.h"
#include <QWidget>
#include <QMainWindow>
#include <QSqlQuery>
#include <QString>
namespace Ui {
class SignUpWindow;
}
class SignUpWindow : public QWidget
{
Q_OBJECT
public:
SignUpWindow(QWidget *parent = 0); /*!<Assigns the UI.*/
~SignUpWindow(); /*!<Deletes the signupwindow.ui UI.*/
signals:
void signUpAddUserSignal(int id); /*!<Signal emitted when a new user has been added to the database.*/
void singUpCancelSignUp(); /*!<Signal emitted when the signUpCancelButton button has been pressed.*/
private slots:
void on_signUpSingUpButton_clicked(); /*!<Slot triggered when the signUpSingUpButton has been pressed. Calls to insertNewUser() if all the mandatory fields are filled and the username is available. Otherwise,set a message using signUpOutPutLabel.*/
void on_signUpCancelButton_clicked(); /*!<Slot triggered when the signUpCancelButton has been pressed. Emits the signal singUpCancelSignUp().*/
private:
void insertNewUser(); /*!<Uses the UserDataBaseManager.userDatabaseInsert method to insert a new user with the data provided in the SignUpWindow.*/
QString userName;
QString password;
QString full_name;
QString address;
QString phone_number;
QString email;
QString payment_method;
QString card_number;
QString cvv;
QString expiration_date;
UserDataBaseManager signUpDatabaseManager;
QSqlQuery signUpQuery;
LoginWindow *loginWindow;
Ui::SignUpWindow *ui;
};
#endif // SIGNUP_H