diff options
Diffstat (limited to 'src/widget.h')
-rw-r--r-- | src/widget.h | 49 |
1 files changed, 12 insertions, 37 deletions
diff --git a/src/widget.h b/src/widget.h index 6e8d7d6..05e27a6 100644 --- a/src/widget.h +++ b/src/widget.h @@ -1,57 +1,32 @@ -// Copyright 2013, University of Freiburg, -// Author: Manuel Schneider <ms1144> - #ifndef WIDGET_H #define WIDGET_H -#include <QtWidgets> // for Qt5 +#include <QWidget> // for Qt5 #include <QDebug> -#include <X11/Xlib.h> -#include <X11/extensions/Xrandr.h> - namespace Ui { class Widget; } class Widget : public QWidget { - typedef QSet<RRMode> ModeSet; - typedef QSet<RRCrtc> CrtcSet; - typedef QSet<RROutput> OutputSet; - - typedef QList<RRMode> ModeList; - typedef QList<RRCrtc> CrtcList; - typedef QList<RROutput> OutputList; + Q_OBJECT - typedef QMap<RRMode, XRRModeInfo*> ModeMap; - typedef QMap<RRCrtc, XRRCrtcInfo*> CrtcMap; - typedef QMap<RROutput, XRROutputInfo*> OutputMap; - - Q_OBJECT - public: + explicit Widget(QWidget *parent = nullptr); + ~Widget(); - explicit Widget(bool testMode, QWidget *parent = 0); - ~Widget(); +protected: + virtual void showEvent(QShowEvent *event); - private slots: - void handleButton(); - void bringToTopTimer(); +private slots: + void handleButton(); + void bringToTopTimer(); private: - void timeout(); - void updateScreenResources(); - bool cloneMode(); - - Ui::Widget * _ui; - Display* _display; - XRRScreenResources* _screenResources; - ModeMap _modeMap; - CrtcMap _crtcMap; - OutputMap _outputMap; - OutputList _connectedOutputList; - RROutput _beamer, _monitor; + Ui::Widget *_ui; + + void initControls(); }; #endif // WIDGET_H |