summary refs log tree commit diff
path: root/src/MainWindow.h
diff options
context:
space:
mode:
authorJoseph Donofry <joedonofry@gmail.com>2020-02-28 19:10:39 -0500
committerGitHub <noreply@github.com>2020-02-28 19:10:39 -0500
commit30cb7c5b02bb8a21a8d7257cfe5a8bd3db891606 (patch)
treeddadd16c86600ce937b47798a9b3d5ff2fdec998 /src/MainWindow.h
parentMerge pull request #129 from nico202/master (diff)
parentMerge branch 'master' into 0.7.0-dev (diff)
downloadnheko-30cb7c5b02bb8a21a8d7257cfe5a8bd3db891606.tar.xz
Merge pull request #130 from Nheko-Reborn/0.7.0-dev
0.7.0 dev merge to master
Diffstat (limited to 'src/MainWindow.h')
-rw-r--r--src/MainWindow.h33
1 files changed, 9 insertions, 24 deletions
diff --git a/src/MainWindow.h b/src/MainWindow.h

index 1aadbf4d..e3e04698 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h
@@ -24,16 +24,17 @@ #include <QStackedWidget> #include <QSystemTrayIcon> -#include "LoginPage.h" -#include "RegisterPage.h" #include "UserSettingsPage.h" -#include "WelcomePage.h" #include "dialogs/UserProfile.h" #include "ui/OverlayModal.h" #include "jdenticoninterface.h" class ChatPage; +class RegisterPage; +class LoginPage; +class WelcomePage; + class LoadingIndicator; class OverlayModal; class SnackBar; @@ -62,7 +63,7 @@ class MainWindow : public QMainWindow Q_OBJECT public: - explicit MainWindow(QWidget *parent = 0); + explicit MainWindow(QWidget *parent = nullptr); static MainWindow *instance() { return instance_; }; void saveCurrentWindowSize(); @@ -97,32 +98,16 @@ private slots: void iconActivated(QSystemTrayIcon::ActivationReason reason); //! Show the welcome page in the main window. - void showWelcomePage() - { - removeOverlayProgressBar(); - pageStack_->addWidget(welcome_page_); - pageStack_->setCurrentWidget(welcome_page_); - } + void showWelcomePage(); //! Show the login page in the main window. - void showLoginPage() - { - if (modal_) - modal_->hide(); - - pageStack_->addWidget(login_page_); - pageStack_->setCurrentWidget(login_page_); - } + void showLoginPage(); //! Show the register page in the main window. - void showRegisterPage() - { - pageStack_->addWidget(register_page_); - pageStack_->setCurrentWidget(register_page_); - } + void showRegisterPage(); //! Show user settings page. - void showUserSettingsPage() { pageStack_->setCurrentWidget(userSettingsPage_); } + void showUserSettingsPage(); //! Show the chat page and start communicating with the given access token. void showChatPage();