|
SpaIot Library
|
This class represents a button. More...
Public Member Functions | |
| Button () | |
| The default constructor. | |
| virtual | ~Button () |
| Destructor. | |
| Button (const ButtonSettings &settings) | |
| The constructor for the Button class with settings. | |
| Button (const Button &other) | |
| Copy Constructor. | |
| Button (Button &&other) | |
| Move Constructor after the move, other is null, other.clear() must be called if it is to be used again. | |
| Button & | operator= (const Button &other) |
| Sets the Button object to be equal to other. | |
| Button & | operator= (Button &&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 Button object After the call to this function, the Button 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 Button &other) const |
| Checks if the two objects are equal. | |
| bool | operator!= (const Button &other) const |
| Checks if the two objects are not equal. | |
| int | id () const |
| Returns the button identification key in the possible values of SpaIot::Key. | |
| const ButtonController & | ctrl () const |
| Returns the button controller used by the button. | |
| ButtonController & | ctrl () |
| Returns the button controller used by the button. | |
| const ButtonSettings & | settings () const |
| Returns the settings of the button. | |
| void | begin () |
| Initializes the button, if its controller is not initialized, it is initialized. | |
| void | press () |
| Presses the button, it is not released automatically. | |
| void | release () |
| Releases the button. | |
| void | push () |
Presses and releases the button, HoldPressedMs milliseconds is the time the button is pressed. | |
| bool | isOpen () const |
| Checks if the button is opened. | |
| bool | isPressed () const |
| Checks if the button is pressed. | |
This class represents a button.
It is a concrete class, and can be instantiated. This class is copyable and movable.