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

Element. More...

Inheritance diagram for Element:
NumberDisplay

Public Member Functions

ColorSet currentStateColorSet ()
 Pick color set based on active, warning and alarm property states. More...
 

Properties

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...
 

Detailed Description

Element.

Since
1.0

This component should be used to implement color code aware items.

Member Function Documentation

◆ currentStateColorSet()

ColorSet Element::currentStateColorSet ( )

Pick color set based on active, warning and alarm property states.

Alarm takes precedence before warning and warning takes precedence over active state. For warning and alarm states this function dynamically alters the colors to carry visual information more effectively and to provide accessibility to color blind people.

Returns
appropriate color set.

Property Documentation

◆ active

bool Element::active
read

Denotes if an item is in active state.

◆ alarm

bool Element::alarm
read

Denotes if an item is in alarm state.

Alarm state should take precedence over warning and active states.

◆ color

ColorSet Element::color
read

This property defines current colors that should be used to draw element contents.

By default, color properties are binded to the respective properties of active color set. However, current color values may differ from those of active color set, when color transitions take place.

◆ colorSet

ColorSet Element::colorSet
read

Active color set.

Normally this is controlled by currentStateColorSet() function, which sets appropriate color according to the state of active, warning and alarm properties. Neutral elements are binded to neutral color set.

◆ indirectAlarm

bool Element::indirectAlarm
read

Denotes if item is in indirect alarm state.

This kinf of alarm may be handy when alarm is diagnosed from indirect measurments.

◆ indirectWarning

bool Element::indirectWarning
read

Denotes if item is in indirect warning state.

This kinf of warning may be handy when warning is diagnosed from indirect measurments.

◆ neutral

bool Element::neutral
read

Denotes if element is neutral (it does not distinguish between active, inactive, warning and alarm states).

◆ palette

Palette Element::palette
read

Palette.

Palette to be used by an element.

◆ units

Units Element::units
read

Units used by the element.

◆ warning

bool Element::warning
read

Denotes if an item is in warning state.

Warning state should take precedence over active state.