trikRuntime
|
Class for handling keys on a brick. More...
#include <keysInterface.h>
Public Slots | |
virtual void | reset ()=0 |
Clear data about previous key pressures. More... | |
virtual bool | wasPressed (int code)=0 |
Returns true if button with given code was pressed, and clears "pressed" state for that button. More... | |
virtual bool | isPressed (int code)=0 |
Returns true if button with given code is pressed at the moment. More... | |
virtual int | buttonCode (bool wait=true)=0 |
Returns a code of a pressed button. More... | |
Signals | |
void | buttonPressed (int code, int value) |
Triggered when button state changed (pressed or released). More... | |
Additional Inherited Members | |
Public Types inherited from trikControl::DeviceInterface | |
enum | Status { Status::permanentFailure, Status::temporaryFailure, Status::off, Status::starting, Status::ready, Status::stopping } |
Device status. More... | |
Public Member Functions inherited from trikControl::DeviceInterface | |
DeviceInterface ()=default | |
virtual | ~DeviceInterface ()=default |
virtual Status | status () const =0 |
Returns current status of the device. More... | |
Static Public Member Functions inherited from trikControl::DeviceInterface | |
static Status | combine (const DeviceInterface &underlying, const DeviceInterface::Status &dependent) |
Helper method to return status of a device relying on other device to work. More... | |
Class for handling keys on a brick.
|
pure virtualslot |
Returns a code of a pressed button.
|
signal |
Triggered when button state changed (pressed or released).
code | - key code. |
value | - key state. |
|
pure virtualslot |
Returns true if button with given code is pressed at the moment.
|
pure virtualslot |
Clear data about previous key pressures.
|
pure virtualslot |
Returns true if button with given code was pressed, and clears "pressed" state for that button.