diff options
Diffstat (limited to 'src/client/clientapp/clientapp.h')
-rw-r--r-- | src/client/clientapp/clientapp.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/client/clientapp/clientapp.h b/src/client/clientapp/clientapp.h index 31b2399..8a7fd83 100644 --- a/src/client/clientapp/clientapp.h +++ b/src/client/clientapp/clientapp.h @@ -1,7 +1,7 @@ #include<QApplication> -#include "../toolbar/toolbar.h" #include "../util/util.h" - +#include <QSharedPointer> +#include <QSettings> /* define a macro `clientApp` that can be used anywhere in the program and returns a reference to the current ClientApp instance */ #if defined(clientApp) @@ -9,6 +9,10 @@ #endif #define clientApp (static_cast<ClientApp*>(QCoreApplication::instance())) +class Toolbar; +class ConnectWindow; +class ServerConnection; + /* this class is supposed to (after complete refactoring) to encapsulate all * state of the application. At the moment, the state is distributed within * several widgets. With this class information access will also be easier as @@ -27,6 +31,8 @@ private: bool _examMode; QString _sessionName; /* only set when _connectionMode == Session */ Toolbar* _toolbar; + ConnectWindow* _connectWindow; + ServerConnection* _connection; QStringList _arguments; QString _iniPath; bool _isManagerPc; @@ -45,5 +51,15 @@ public: QSharedPointer<QSettings> getSettings(); + ServerConnection* connection() const { return _connection; } + + ConnectWindow* connectWindow() const { return _connectWindow; } + const bool isManagerPc() const { return _isManagerPc; } + +private slots: + + void connected(ServerConnection* connection); + void disconnected(ServerConnection* connection); + }; |