summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformscreen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qplatformscreen.cpp')
-rw-r--r--src/gui/kernel/qplatformscreen.cpp88
1 files changed, 88 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformscreen.cpp b/src/gui/kernel/qplatformscreen.cpp
index 1d519e84f9..e22037c1e9 100644
--- a/src/gui/kernel/qplatformscreen.cpp
+++ b/src/gui/kernel/qplatformscreen.cpp
@@ -280,6 +280,45 @@ QPlatformScreen * QPlatformScreen::platformScreenForWindow(const QWindow *window
}
/*!
+ Reimplement this function in subclass to return the manufacturer
+ of this screen.
+
+ The default implementation returns an empty string.
+
+ \since 5.9
+*/
+QString QPlatformScreen::manufacturer() const
+{
+ return QString();
+}
+
+/*!
+ Reimplement this function in subclass to return the model
+ of this screen.
+
+ The default implementation returns an empty string.
+
+ \since 5.9
+*/
+QString QPlatformScreen::model() const
+{
+ return QString();
+}
+
+/*!
+ Reimplement this function in subclass to return the serial number
+ of this screen.
+
+ The default implementation returns an empty string.
+
+ \since 5.9
+*/
+QString QPlatformScreen::serialNumber() const
+{
+ return QString();
+}
+
+/*!
\class QPlatformScreen
\since 4.8
\internal
@@ -494,4 +533,53 @@ void QPlatformScreen::setPowerState(PowerState state)
Q_UNUSED(state);
}
+/*!
+ Reimplement this function in subclass to return the list
+ of modes for this screen.
+
+ The default implementation returns a list with
+ only one mode from the current screen size and refresh rate.
+
+ \sa QPlatformScreen::geometry
+ \sa QPlatformScreen::refreshRate
+
+ \since 5.9
+*/
+QVector<QPlatformScreen::Mode> QPlatformScreen::modes() const
+{
+ QVector<QPlatformScreen::Mode> list;
+ list.append({geometry().size(), refreshRate()});
+ return list;
+}
+
+/*!
+ Reimplement this function in subclass to return the
+ index of the current mode from the modes list.
+
+ The default implementation returns 0.
+
+ \sa QPlatformScreen::modes
+
+ \since 5.9
+*/
+int QPlatformScreen::currentMode() const
+{
+ return 0;
+}
+
+/*!
+ Reimplement this function in subclass to return the preferred
+ mode index from the modes list.
+
+ The default implementation returns 0.
+
+ \sa QPlatformScreen::modes
+
+ \since 5.9
+*/
+int QPlatformScreen::preferredMode() const
+{
+ return 0;
+}
+
QT_END_NAMESPACE