diff --git a/src/widget/loginscreen.cpp b/src/widget/loginscreen.cpp index 215d1752f..41154371e 100644 --- a/src/widget/loginscreen.cpp +++ b/src/widget/loginscreen.cpp @@ -6,9 +6,34 @@ LoginScreen::LoginScreen(QWidget *parent) : ui(new Ui::LoginScreen) { ui->setupUi(this); + + connect(ui->newProfilePgbtn, &QPushButton::clicked, this, &LoginScreen::onNewProfilePageClicked); + connect(ui->loginPgbtn, &QPushButton::clicked, this, &LoginScreen::onLoginPageClicked); + connect(ui->createAccountButton, &QPushButton::clicked, this, &LoginScreen::onCreateNewProfile); + connect(ui->loginButton, &QPushButton::clicked, this, &LoginScreen::onLogin); } LoginScreen::~LoginScreen() { delete ui; } + +void LoginScreen::onNewProfilePageClicked() +{ + ui->stackedWidget->setCurrentIndex(0); +} + +void LoginScreen::onLoginPageClicked() +{ + ui->stackedWidget->setCurrentIndex(1); +} + +void LoginScreen::onCreateNewProfile() +{ + +} + +void LoginScreen::onLogin() +{ + +} diff --git a/src/widget/loginscreen.h b/src/widget/loginscreen.h index a0745c862..a11ad10ee 100644 --- a/src/widget/loginscreen.h +++ b/src/widget/loginscreen.h @@ -15,6 +15,14 @@ public: explicit LoginScreen(QWidget *parent = 0); ~LoginScreen(); +private slots: + // Buttons to change page + void onNewProfilePageClicked(); + void onLoginPageClicked(); + // Buttons to submit form + void onCreateNewProfile(); + void onLogin(); + private: Ui::LoginScreen *ui; }; diff --git a/src/widget/loginscreen.ui b/src/widget/loginscreen.ui index 7ace820ca..6f89a245f 100644 --- a/src/widget/loginscreen.ui +++ b/src/widget/loginscreen.ui @@ -366,7 +366,7 @@ margin-bottom:45px; - + @@ -714,7 +714,7 @@ margin-bottom:5px; - + @@ -972,7 +972,7 @@ background-color:#6cc865; Qt::Horizontal - + 25 @@ -994,7 +994,7 @@ background-color:#6cc865; true - + 25