summaryrefslogtreecommitdiffstats
path: root/src/xx.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/xx.h')
-rw-r--r--src/xx.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/xx.h b/src/xx.h
index a17d4b7..ff0ea11 100644
--- a/src/xx.h
+++ b/src/xx.h
@@ -7,6 +7,7 @@
struct ScreenInfo;
class XPrivate;
+class QSocketNotifier;
typedef QVector<QSize> ResolutionVector;
@@ -31,8 +32,16 @@ struct ScreenInfo
ResolutionVector modes;
};
-class ScreenSetup
+enum class ConnectionEvent
{
+ Connected,
+ Disconnected,
+ Unknown,
+};
+
+class ScreenSetup : public QObject
+{
+ Q_OBJECT
public:
void updateScreenResources();
void initModes();
@@ -44,6 +53,7 @@ public:
bool setCustom(const QList<QPair<QSize, QList<QString>>> &list);
ResolutionVector getCommonModes() const;
int getOutputCount() const;
+ int queryCurrentOutputCount() const;
QMap<QString, ScreenInfo> getScreenPositions() const;
const ResolutionVector &getVirtualResolutions() const;
@@ -59,6 +69,10 @@ private:
static ScreenSetup * _instance;
XPrivate *a;
+ QSocketNotifier *_socketNotifier;
+signals:
+ void outputConfigChanged(ConnectionEvent event);
+
};
///////////////////////////////////////////////////////////////////////////