Kirigami::Platform::TabletModeWatcher
#include <Kirigami/TabletModeWatcher>
Properties | |
bool | tabletMode |
bool | tabletModeAvailable |
Properties inherited from QObject | |
objectName | |
Signals | |
void | tabletModeAvailableChanged (bool tabletModeAvailable) |
void | tabletModeChanged (bool tabletMode) |
Additional Inherited Members | |
Public Attributes inherited from QObject | |
typedef | QObjectList |
Protected Member Functions inherited from QObject | |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
bool | isSignalConnected (const QMetaMethod &signal) const const |
int | receivers (const char *signal) const const |
QObject * | sender () const const |
int | senderSignalIndex () const const |
virtual void | timerEvent (QTimerEvent *event) |
Detailed Description
This class reports on the status of certain transformable devices which can be both tablets and laptops at the same time, with a detachable keyboard.
It reports whether the device supports a tablet mode and if the device is currently in such mode or not, emitting a signal when the user switches.
Definition at line 45 of file tabletmodewatcher.h.
Property Documentation
◆ tabletMode
|
read |
Definition at line 50 of file tabletmodewatcher.h.
◆ tabletModeAvailable
|
read |
Definition at line 49 of file tabletmodewatcher.h.
Constructor & Destructor Documentation
◆ ~TabletModeWatcher()
|
override |
Definition at line 126 of file tabletmodewatcher.cpp.
Member Function Documentation
◆ addWatcher()
Register an arbitrary QObject to send events from this.
At the moment only one event will be sent: TabletModeChangedEvent
Definition at line 146 of file tabletmodewatcher.cpp.
◆ isTabletMode()
bool Kirigami::Platform::TabletModeWatcher::isTabletMode | ( | ) | const |
- Returns
- true if the machine is now in tablet mode, such as the laptop keyboard flipped away or detached. Note that this doesn't mean exactly a tablet form factor, but that the preferred input mode for the device is the touch screen and that pointer and keyboard are either secondary or not available.
For debug purposes, if either the environment variable QT_QUICK_CONTROLS_MOBILE or KDE_KIRIGAMI_TABLET_MODE are set to true, isTabletMode will be true
Definition at line 141 of file tabletmodewatcher.cpp.
◆ isTabletModeAvailable()
bool Kirigami::Platform::TabletModeWatcher::isTabletModeAvailable | ( | ) | const |
- Returns
- true if the device supports a tablet mode and has a switch to report when the device has been transformed. For debug purposes, if either the environment variable QT_QUICK_CONTROLS_MOBILE or KDE_KIRIGAMI_TABLET_MODE are set to true, isTabletModeAvailable will be true
Definition at line 136 of file tabletmodewatcher.cpp.
◆ removeWatcher()
Definition at line 151 of file tabletmodewatcher.cpp.
◆ self()
|
static |
Definition at line 131 of file tabletmodewatcher.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:49:07 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.