A collection of helpful utility methods.
More...
#include <controlsutils.h>
|
| ControlsUtils (const QUrl &baseUrl, QObject *parent=nullptr) |
|
Q_INVOKABLE qreal | scale (qreal percent, qreal start, qreal end) |
|
Q_INVOKABLE QUrl | iconUrl (const QString &name) |
|
A collection of helpful utility methods.
◆ ControlsUtils()
ControlsUtils::ControlsUtils |
( |
const QUrl & |
baseUrl, |
|
|
QObject * |
parent = nullptr |
|
) |
| |
|
explicit |
◆ create()
ControlsUtils * ControlsUtils::create |
( |
QQmlEngine * |
engine, |
|
|
QJSEngine * |
jsEngine |
|
) |
| |
|
static |
◆ iconUrl()
QUrl ControlsUtils::iconUrl |
( |
const QString & |
name | ) |
|
Returns an URL for the Material Design icon name. Use this URL with Image or icon grouped property with controls.
import QtQuick
import Fluid as Fluid
Image {
source: Fluid.Utils.iconUrl("action/alarm")
width: 64
height: 64
}
import QtQuick
import QtQuick.Controls
import Fluid as Fluid
Button {
icon.source: Fluid.Utils.iconUrl("action/alarm")
text: qsTr("Alarm")
}
◆ scale()
qreal ControlsUtils::scale |
( |
qreal |
percent, |
|
|
qreal |
start, |
|
|
qreal |
end |
|
) |
| |
Scale percent in the range between start and end.
The documentation for this class was generated from the following files: