MauiKit Controls
handy.h
48 * Whether the host platform is set as mobile. Either by the `QT_QUICK_CONTROLS_MOBILE` environment variable on, or from the MauiMan form factor mode to mobile.
70 Q_PROPERTY(bool hasTransientTouchInput READ hasTransientTouchInput NOTIFY hasTransientTouchInputChanged)
105 * @note This preference can be set using MauiMan, and it is exposed to the end user via the Maui Settings.
107 * This property allows the user to manually pick between a mobile, tablet or desktop mode. This can be consumed by the applications to position elements in a fitting manner.
120 * Desktop form factor assumes there is a physical mouse and keyboard, and the screen area is wide and spacious.
125 * Tablet form factor assumes a hand held device with touch screen, maybe there is a physical keyboard attached. The screen area is spacious enough still, not as wide as a desktop or as narrow as a mobile phone.
210 * @note This can invoked from QML and the data extracted as `Handy.getClipboard().text` for example.
232 * @param cut whether to add the metadata information necessary for it to be read as a cut operation by third party.
272 * @brief Given a date string, its original format and an intended format, return a readable string
275 * @param initFormat the original date format. This is optional and by default it will try to be auto determined.
278 static QString formatDate(const QString &dateStr, const QString &format = QString("dd/MM/yyyy"), const QString &initFormat = QString());
static QVariantMap getClipboard()
Retrieves the data in the clipboard into a key-value map.
Definition handy.cpp:224
static QString formatTime(const qint64 &value)
Format a milliseconds value to a readable format.
Definition handy.cpp:355
@ Desktop
Desktop form factor assumes there is a physical mouse and keyboard, and the screen area is wide and s...
Definition handy.h:122
@ Tablet
Tablet form factor assumes a hand held device with touch screen, maybe there is a physical keyboard a...
Definition handy.h:127
static QString getClipboardText()
Returns the text contained in the clipboard.
Definition handy.cpp:209
bool singleClick
Whether the system preference is to open/trigger items with a single click.
Definition handy.h:101
static bool copyToClipboard(const QVariantMap &value, const bool &cut=false)
Adds a key-value map to the clipboard.
Definition handy.cpp:259
static QString formatDate(const QString &dateStr, const QString &format=QString("dd/MM/yyyy"), const QString &initFormat=QString())
Given a date string, its original format and an intended format, return a readable string.
Definition handy.cpp:347
static QVariantMap userInfo()
Returns a key-value map containing basic information about the current user.
Definition handy.cpp:200
bool hasTransientTouchInput
Whether the current press input has been received from a touch screen.
Definition handy.h:70
static bool copyTextToClipboard(const QString &text)
Copies a text string to the clipboard.
Definition handy.cpp:290
static QString formatSize(quint64 size)
Format a size value to the a readable locale size format.
Definition handy.cpp:341
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
virtual bool event(QEvent *e)
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri May 2 2025 11:57:11 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri May 2 2025 11:57:11 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.