|
QtPdWidgets
2.3.4
|
Quick-selector widget for parameter sets. More...
#include <ParameterSetWidget.h>


Classes | |
| struct | Impl |
Public Member Functions | |
| ParameterSetWidget (QWidget *parent=nullptr) | |
| Constructor. More... | |
| virtual | ~ParameterSetWidget () |
| Destructor. More... | |
| void | setProcesses (QSet< QtPdCom::Process *> processes) |
| void | setPath (const QString &) |
| QString | getPath () const |
Protected Member Functions | |
| bool | event (QEvent *) override |
| QSize | sizeHint () const override |
Properties | |
| QString | path |
Private Attributes | |
| struct PD_PRIVATE | Impl |
| std::unique_ptr< Impl > | impl |
Quick-selector widget for parameter sets.
The ParameterSetWidget class provides functionality for loading and applying parameter files. It displays a list of parameter files in a combo box, and allows the user to select a file to load or apply the parameters to the real-time process. To use it, a set of process pointers (Pd::Process *) has to be passed to the widget.
The parameter file format is JSON-based and is also understood by the Testmanager directory:
{
"parameters":[
{
"url":"msr://host:2345/control/timeout",
"value":13,
"comment":"Scalar Parameter, Timeout in [s]"
},
{
"url":"msr://host:2345/pump/speed",
"value":1500,
"scale":9.549296585513721,
"comment":"Scaled Parameter in [rpm], for easier user editing. Process value * scale = file value."
},
{
"url":"msr://anotherhost:2345/ForceController/TargetForce",
"value":50e3,
"selector":1,
"comment":"Vector parameter in [N], selecting 2nd component"
},
{
"url":"msr://anotherhost:2345/Matrix2x2",
"value":[
1.0,
1.0
],
"selector":[
0,
3
],
"comment":"Matrix parameter, selecting diagonal"
}
],
"creator":"Testmanager 0.1.34-g37baaf4d",
"creation date":"2023-03-13 14:37:58+0100",
"created by":"fp",
"description":"My settings"
} | ParameterSetWidget::ParameterSetWidget | ( | QWidget * | parent = nullptr | ) |
Constructor.
| parent | parent widget |
|
virtual |
Destructor.
|
overrideprotected |
References impl.
| QString ParameterSetWidget::getPath | ( | ) | const |
References impl.
| void ParameterSetWidget::setProcesses | ( | QSet< QtPdCom::Process *> | processes | ) |
References impl.
|
overrideprotected |
References impl.
|
private |
|
private |
Referenced by event(), getPath(), setPath(), setProcesses(), and sizeHint().
|
readwrite |
Referenced by setPath().