summary refs log tree commit diff
path: root/include/LoginPage.h
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-04-11 17:45:47 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-04-11 17:45:47 +0300
commit6468faa39eda494d83310bec4a557d29bf037f8a (patch)
treec4a2632730c99500871fbc3a8f5d746585507089 /include/LoginPage.h
parentMake the timer single shot (diff)
downloadnheko-6468faa39eda494d83310bec4a557d29bf037f8a.tar.xz
Use only a MatrixClient as a shared pointer
Diffstat (limited to 'include/LoginPage.h')
-rw-r--r--include/LoginPage.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/LoginPage.h b/include/LoginPage.h

index a431a41e..8ed54def 100644 --- a/include/LoginPage.h +++ b/include/LoginPage.h
@@ -20,11 +20,13 @@ #include <QHBoxLayout> #include <QLabel> +#include <QSharedPointer> #include <QVBoxLayout> #include <QWidget> #include "FlatButton.h" #include "InputValidator.h" +#include "MatrixClient.h" #include "RaisedButton.h" #include "TextField.h" @@ -33,7 +35,7 @@ class LoginPage : public QWidget Q_OBJECT public: - explicit LoginPage(QWidget *parent = 0); + LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent = 0); ~LoginPage(); void reset(); @@ -41,14 +43,6 @@ public: signals: void backButtonClicked(); - // Emitted after the matrix ID validation. The handler should be - // responsible for performing the actual login with a remote server. - void userLogin(const QString &username, const QString &password, const QString home_server); - -public slots: - // Displays errors produced during the login. - void loginError(QString error_message); - private slots: // Callback for the back button. void onBackButtonClicked(); @@ -56,6 +50,9 @@ private slots: // Callback for the login button. void onLoginButtonClicked(); + // Displays errors produced during the login. + void loginError(QString error_message); + private: QVBoxLayout *top_layout_; @@ -77,6 +74,9 @@ private: TextField *password_input_; InputValidator *matrix_id_validator_; + + // Matrix client API provider. + QSharedPointer<MatrixClient> client_; }; #endif // LOGINPAGE_H