Home2L - C/C++ API v1.4-0-g38cc (2024-05-25)
Smart Tools for a Private Home
Classes | Macros | Enumerations | Functions
Floorplan

Description

Floorplan visualization.

Collaboration diagram for Floorplan:

Classes

class  CWidgetFloorplan
 Floorplan widget. More...
 

Macros

#define FP_WIDTH   256
 Logical width of the floorplan. The logical size of the floorplan is identical to the size in pixels of the mini view.
 
#define FP_HEIGHT   128
 Logical height of the floorplan.
 
#define FP_UPDATE_INTERVAL   64
 Number of milliseconds between updates.
 
#define COL_FP_MAIN   BROWN
 Main color of the floorplan screen.
 

Enumerations

enum  EGadgetType {
}
 

Functions

void RunResourceDialog (class CResource *rc, EGadgetType subType=gtNone, const char *title=NULL, bool emphasize=false)
 Run a dialog allowing to edit, add or delete a user request. More...
 
void FloorplanActivate ()
 Activate the floorplan screen.
 
void FloorplanCheckAlert (CScreen *returnScreen=NULL)
 Check for an alert and if so activate the floorplan screen. More...
 
class CFloorplan * FloorplanGetMain ()
 Get a reference to the main floorplan (for CWidgetFloorplan::Setup() ).
 
void FloorplanUnsubscribeAll ()
 Unsubscribe all resources of the floorplan. More...
 

Enumeration Type Documentation

◆ EGadgetType

Gadget Type

These constants are used to identify a gadget type and for the resource dialog.

Enumerator
gtWindow 

window with a state of ERctWindowState (type rctBool is also allowed).

gtDoor 

door (visualized like a window)

gtGate 

gate (visualized like a window)

gtShades 

shades or blinds (type rctPercent)

gtRoofWindow 

roof window, optionally including shades

gtGarage 

garage door (open/close)

gtTemp 

temperature value

gtLock 

door lock

gtMotion 

motion status

gtLight 

light

gtMail 

mail box

gtPhone 

phone (with state ERctPhoneState)

gtMusic 

music player

gtWlan 

Wifi access point.

gtBluetooth 

Bluetooth.

gtService 

some generic service

gtWarning 

a warning sign

Definition at line 58 of file floorplan.H.

Function Documentation

◆ RunResourceDialog()

void RunResourceDialog ( class CResource rc,
EGadgetType  subType = gtNone,
const char *  title = NULL,
bool  emphasize = false 
)

Run a dialog allowing to edit, add or delete a user request.

Parameters
rcis the resource.
subTypeis a subtype indication. For example, if 'rc->Type()' is rctPercent, setting the subtype to gtWindow will optimize the UI for a window opener ("%100" at the top), if set to gtShades, the UI presents a UI for shades ("0%" at the top).
titleis the title of the dialog. If set to NULL, the title will be derived from 'subType'. If 'subType == gtNone', a generic default title will be shown.
emphasizelets the dialog appear red if set (if unset: auto-detect)

◆ FloorplanCheckAlert()

void FloorplanCheckAlert ( CScreen returnScreen = NULL)

Check for an alert and if so activate the floorplan screen.

Parameters
returnScreenspecifies the screen to return to as soon as the alert is over. If NULL, the floorplan screen will remain activated when the alert is over.

◆ FloorplanUnsubscribeAll()

void FloorplanUnsubscribeAll ( )

Unsubscribe all resources of the floorplan.

On activation of the floorplan screen (FloorplanActivate () ) or some floorplan widget (CWidgetFloorplan), the resource subscriptions are updated to fit the screen or widget. On deactivation of those, nothing is changed. This function explicitly unsubscribes all resources to save power and CPU time.