From 3601d6d7e3b029dbbfafe2c991537905241016d7 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Fri, 4 Sep 2015 17:20:19 +0200 Subject: Document QGuiApplication::primaryScreen property MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was just documented as a method and signal so far, even though it already was a property. This patch merges both documentations into one. Change-Id: I3fb4090b773ba8762ad9e830303812887b75add3 Reviewed-by: Frederik Gladhorn Reviewed-by: Topi Reiniƶ --- src/gui/kernel/qguiapplication.cpp | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 87bd7ea5de..fc87759227 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -875,16 +875,6 @@ QWindowList QGuiApplication::topLevelWindows() return topLevelWindows; } -/*! - Returns the primary (or default) screen of the application, or null if there is none - - This will be the screen where QWindows are initially shown, unless otherwise specified. - - On some platforms, it may be null when there are actually no screens connected. - It is not possible to start a new QGuiApplication while there are no screens. - Applications which were running at the time the primary screen was removed - will stop rendering graphics until one or more screens are restored. -*/ QScreen *QGuiApplication::primaryScreen() { if (QGuiApplicationPrivate::screen_list.isEmpty()) @@ -906,7 +896,7 @@ QList QGuiApplication::screens() This signal is emitted whenever a new screen \a screen has been added to the system. - \sa screens(), primaryScreen(), screenRemoved() + \sa screens(), primaryScreen, screenRemoved() */ /*! @@ -921,18 +911,23 @@ QList QGuiApplication::screens() \since 5.4 */ + /*! - \fn void QGuiApplication::primaryScreenChanged(QScreen *screen) + \property QGuiApplication::primaryScreen - This signal is emitted whenever the primary \a screen changes. This way - applications can keep track of the primaryScreen and react if there is a - new primary screen. + \brief the primary (or default) screen of the application, or null if there is none. - \sa primaryScreen + This will be the screen where QWindows are initially shown, unless otherwise specified. - \since 5.6 -*/ + On some platforms, it may be null when there are actually no screens connected. + It is not possible to start a new QGuiApplication while there are no screens. + Applications which were running at the time the primary screen was removed + will stop rendering graphics until one or more screens are restored. + The primaryScreenChanged signal was introduced in Qt 5.6. + + \sa screens() +*/ /*! Returns the highest screen device pixel ratio found on -- cgit v1.2.3