Push Button.
More...
#include <PushButton.h>
Push Button.
- Todo:
- Event mode with value checking.
◆ ButtonMode
Push button behaviour.
Enumerator |
---|
PressRelease | The onValue is written when the button is pressed down, the offValue is written when releasing it, respectively.
|
Event | An event is generated, based on EventCondition and EventAction settings.
|
◆ EventAction
Event action, determines what happens, when an event is generated.
Enumerator |
---|
IncrementValue | The value of the process variable is incremented.
|
SetOnValue | The onValue is written to the process variable.
|
ToggleValue | The offValue is written to the process if the last value was the onValue.
Otherwise the onValue is written to the process.
|
◆ EventCondition
Event condition, determines when an event is generated.
Enumerator |
---|
OnClicked | Event generated by QPushButton's clicked() signal (button is pressed and released, while the cursor is inside the button area.
|
OnPressed | Event generated by QPushButton's pressed() signal (button just pressed down).
|
OnReleased | Event generated by QPushButton's released() signal (button released, regardless of cursor being inside the button area).
Consider using OnClicked.
|
◆ PushButton()
PushButton::PushButton |
( |
QWidget * |
parent = 0 | ) |
|
Constructor.
- Parameters
-
References Impl.
◆ ~PushButton()
PushButton::~PushButton |
( |
| ) |
|
|
virtual |
◆ changeEvent()
void PushButton::changeEvent |
( |
QEvent * |
event | ) |
|
|
overrideprivate |
◆ clearData()
void PushButton::clearData |
( |
| ) |
|
◆ getButtonMode()
◆ getEventAction()
◆ getEventCondition()
◆ getOffValue()
int PushButton::getOffValue |
( |
| ) |
const |
◆ getOnValue()
int PushButton::getOnValue |
( |
| ) |
const |
◆ newValues()
void PushButton::newValues |
( |
std::chrono::nanoseconds |
| ) |
|
|
overrideprivate |
This virtual method is called by the ProcessVariable, if its value changes.
References impl, and PressRelease.
◆ on_clicked
void PushButton::on_clicked |
( |
| ) |
|
|
privateslot |
The button has been clicked.
This is the case, when the user presses the button and releases it with the curser inside the button area.
References Event, impl, OnClicked, and PressRelease.
◆ on_pressed
void PushButton::on_pressed |
( |
| ) |
|
|
privateslot |
◆ on_released
void PushButton::on_released |
( |
| ) |
|
|
privateslot |
◆ resetButtonMode()
void PushButton::resetButtonMode |
( |
| ) |
|
◆ resetEventAction()
void PushButton::resetEventAction |
( |
| ) |
|
◆ resetEventCondition()
void PushButton::resetEventCondition |
( |
| ) |
|
◆ resetOffValue()
void PushButton::resetOffValue |
( |
| ) |
|
◆ resetOnValue()
void PushButton::resetOnValue |
( |
| ) |
|
◆ setButtonMode()
◆ setEventAction()
◆ setEventCondition()
◆ setOffValue()
void PushButton::setOffValue |
( |
int |
v | ) |
|
◆ setOnValue()
void PushButton::setOnValue |
( |
int |
v | ) |
|
◆ Impl
◆ impl
std::unique_ptr<Impl> Pd::PushButton::impl |
|
private |
Referenced by changeEvent(), getButtonMode(), getEventAction(), getEventCondition(), getOffValue(), getOnValue(), newValues(), on_clicked(), on_pressed(), on_released(), setButtonMode(), setEventAction(), setEventCondition(), setOffValue(), and setOnValue().
◆ buttonMode
◆ eventAction
◆ eventCondition
◆ offValue
int Pd::PushButton::offValue |
|
readwrite |
◆ onValue
int Pd::PushButton::onValue |
|
readwrite |
The documentation for this class was generated from the following files: