SpaIot Library
SpaIot::ButtonSettings

This class represents the settings of a button. More...

Public Member Functions

 ButtonSettings ()
 The default constructor.
 
virtual ~ButtonSettings ()
 Destructor.
 
 ButtonSettings (const String &controllerName, int buttonId)
 The constructor for the ButtonSettings class takes two parameters. More...
 
 ButtonSettings (ButtonController &controller, int buttonId)
 The constructor for the ButtonSettings class takes two parameters. More...
 
 ButtonSettings (const ButtonSettings &other)
 Copy Constructor.
 
 ButtonSettings (ButtonSettings &&other)
 Move Constructor after the move, other is null, other.clear() must be called if it is to be used again.
 
ButtonSettingsoperator= (const ButtonSettings &other)
 Sets the ButtonSettings object to be equal to other.
 
ButtonSettingsoperator= (ButtonSettings &&other)
 Move assignment after the move, other is null, other.clear() must be called if it is to be used again.
 
void clear ()
 Clears the ButtonSettings object After the call to this function, the ButtonSettings object is the same as one that has been default constructed.
 
bool isNull () const
 Returns true if the object is null (i.e. it has not been initialized, d_ptr is null)
 
bool isEmpty () const
 Checks if all attributes are set to their default values (same as the default constructor)
 
bool operator== (const ButtonSettings &other) const
 Checks if the two objects are equal.
 
bool operator!= (const ButtonSettings &other) const
 Checks if the two objects are not equal.
 
const String & controllerName () const
 Returns the name of the controller.
 
int id () const
 Returns the id of the button.
 
void setId (int id)
 Sets the identifier of the button.
 
const ButtonControllerctrl () const
 Returns the button controller used by the button.
 
ButtonControllerctrl ()
 Returns the button controller used by the button.
 

Detailed Description

This class represents the settings of a button.

It is a concrete class, and can be instantiated. This class is copyable and movable.

Constructor & Destructor Documentation

◆ ButtonSettings() [1/2]

SpaIot::ButtonSettings::ButtonSettings ( const String &  controllerName,
int  buttonId 
)

The constructor for the ButtonSettings class takes two parameters.

Parameters
controllerNamethe name of the controller in the ButtonController register (see ButtonController::addToRegister())
buttonIdthe id of the button in the controller from SpaIot::Key

◆ ButtonSettings() [2/2]

SpaIot::ButtonSettings::ButtonSettings ( ButtonController controller,
int  buttonId 
)

The constructor for the ButtonSettings class takes two parameters.

Parameters
controllerthe controller
buttonIdthe id of the button in the controller from SpaIot::Key