RhythmGame 1.4.3
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | Properties | List of all members
qml_components::QmlUtilsAttached Class Reference

Provides utility functions for QML as an attached property. More...

#include <QmlUtils.h>

Inheritance diagram for qml_components::QmlUtilsAttached:
Inheritance graph
[legend]
Collaboration diagram for qml_components::QmlUtilsAttached:
Collaboration graph
[legend]

Public Member Functions

 QmlUtilsAttached (QObject *parent=nullptr)
 
auto themeName () const -> QString
 
auto fileName () const -> QString
 
Q_INVOKABLE QString folderName (const QString &path) const
 
Q_INVOKABLE void adopt (QObject *object) const
 Transfers object to the attached object's QObject ownership.
 

Static Public Member Functions

static auto qmlAttachedProperties (QObject *object) -> QmlUtilsAttached *
 

Static Public Attributes

static std::function< QString(const QUrl &)> getThemeNameForRootFile
 

Properties

QML_ELEMENTQString themeName
 The name of the theme that this QML file belongs to.
 
QString fileName
 The file name of the QML file that this object is attached to.
 

Detailed Description

Provides utility functions for QML as an attached property.

Note
Its name in QML is QmlUtils.

Constructor & Destructor Documentation

◆ QmlUtilsAttached()

qml_components::QmlUtilsAttached::QmlUtilsAttached ( QObject *  parent = nullptr)
explicit

Member Function Documentation

◆ adopt()

void qml_components::QmlUtilsAttached::adopt ( QObject *  object) const

Transfers object to the attached object's QObject ownership.

Note
Does not change a QQuickItem's visual parent.

◆ fileName()

auto qml_components::QmlUtilsAttached::fileName ( ) const -> QString

◆ folderName()

auto qml_components::QmlUtilsAttached::folderName ( const QString &  path) const

◆ qmlAttachedProperties()

auto qml_components::QmlUtilsAttached::qmlAttachedProperties ( QObject *  object) -> QmlUtilsAttached*
static

◆ themeName()

auto qml_components::QmlUtilsAttached::themeName ( ) const -> QString

Member Data Documentation

◆ getThemeNameForRootFile

std::function<QString(const QUrl&)> qml_components::QmlUtilsAttached::getThemeNameForRootFile
inlinestatic

Property Documentation

◆ fileName

QString qml_components::QmlUtilsAttached::fileName
read

The file name of the QML file that this object is attached to.

◆ themeName

QML_ELEMENTQString qml_components::QmlUtilsAttached::themeName
read

The name of the theme that this QML file belongs to.


The documentation for this class was generated from the following files: