diff options
author | Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | 2016-12-13 20:23:55 +0100 |
---|---|---|
committer | Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org> | 2017-01-16 07:46:39 +0000 |
commit | abb47fc6803a3246b67ca6c8357f34ebd0b3e9cc (patch) | |
tree | 25de33d8bca4d8c7c542e77433a96adf7a9bbf69 /src/gui/kernel/qscreen.cpp | |
parent | 3b0cd132225504f36bc355f239cde95a9bac0985 (diff) |
Add screen product information
Add new methods to QPlatformScreen that platform plugins can reimplement
in order to provide more information such as vendor, model and serial
number.
Expose that information as QScreen properties.
A use-case for this feature is a Wayland compositor that maps screens
to Wayland outputs hence it needs to replicate the information.
This information can also be added to the diagnostic output of qtdiag.
[ChangeLog][QtGui][QScreen] Add manufacturer, model and serialNumber
properties.
Change-Id: Ia6945f41023340602ef9d618e0d833a0c1825ab3
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/gui/kernel/qscreen.cpp')
-rw-r--r-- | src/gui/kernel/qscreen.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/gui/kernel/qscreen.cpp b/src/gui/kernel/qscreen.cpp index 1dd8fb5e67..96f75f37eb 100644 --- a/src/gui/kernel/qscreen.cpp +++ b/src/gui/kernel/qscreen.cpp @@ -161,6 +161,42 @@ QString QScreen::name() const } /*! + \property QScreen::manufacturer + \brief the manufacturer of the screen + + \since 5.9 +*/ +QString QScreen::manufacturer() const +{ + Q_D(const QScreen); + return d->platformScreen->manufacturer(); +} + +/*! + \property QScreen::model + \brief the model of the screen + + \since 5.9 +*/ +QString QScreen::model() const +{ + Q_D(const QScreen); + return d->platformScreen->model(); +} + +/*! + \property QScreen::serialNumber + \brief the serial number of the screen + + \since 5.9 +*/ +QString QScreen::serialNumber() const +{ + Q_D(const QScreen); + return d->platformScreen->serialNumber(); +} + +/*! \property QScreen::depth \brief the color depth of the screen */ |