From 3d82bfc698165bb20f3c38d42f2b77ab855c1edf Mon Sep 17 00:00:00 2001 From: Christian Klinger Date: Thu, 29 Sep 2016 15:40:18 +0200 Subject: astyle. --- src/client/util/platform/blankscreen.h | 16 ++--- src/client/util/platform/blankscreen_Win32.cpp | 82 +++++++++++++------------- src/client/util/platform/blankscreen_X11.cpp | 17 +++--- src/client/util/room.h | 29 +++++---- src/client/util/util.h | 4 +- 5 files changed, 75 insertions(+), 73 deletions(-) mode change 100755 => 100644 src/client/util/platform/blankscreen.h mode change 100755 => 100644 src/client/util/platform/blankscreen_Win32.cpp mode change 100755 => 100644 src/client/util/platform/blankscreen_X11.cpp (limited to 'src/client/util') diff --git a/src/client/util/platform/blankscreen.h b/src/client/util/platform/blankscreen.h old mode 100755 new mode 100644 index e42043c..35cf297 --- a/src/client/util/platform/blankscreen.h +++ b/src/client/util/platform/blankscreen.h @@ -11,16 +11,16 @@ class BlankScreen : public QDialog { Q_OBJECT public: - BlankScreen(); - virtual ~BlankScreen(); - void draw(bool force = false); - bool lock(const QString& message); - bool unlock(); + BlankScreen(); + virtual ~BlankScreen(); + void draw(bool force = false); + bool lock(const QString& message); + bool unlock(); private: - bool _locked; - QString _message; - BlankScreen_Sysdep* _sysdep; + bool _locked; + QString _message; + BlankScreen_Sysdep* _sysdep; }; #endif diff --git a/src/client/util/platform/blankscreen_Win32.cpp b/src/client/util/platform/blankscreen_Win32.cpp old mode 100755 new mode 100644 index 2bba1cf..1d1dd12 --- a/src/client/util/platform/blankscreen_Win32.cpp +++ b/src/client/util/platform/blankscreen_Win32.cpp @@ -1,41 +1,41 @@ - -#include "blankscreen.h" -#include - -struct BlankScreen_Sysdep { - - bool locked; - QWidget* blankwin; - - QString lockMsg; - int blackColor, whiteColor; - int offX, offY; -}; - -BlankScreen::BlankScreen() -{ - _sysdep = new BlankScreen_Sysdep; - _sysdep->blankwin = new QWidget(0, Qt::X11BypassWindowManagerHint | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint); - _sysdep->blankwin->setWindowState(Qt::WindowFullScreen); - _sysdep->blankwin->show(); -} - -BlankScreen::~BlankScreen() -{ - delete _sysdep; -} - -void BlankScreen::draw(bool force) -{ - -} - -bool BlankScreen::lock(const QString& message) -{ - return true; -} - -bool BlankScreen::unlock() -{ - return true; -} + +#include "blankscreen.h" +#include + +struct BlankScreen_Sysdep { + + bool locked; + QWidget* blankwin; + + QString lockMsg; + int blackColor, whiteColor; + int offX, offY; +}; + +BlankScreen::BlankScreen() +{ + _sysdep = new BlankScreen_Sysdep; + _sysdep->blankwin = new QWidget(0, Qt::X11BypassWindowManagerHint | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint); + _sysdep->blankwin->setWindowState(Qt::WindowFullScreen); + _sysdep->blankwin->show(); +} + +BlankScreen::~BlankScreen() +{ + delete _sysdep; +} + +void BlankScreen::draw(bool force) +{ + +} + +bool BlankScreen::lock(const QString& message) +{ + return true; +} + +bool BlankScreen::unlock() +{ + return true; +} diff --git a/src/client/util/platform/blankscreen_X11.cpp b/src/client/util/platform/blankscreen_X11.cpp old mode 100755 new mode 100644 index db8873b..66c9f1f --- a/src/client/util/platform/blankscreen_X11.cpp +++ b/src/client/util/platform/blankscreen_X11.cpp @@ -11,8 +11,7 @@ #include #include -struct BlankScreen_Sysdep -{ +struct BlankScreen_Sysdep { Display *dpy; }; @@ -55,9 +54,9 @@ bool BlankScreen::lock(const QString& message) XGrabPointer(_sysdep->dpy, DefaultRootWindow(_sysdep->dpy) , false, 0, GrabModeAsync, GrabModeAsync, None, 0, CurrentTime); - QProcess ungrabP; - ungrabP.start("/bin/bash", QStringList() << "/opt/openslx/pvs2/kb-lock.sh"); - ungrabP.waitForFinished(); + QProcess ungrabP; + ungrabP.start("/bin/bash", QStringList() << "/opt/openslx/pvs2/kb-lock.sh"); + ungrabP.waitForFinished(); _locked = true; return true; @@ -77,10 +76,10 @@ bool BlankScreen::unlock() XFlush(_sysdep->dpy); - /* start the kb-unlock.sh script */ - QProcess regrabP; - regrabP.start("/bin/bash", QStringList() << "/opt/openslx/pvs2/kb-unlock.sh"); - regrabP.waitForFinished(); + /* start the kb-unlock.sh script */ + QProcess regrabP; + regrabP.start("/bin/bash", QStringList() << "/opt/openslx/pvs2/kb-unlock.sh"); + regrabP.waitForFinished(); _locked = false; return true; diff --git a/src/client/util/room.h b/src/client/util/room.h index bfc70d0..86939f7 100644 --- a/src/client/util/room.h +++ b/src/client/util/room.h @@ -2,22 +2,25 @@ #define ROOM_H struct Room { - QString mgr; - QString name; - int priority; - Room (QString _name, QString _mgr, int _priority) { - mgr = _mgr; - name = _name; - priority = _priority; - }; + QString mgr; + QString name; + int priority; + Room (QString _name, QString _mgr, int _priority) + { + mgr = _mgr; + name = _name; + priority = _priority; + }; }; -inline QDebug operator<<(QDebug debug, const Room& r) { - debug << r.name << "{mgr=" << r.mgr << ",prio=" << r.priority << "}"; - return debug; +inline QDebug operator<<(QDebug debug, const Room& r) +{ + debug << r.name << "{mgr=" << r.mgr << ",prio=" << r.priority << "}"; + return debug; } -inline bool operator<(const Room& a, const Room& b) { - return a.priority < b.priority; +inline bool operator<(const Room& a, const Room& b) +{ + return a.priority < b.priority; } #endif diff --git a/src/client/util/util.h b/src/client/util/util.h index b47d3b1..dc604e8 100644 --- a/src/client/util/util.h +++ b/src/client/util/util.h @@ -26,8 +26,8 @@ QDir settingsDir(); inline QTextStream& qStdout() { - static QTextStream r{stdout}; - return r; + static QTextStream r {stdout}; + return r; } -- cgit v1.2.3-55-g7522