Light Service Items

class BackdropLightControl : public Item

Displays a Light control to switch single rooms and all Lights at once.

class LightControl : public FocusScope

Displays an Item to control a Light.

If the Light is either dim-able, has a changeable color temperature or editable color, the control expands when tapping it.

Public Functions

string getTemperature(string cold, string warm, real value)

Interpolates between a cold and warm color for a value which is in the range 0 to 1.

Return

The interpolated color hex code

Parameters
  • cold: The color hex code of the cold color

  • warm: The color hex code of the warm color

  • value: The value to interpolate to in the range 0 to 1 where 0 is cold and 1 is warm

Property

property LightControl::light

A Knut Light service to be controlled.

property LightControl::itemHeight

Height of the Light control when it is not extended.

Remark

This property is read-only

property LightControl::info

Info text displayed in the control.

Remark

This property is read-only

class LightList : public ListView

Displays a ListView with all available LightControl.