summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-05-09 13:25:43 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-05-09 13:25:43 +0300
commit1f10403aced418beea3febc4c23cc7804847474e (patch)
tree60d275475834c12745a2b23ed0e86be4a1e7449c /include
parentInitial support for display names (diff)
downloadnheko-1f10403aced418beea3febc4c23cc7804847474e.tar.xz
Add settings panel for homeserver's domain
Diffstat (limited to 'include')
-rw-r--r--include/LoginPage.h13
-rw-r--r--include/LoginSettings.h40
-rw-r--r--include/ui/OverlayModal.h1
3 files changed, 53 insertions, 1 deletions
diff --git a/include/LoginPage.h b/include/LoginPage.h

index 8ed54def..8a44ef7a 100644 --- a/include/LoginPage.h +++ b/include/LoginPage.h
@@ -26,7 +26,9 @@ #include "FlatButton.h" #include "InputValidator.h" +#include "LoginSettings.h" #include "MatrixClient.h" +#include "OverlayModal.h" #include "RaisedButton.h" #include "TextField.h" @@ -53,10 +55,14 @@ private slots: // Displays errors produced during the login. void loginError(QString error_message); + // Manipulate settings modal. + void showSettingsModal(); + void closeSettingsModal(const QString &server); + private: QVBoxLayout *top_layout_; - QHBoxLayout *back_layout_; + QHBoxLayout *top_bar_layout_; QHBoxLayout *logo_layout_; QHBoxLayout *button_layout_; @@ -64,6 +70,7 @@ private: QLabel *error_label_; FlatButton *back_button_; + FlatButton *advanced_settings_button_; RaisedButton *login_button_; QWidget *form_widget_; @@ -73,6 +80,10 @@ private: TextField *matrixid_input_; TextField *password_input_; + OverlayModal *settings_modal_; + LoginSettings *login_settings_; + QString custom_domain_; + InputValidator *matrix_id_validator_; // Matrix client API provider. diff --git a/include/LoginSettings.h b/include/LoginSettings.h new file mode 100644
index 00000000..3fc00488 --- /dev/null +++ b/include/LoginSettings.h
@@ -0,0 +1,40 @@ +/* + * nheko Copyright (C) 2017 Konstantinos Sideris <siderisk@auth.gr> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef LOGIN_SETTINGS_H +#define LOGIN_SETTINGS_H + +#include <QFrame> + +#include "FlatButton.h" +#include "TextField.h" + +class LoginSettings : public QFrame +{ + Q_OBJECT +public: + explicit LoginSettings(QWidget *parent = nullptr); + +signals: + void closing(const QString &server); + +private: + TextField *input_; + FlatButton *submit_button_; +}; + +#endif // LOGIN_SETTINGS_H diff --git a/include/ui/OverlayModal.h b/include/ui/OverlayModal.h
index aff93d02..d90eccea 100644 --- a/include/ui/OverlayModal.h +++ b/include/ui/OverlayModal.h
@@ -50,6 +50,7 @@ private: inline void OverlayModal::setDuration(int duration) { duration_ = duration; + animation_->setDuration(duration_); } inline void OverlayModal::setColor(QColor color)