summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qinputdevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qinputdevice.cpp')
-rw-r--r--src/gui/kernel/qinputdevice.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/gui/kernel/qinputdevice.cpp b/src/gui/kernel/qinputdevice.cpp
index d64f2c4ddc..5c1e433ef5 100644
--- a/src/gui/kernel/qinputdevice.cpp
+++ b/src/gui/kernel/qinputdevice.cpp
@@ -113,6 +113,29 @@ QInputDevice::QInputDevice(QInputDevicePrivate &d, QObject *parent)
}
/*!
+ Returns the region within the \l{QScreen::availableVirtualGeometry}{virtual desktop}
+ that this device can access.
+
+ For example a \l {QInputDevice::DeviceType::TouchScreen}{TouchScreen} input
+ device is fixed in place upon a single physical screen, and usually
+ calibrated so that this area is the same as QScreen::geometry(); whereas a
+ \l {QInputDevice::DeviceType::Mouse}{Mouse} can probably access all screens
+ on the virtual desktop. A Wacom graphics tablet may be configured in a way
+ that it's mapped to all screens, or only to the screen where the user
+ prefers to create drawings, or to the window in which drawing occurs.
+ A \l {QInputDevice::DeviceType::Stylus}{Stylus} device that is integrated
+ with a touchscreen may be physically limited to that screen.
+
+ If the returned rectangle is \l {null}{QRect::isNull()}, it means this device
+ can access the entire virtual desktop.
+*/
+QRect QInputDevice::availableVirtualGeometry() const
+{
+ Q_D(const QInputDevice);
+ return d->availableVirtualGeometry;
+}
+
+/*!
Returns the device name.
This string may be empty. It is however useful on systems that have