Fluid
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
ControlsUtils Class Reference

A collection of helpful utility methods. More...

#include <controlsutils.h>

Inheritance diagram for ControlsUtils:
Inheritance graph
[legend]
Collaboration diagram for ControlsUtils:
Collaboration graph
[legend]

Public Member Functions

 ControlsUtils (const QUrl &baseUrl, QObject *parent=nullptr)
 
Q_INVOKABLE qreal scale (qreal percent, qreal start, qreal end)
 
Q_INVOKABLE QUrl iconUrl (const QString &name)
 

Static Public Member Functions

static ControlsUtilscreate (QQmlEngine *engine, QJSEngine *jsEngine)
 

Detailed Description

A collection of helpful utility methods.

Constructor & Destructor Documentation

◆ ControlsUtils()

ControlsUtils::ControlsUtils ( const QUrl &  baseUrl,
QObject *  parent = nullptr 
)
explicit

Member Function Documentation

◆ 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: