class Button |
|
This device interface is available on button devices.
A button is a device, like power button or lid switch, that can be pressed by user. Some buttons can have two states (Enabled/Disabled, On/Off ...), other buttons haven't state.
Author Davide Bettio |
|
Creates a new Button object.
You generally won't need this. It's created when necessary using
Device.as().
backendObject - the device interface object provided by the backend See also Solid.Device.as() |
|
|
Get the Solid.DeviceInterface.Type of the Button device interface.
Returns the Button device interface type See also Solid.DeviceInterface.Type |
|
Indicates if the button mantains state (Can toggled on/off).
Returns true if the button maintains state, false otherwise. See also stateValue() |
|
This signal is emitted when the button is pressed.
type - the type of button device, it's one of the type Solid.Button.ButtonType See also Solid.Button.ButtonType udi - the UDI of the button |
|
Retrieves the state of the button.
A button can have two states (Enabled/Disabled, On/Off ...).
Available only if hasState is true.
Returns true if the button is enabled, false otherwise. See also hasState() |
|
Retrieves the type of button device.
Returns the type of button device. See also Solid.Button.ButtonType |
This enum type defines the type of button.
- LidButton : The switch on a laptop that senses whether the lid is open or closed. - PowerButton : The main power button on the computer. - SleepButton : The sleep button on a computer capable of putting the computer into a suspend state. - UnknownButtonType : The type of the button is unknow.
LidButton | - | - | ||
PowerButton | - | - | ||
SleepButton | - | - | ||
UnknownButtonType | - | - |