CuteHMI - Graphical User Interface (CuteHMI.GUI.1)
NumberDisplay Class Reference

Number display. More...

Inheritance diagram for NumberDisplay:
Element

Properties

alias font
 Font. More...
 
real leftPadding
 Left padding. More...
 
real rightPadding
 Right padding. More...
 
real topPadding
 Top padding. More...
 
real bottomPadding
 Bottom padding. More...
 
real value
 Value. More...
 
int fractionalWidth
 Fractional width. More...
 
int integralWidth
 Integral width. More...
 
string unit
 Unit of measurment. More...
 
var textFormatter
 Text formatter. More...
 
- Properties inherited from Element
Units units
 Units used by the element. More...
 
Palette palette
 Palette. More...
 
ColorSet color
 This property defines current colors that should be used to draw element contents. More...
 
ColorSet colorSet
 Active color set. More...
 
bool neutral
 Denotes if element is neutral (it does not distinguish between active, inactive, warning and alarm states). More...
 
bool active
 Denotes if an item is in active state. More...
 
bool warning
 Denotes if an item is in warning state. More...
 
bool alarm
 Denotes if an item is in alarm state. More...
 
bool indirectWarning
 Denotes if item is in indirect warning state. More...
 
bool indirectAlarm
 Denotes if item is in indirect alarm state. More...
 

Additional Inherited Members

- Public Member Functions inherited from Element
ColorSet currentStateColorSet ()
 Pick color set based on active, warning and alarm property states. More...
 

Detailed Description

Number display.

Since
1.0

Number display can be used to conveniently display numerical values with corresponding units of measurement. Number display tries to keep constant width. If that's not possible it expands to fit to its contents.

Number display preview

Above image has been obtained with the following sample code demonstrating basic use of number display.

}
value: 12.34
unit: "Pa"
}
warning: true
value: 2500
unit: "kg"
}
alarm: true
value: 0
unit: "K"
}
bool alarm
Denotes if an item is in alarm state.
Definition: Element.qml:45
bool warning
Denotes if an item is in warning state.
Definition: Element.qml:41
Number display.
Definition: NumberDisplay.qml:16
int integralWidth
Integral width.
Definition: NumberDisplay.qml:49
int fractionalWidth
Fractional width.
Definition: NumberDisplay.qml:45
real value
Value.
Definition: NumberDisplay.qml:41
string unit
Unit of measurment.
Definition: NumberDisplay.qml:53

Property Documentation

◆ bottomPadding

real NumberDisplay::bottomPadding
read

Bottom padding.

◆ font

alias NumberDisplay::font
read

Font.

Font that is used by the display. It may be desirable to set some monospace font.

◆ fractionalWidth

int NumberDisplay::fractionalWidth
read

Fractional width.

◆ integralWidth

int NumberDisplay::integralWidth
read

Integral width.

◆ leftPadding

real NumberDisplay::leftPadding
read

Left padding.

◆ rightPadding

real NumberDisplay::rightPadding
read

Right padding.

◆ textFormatter

var NumberDisplay::textFormatter
read

Text formatter.

◆ topPadding

real NumberDisplay::topPadding
read

Top padding.

◆ unit

string NumberDisplay::unit
read

Unit of measurment.

◆ value

real NumberDisplay::value
read

Value.