|
QtPdWidgets
2.4.0
|
Combo box for selecting a value of an integer process variable. More...
#include <ComboBox.h>


Classes | |
| struct | Impl |
Public Member Functions | |
| ComboBox (QWidget *parent=0) | |
| Constructor. More... | |
| virtual | ~ComboBox () |
| Destructor. More... | |
| void | clearData () |
Protected Member Functions | |
| void | wheelEvent (QWheelEvent *) override |
| Ignores wheel events, if the widget has no focus. More... | |
Private Member Functions | |
| PD_PRIVATE void | newValues (std::chrono::nanoseconds) override |
| This virtual method is called by the ProcessVariable, if its value changes. More... | |
Private Attributes | |
| struct PD_PRIVATE | Impl |
| std::unique_ptr< Impl > | impl |
Combo box for selecting a value of an integer process variable.
Each item represents a value, that is stored as the item's user data (see QComboBox::addItem(const QString &, const QVariant &)):
The item matching the current process value is selected. If there is no item for the current value, no item is selected and the value is displayed as placeholder text (Qt >= 5.15). Selecting an item by the user writes its value to the process.
To avoid unintentional changes, mouse wheel events are only processed, if the widget has the keyboard focus.
| ComboBox::ComboBox | ( | QWidget * | parent = 0 | ) |
|
virtual |
Destructor.
| void ComboBox::clearData | ( | ) |
References impl.
|
overrideprivate |
This virtual method is called by the ProcessVariable, if its value changes.
References impl.
|
overrideprotected |
Ignores wheel events, if the widget has no focus.
This avoids changing process values unintentionally while scrolling.
|
private |
Referenced by ComboBox().
|
private |
Referenced by clearData(), and newValues().