The QmlUtils class acts like a bridge for QML code.
More...
#include "framework/ui/internal/QmlUtils.h"
|
enum | StandardIcon {
NoIcon = 0
, Information = 1
, Warning = 2
, Critical = 3
,
Question = 4
} |
|
|
void | blurSourceChanged (QQuickItem *item) |
|
void | bgBlurChanged (QQuickItem *item) |
|
void | menuBarBlurChanged (QQuickItem *item) |
|
void | tabBarBlurChanged (QQuickItem *item) |
|
void | activeFocusItemChanged (void) |
|
void | menuBarReloadTriggered (void) |
|
void | screenKeyboardChanged (bool layoutChanged) |
|
|
Q_DECL_DEPRECATED QQuickItem * | blurSource (void) |
|
Q_DECL_DEPRECATED void | setBlurSource (QQuickItem *item) |
|
QQuickItem * | bgBlur (void) |
|
void | setBgBlur (QQuickItem *item) |
|
QQuickItem * | menuBarBlur (void) |
|
void | setMenuBarBlur (QQuickItem *item) |
|
QQuickItem * | tabBarBlur () const |
|
void | setTabBarBlur (QQuickItem *newTabBarBlur) |
|
QQuickItem * | activeFocusItem (void) |
|
void | setActiveFocusItem (QQuickItem *newActiveFocusItem) |
|
Q_INVOKABLE void | reloadMenuBar (void) |
|
|
QQuickItem * | m_blurSource = nullptr |
|
QQuickItem * | m_bgBlur = nullptr |
|
QQuickItem * | m_menuBarBlur = nullptr |
|
QQuickItem * | m_tabBarBlur = nullptr |
|
QQuickItem * | m_activeFocusItem = nullptr |
|
The QmlUtils class acts like a bridge for QML code.
◆ applicationBuildYear()
int QmlUtils::applicationBuildYear |
( |
void |
| ) |
|
|
static |
Returns build year of the application.
◆ applicationRevision()
QString QmlUtils::applicationRevision |
( |
void |
| ) |
|
|
static |
Returns the application git revision.
Use QCoreApplication::applicationVersion() or Qt.application.version in QML to get the version.
◆ compareQtVersions()
int QmlUtils::compareQtVersions |
( |
int |
major1, |
|
|
int |
minor1, |
|
|
int |
patch1, |
|
|
int |
major2, |
|
|
int |
minor2, |
|
|
int |
patch2 |
|
) |
| |
|
static |
Compares the given Qt versions.
Returns 0 if they're equal, 1 if the first version is greater than the second and -1 - if the first version is less than the second.
◆ convertPixmap()
QString QmlUtils::convertPixmap |
( |
QPixmap |
pixmap | ) |
|
|
staticprivate |
Saves the given pixmap in a string.
◆ createCharacterRecord()
◆ createMistakeRecord()
◆ findFirstControl()
QQuickItem * QmlUtils::findFirstControl |
( |
QQuickItem * |
rootItem | ) |
|
|
static |
Finds the first QML Control in children items of the given item.
- Since
- Open-Typer 5.0.1
◆ fontFamilies()
QStringList QmlUtils::fontFamilies |
( |
bool |
fixedPitch = false | ) |
|
|
static |
Returns list of all (or only fixed pitch) font families.
◆ itemChildren()
QList< QQuickItem * > QmlUtils::itemChildren |
( |
QQuickItem * |
item | ) |
|
|
staticprivate |
Returns children items of the given items, including items in Repeaters (this function doesn't search recursively).
- Since
- Open-Typer 5.1.0
◆ itemHasChild()
bool QmlUtils::itemHasChild |
( |
QQuickItem * |
item, |
|
|
QQuickItem * |
child |
|
) |
| |
|
static |
Returns true if the item has the child (this function searches recursively).
- Since
- Open-Typer 5.0.1
◆ nativeMenuBar()
bool QmlUtils::nativeMenuBar |
( |
void |
| ) |
|
|
static |
Returns true if the application uses native menu bar.
◆ osMac()
bool QmlUtils::osMac |
( |
void |
| ) |
|
|
static |
Returns true if the platform is macOS.
- Since
- Open-Typer 5.0.3
◆ osWasm()
bool QmlUtils::osWasm |
( |
void |
| ) |
|
|
static |
Returns true if the platform is WebAssembly.
◆ osWindows()
bool QmlUtils::osWindows |
( |
void |
| ) |
|
|
static |
Returns true if the platform is Windows.
◆ qtVersionAtLeast()
bool QmlUtils::qtVersionAtLeast |
( |
int |
major, |
|
|
int |
minor, |
|
|
int |
patch |
|
) |
| |
|
static |
Returns true if the Qt version is at least the given version.
◆ qtVersionMajor()
int QmlUtils::qtVersionMajor |
( |
void |
| ) |
|
|
static |
Returns major version of Qt.
◆ qtVersionMinor()
int QmlUtils::qtVersionMinor |
( |
void |
| ) |
|
|
static |
Returns minor version of Qt.
◆ qtVersionPatch()
int QmlUtils::qtVersionPatch |
( |
void |
| ) |
|
|
static |
Returns patch version of Qt.
◆ reloadMenuBar()
void QmlUtils::reloadMenuBar |
( |
void |
| ) |
|
Reloads the menu bar (e. g. after language change).
◆ restartApplication()
void QmlUtils::restartApplication |
( |
void |
| ) |
|
|
static |
Restarts the application.
◆ standardIcon()
QPixmap QmlUtils::standardIcon |
( |
QmlUtils::StandardIcon |
icon | ) |
|
|
static |
Returns the given message box standard icon.
◆ standardIconStr()
QString QmlUtils::standardIconStr |
( |
StandardIcon |
icon | ) |
|
|
static |
Returns the given message box standard icon as a string loadable from QML.
- See also
- standardIcon().
◆ tabBarBlur()
QQuickItem * QmlUtils::tabBarBlur |
( |
| ) |
const |
QML tab bar blur item.
- Since
- Open-Typer 5.2.0
◆ translateStandardButton()
QString QmlUtils::translateStandardButton |
( |
QString |
buttonText | ) |
|
|
static |
Returns translated standard button text.
◆ activeFocusItem
QQuickItem * QmlUtils::activeFocusItem |
|
readwrite |
Same as Window.activeFocusItem.
- Since
- Open-Typer 5.0.1
◆ bgBlur
QQuickItem * QmlUtils::bgBlur |
|
readwrite |
QML background blur.
- Since
- Open-Typer 5.1.0
◆ blurSource
QQuickItem * QmlUtils::blurSource |
|
readwrite |
Returns QML background blur source.
- Deprecated:
- Use the bgBlur property to set a custom blur item.
◆ menuBarBlur
QQuickItem * QmlUtils::menuBarBlur |
|
readwrite |
The documentation for this class was generated from the following files:
- src/framework/ui/internal/QmlUtils.h
- src/framework/ui/internal/QmlUtils.cpp