From 6decac6613fef21869784df0d83a0b7c7d1c2008 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 28 Oct 2016 16:14:07 +0200 Subject: [client] Allow ESC key to cancel projection in hybrid mode --- src/client/clientapp/clientapp.cpp | 2 +- src/client/clientapp/clientapp.h | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src/client/clientapp') diff --git a/src/client/clientapp/clientapp.cpp b/src/client/clientapp/clientapp.cpp index 5528c65..7711556 100644 --- a/src/client/clientapp/clientapp.cpp +++ b/src/client/clientapp/clientapp.cpp @@ -5,7 +5,7 @@ #include "../net/serverconnection.h" ClientApp::ClientApp(int& argc, char** argv) - : QApplication(argc, argv), _connectionMode(ConnectionMode::None), _examMode(false), _isManagerPc(false) + : QApplication(argc, argv), _connectionMode(ConnectionMode::None), _examMode(false), _connection(NULL), _isManagerPc(false) { /* some values */ setOrganizationName("openslx"); diff --git a/src/client/clientapp/clientapp.h b/src/client/clientapp/clientapp.h index 8a7fd83..dbfbc32 100644 --- a/src/client/clientapp/clientapp.h +++ b/src/client/clientapp/clientapp.h @@ -1,5 +1,7 @@ -#include #include "../util/util.h" +#include "../net/serverconnection.h" + +#include #include #include @@ -11,7 +13,6 @@ 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 @@ -55,7 +56,9 @@ public: ConnectWindow* connectWindow() const { return _connectWindow; } - const bool isManagerPc() const { return _isManagerPc; } + const bool isConfiguredAsManager() const { return _isManagerPc; } + + const bool isConnectedToLocalManager() const { return _connection != NULL && _connection->isLocalConnection(); } private slots: -- cgit v1.2.3-55-g7522