Omnidome
Fulldome Mapping Software Toolkit
|
A widget which holds sub-widgets for manipulating parameters. More...
#include <ParameterWidget.h>
Public Slots | |
void | clear () |
Removes all parameter widgets. More... | |
virtual void | updateParameters () |
double | getParamAsFloat (QString const &) const |
Utility method for retrieving the value from a slider with id. More... | |
void | setParamAsFloat (QString const &_str, double _value) |
Set slider value from given value. More... | |
int | getParamAsInt (QString const &) const |
Utility method for retrieving the value from a slider with id. More... | |
void | setParamAsInt (QString const &_str, int _value) |
Set slider value from given value. More... | |
bool | getParamAsBool (QString const &) const |
Utility method for retrieving the value from checkbox with id. More... | |
QWidget * | getWidget (QString const &) |
Get parameter widget from parameter map with Id. More... | |
void | setParametersVisible (bool) |
Show / hide parameter widgets. More... | |
bool | focusNext (bool _circular=false) |
Put focus on next element. More... | |
bool | focusPrev (bool _circular=false) |
Put focus on prev element. More... | |
void | focus (int _index) |
Focus item in layout with index. More... | |
void | focusFirst () |
Set focus on first widget in parameter list. More... | |
void | focusLast () |
Set focus on last widget in parameter list. More... | |
virtual void | setScale (float) |
Set slider ranges. More... | |
virtual void | setUnit (QString const &) |
Set slider ranges. More... | |
Signals | |
void | parametersUpdated () |
Public Member Functions | |
ParameterWidget (QWidget *_parent=nullptr) | |
Default constructor. More... | |
virtual | ~ParameterWidget () |
Default Constructor. More... | |
RangedFloat * | addWidget (QString const &, float, float, float) |
Adds a widget with a name, a value and min-max range. More... | |
RangedInt * | addIntegerWidget (QString const &, int, int, int) |
Adds a integer widget with a name, a value and min-max range. More... | |
RangedFloat * | addAngleWidget (QString const &, float, float, float) |
Adds an angle widget with a name, a value and min-max range. More... | |
RangedFloat * | addOffsetWidget (QString const &, float, float, float) |
Adds an offset widget with a name, a value and min-max range. More... | |
Rotation * | addRotationWidget (QString const &) |
Adds an Rotation widget with three dials for X,Y and Z axis. More... | |
omni::ui::AffineTransform * | addAffineTransformWidget (QString const &, omni::AffineTransform *) |
Add a new affine transform widget with an id. More... | |
QCheckBox * | addCheckBox (QString const &, bool _checked=false) |
Adds a checkbox. More... | |
int | focusId () const |
Return id of focused parameter, -1 if no parameter is focused. More... | |
![]() | |
Scale () | |
virtual void | setScale (float _scale) |
Set scale and apply to sliders. More... | |
bool | rescaleValues () const |
void | setRescaleValues (bool _rescaleValues) |
float | scale () const |
Return scale value. More... | |
QString | suffix () const |
Common unit of sliders. More... | |
void | setSuffix (QString const &_suffix) |
Set suffix (unit) of slider. More... | |
void | registerScaledSlider (slider_type *_slider) |
Register slider to be scaled. More... | |
void | unregisterScaledSlider (slider_type *_slider) |
Remove slider from list, keep scale. More... | |
Protected Member Functions | |
virtual int | firstFocusId () const |
Id of first focussed widget. More... | |
void | keyPressEvent (QKeyEvent *_event) |
Protected Attributes | |
std::vector< QUniquePtr < QWidget > > | parameters_ |
Slider parameter widgets. More... | |
std::map< QString, QWidget * > | parameterMap_ |
Slider widgets, sorted by their label. More... | |
Additional Inherited Members | |
![]() | |
typedef omni::ui::RangedFloat | slider_type |
typedef float | scalar_type |
![]() | |
static int | getPrecision (float _scale) |
Return precesion by scale. More... | |
A widget which holds sub-widgets for manipulating parameters.
omni::ui::ParameterWidget::ParameterWidget | ( | QWidget * | _parent = nullptr | ) |
omni::ui::AffineTransform * omni::ui::ParameterWidget::addAffineTransformWidget | ( | QString const & | _id, |
omni::AffineTransform * | _transform | ||
) |
Add a new affine transform widget with an id.
Install event filter to pipe through focus event to parent widget
Signal-slot connection for updating the data model
RangedFloat * omni::ui::ParameterWidget::addAngleWidget | ( | QString const & | _str, |
float | _value, | ||
float | _min, | ||
float | _max | ||
) |
Adds an angle widget with a name, a value and min-max range.
QCheckBox * omni::ui::ParameterWidget::addCheckBox | ( | QString const & | _text, |
bool | _checked = false |
||
) |
Adds a checkbox.
Signal-slot connection for updating the data model
RangedInt * omni::ui::ParameterWidget::addIntegerWidget | ( | QString const & | _str, |
int | _value, | ||
int | _min, | ||
int | _max | ||
) |
Adds a integer widget with a name, a value and min-max range.
Install event filter to pipe through focus event to parent widget
Signal-slot connection for updating the data model
RangedFloat * omni::ui::ParameterWidget::addOffsetWidget | ( | QString const & | _str, |
float | _value, | ||
float | _min, | ||
float | _max | ||
) |
Adds an offset widget with a name, a value and min-max range.
Rotation * omni::ui::ParameterWidget::addRotationWidget | ( | QString const & | _str | ) |
Adds an Rotation widget with three dials for X,Y and Z axis.
Install event filter to pipe through focus event to parent widget
Signal-slot connection for updating the data model
RangedFloat * omni::ui::ParameterWidget::addWidget | ( | QString const & | _str, |
float | _value, | ||
float | _min, | ||
float | _max | ||
) |
Adds a widget with a name, a value and min-max range.
Install event filter to pipe through focus event to parent widget
Signal-slot connection for updating the data model
|
slot |
Removes all parameter widgets.
|
inlineprotectedvirtual |
|
slot |
|
slot |
Set focus on first widget in parameter list.
int omni::ui::ParameterWidget::focusId | ( | ) | const |
|
slot |
Set focus on last widget in parameter list.
|
slot |
Put focus on next element.
_circular | Selects first parameter when last parameter has been reached |
|
slot |
Put focus on prev element.
_circular | Selects last parameter when first parameter has been reached |
|
slot |
Utility method for retrieving the value from checkbox with id.
|
slot |
Utility method for retrieving the value from a slider with id.
|
slot |
Utility method for retrieving the value from a slider with id.
|
slot |
Get parameter widget from parameter map with Id.
|
protected |
|
signal |
|
slot |
Set slider value from given value.
|
slot |
Set slider value from given value.
|
slot |
Show / hide parameter widgets.
|
virtualslot |
Set slider ranges.
|
virtualslot |
Set slider ranges.
|
virtualslot |
|
protected |
Slider widgets, sorted by their label.
|
protected |
Slider parameter widgets.