diff options
author | Christian Klinger | 2016-09-26 11:45:35 +0200 |
---|---|---|
committer | Christian Klinger | 2016-09-26 11:45:35 +0200 |
commit | f9d165687aac7423c86554b7e73ade99f9e1f3ea (patch) | |
tree | 27a8d541e2c510a09292d7240fb64f38f11218fc /src/server/util/global.h | |
parent | removed USER_SETTINGS etc. (diff) | |
download | pvs2-f9d165687aac7423c86554b7e73ade99f9e1f3ea.tar.gz pvs2-f9d165687aac7423c86554b7e73ade99f9e1f3ea.tar.xz pvs2-f9d165687aac7423c86554b7e73ade99f9e1f3ea.zip |
added the --config=FILE parameter and got rid of the SETTINGS macro.
Diffstat (limited to 'src/server/util/global.h')
-rw-r--r-- | src/server/util/global.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/server/util/global.h b/src/server/util/global.h index 08ec00a..6ab1c42 100644 --- a/src/server/util/global.h +++ b/src/server/util/global.h @@ -12,9 +12,11 @@ #include <QByteArray> #include <QMap> #include <QPair> +#include <QSettings> #include <QPoint> #include <QSize> #include <QList> +#include <QSharedPointer> struct Room { Room(QMap<QString, QPoint> cPos, QSize grid, QSize client, QString image, QString tutor) : @@ -41,6 +43,7 @@ private: static QString _currentRoom; static bool _isExam; + static QString _iniPath; public: static const QString& sessionName() { return Global::_sessionName; } @@ -55,11 +58,16 @@ public: return _rooms; } + static void setIniPath(QString s) {_iniPath = s;}; + static QString getIniPath() { return _iniPath; }; + static QSharedPointer<QSettings> getSettings(); + static bool isExam() { return _isExam; } static void setExam(bool b) { _isExam = b; } static void setCurrentRoom(QString room); static const QString& getCurrentRoomName() { return _currentRoom; } + /* returns a pointer to the current room or a pointer to the constant "defaultRoom". * (NEVER returns NULL or undefined) */ static const Room* getCurrentRoom(); |