Add spinner to hide uninitialized layout after login

This commit is contained in:
Konstantinos Sideris 2017-04-26 02:23:12 +03:00
parent 58936cd67b
commit 415ef7e9c7
9 changed files with 494 additions and 9 deletions

View file

@ -22,8 +22,10 @@
#include <QSharedPointer>
#include "ChatPage.h"
#include "CircularProgress.h"
#include "LoginPage.h"
#include "MatrixClient.h"
#include "OverlayModal.h"
#include "RegisterPage.h"
#include "SlidingStackWidget.h"
#include "WelcomePage.h"
@ -41,7 +43,7 @@ public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
public slots:
private slots:
// Show the welcome page in the main window.
void showWelcomePage();
@ -54,6 +56,8 @@ public slots:
// Show the chat page and start communicating with the given access token.
void showChatPage(QString user_id, QString home_server, QString token);
void removeOverlayProgressBar();
private:
// The UI component of the main window.
Ui::MainWindow *ui_;
@ -73,6 +77,10 @@ private:
// The main chat area.
ChatPage *chat_page_;
// Used to hide undefined states between page transitions.
OverlayModal *progress_modal_;
CircularProgress *spinner_;
// Matrix Client API provider.
QSharedPointer<MatrixClient> client_;
};