summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication.h
diff options
context:
space:
mode:
authorAleix Pol <aleixpol@kde.org>2015-09-04 16:52:04 +0200
committerAleix Pol Gonzalez <aleixpol@kde.org>2015-09-08 08:16:51 +0000
commit8cbaea441a8c9adea6ba804b76bf3bd1e79f77b7 (patch)
tree82cba3c4f6b40066beffb87ff0a8b8514378c7a3 /src/gui/kernel/qguiapplication.h
parentfd2067b67bc2da7d7ee53ca2cadc9f6b81971fc0 (diff)
Notify when the primary screen changes
Makes it possible to notify that the QGuiApplication::primaryScreen has changed. XCB backend adopts the new API, as it was accessing QGuiApplication private API directly. Change-Id: Icde05c44138265f865fa42d2cd6974c552fdc5e2 Task-number: QTBUG-38404 Task-number: QTBUG-40659 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Diffstat (limited to 'src/gui/kernel/qguiapplication.h')
-rw-r--r--src/gui/kernel/qguiapplication.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qguiapplication.h b/src/gui/kernel/qguiapplication.h
index c89268d8d4..d995387d66 100644
--- a/src/gui/kernel/qguiapplication.h
+++ b/src/gui/kernel/qguiapplication.h
@@ -70,6 +70,7 @@ class Q_GUI_EXPORT QGuiApplication : public QCoreApplication
Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection NOTIFY layoutDirectionChanged)
Q_PROPERTY(QString platformName READ platformName STORED false)
Q_PROPERTY(bool quitOnLastWindowClosed READ quitOnLastWindowClosed WRITE setQuitOnLastWindowClosed)
+ Q_PROPERTY(QScreen *primaryScreen READ primaryScreen NOTIFY primaryScreenChanged STORED false)
public:
#ifdef Q_QDOC
@@ -158,6 +159,7 @@ Q_SIGNALS:
void fontDatabaseChanged();
void screenAdded(QScreen *screen);
void screenRemoved(QScreen *screen);
+ void primaryScreenChanged(QScreen *screen);
void lastWindowClosed();
void focusObjectChanged(QObject *focusObject);
void focusWindowChanged(QWindow *focusWindow);