1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Connect LoginScreen signals

This commit is contained in:
tux3 2015-06-03 19:28:16 +02:00
parent 6b5f0e6ad7
commit c6268cd604
3 changed files with 37 additions and 4 deletions

View File

@ -6,9 +6,34 @@ LoginScreen::LoginScreen(QWidget *parent) :
ui(new Ui::LoginScreen) ui(new Ui::LoginScreen)
{ {
ui->setupUi(this); 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() LoginScreen::~LoginScreen()
{ {
delete ui; delete ui;
} }
void LoginScreen::onNewProfilePageClicked()
{
ui->stackedWidget->setCurrentIndex(0);
}
void LoginScreen::onLoginPageClicked()
{
ui->stackedWidget->setCurrentIndex(1);
}
void LoginScreen::onCreateNewProfile()
{
}
void LoginScreen::onLogin()
{
}

View File

@ -15,6 +15,14 @@ public:
explicit LoginScreen(QWidget *parent = 0); explicit LoginScreen(QWidget *parent = 0);
~LoginScreen(); ~LoginScreen();
private slots:
// Buttons to change page
void onNewProfilePageClicked();
void onLoginPageClicked();
// Buttons to submit form
void onCreateNewProfile();
void onLogin();
private: private:
Ui::LoginScreen *ui; Ui::LoginScreen *ui;
}; };

View File

@ -366,7 +366,7 @@ margin-bottom:45px;</string>
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QPushButton" name="pushButton"> <widget class="QPushButton" name="createAccountButton">
<property name="palette"> <property name="palette">
<palette> <palette>
<active> <active>
@ -714,7 +714,7 @@ margin-bottom:5px;</string>
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QPushButton" name="pushButton_2"> <widget class="QPushButton" name="loginButton">
<property name="palette"> <property name="palette">
<palette> <palette>
<active> <active>
@ -972,7 +972,7 @@ background-color:#6cc865;</string>
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
<widget class="QPushButton" name="pushButton_3"> <widget class="QPushButton" name="newProfilePgbtn">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>25</x> <x>25</x>
@ -994,7 +994,7 @@ background-color:#6cc865;</string>
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton" name="pushButton_4"> <widget class="QPushButton" name="loginPgbtn">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>25</x> <x>25</x>