![]() |
ImFusion SDK 4.3
|
#include <ImFusion/GUI/PropertiesWidgetParamControls.h>
ParamControl for Eigen Types (Properties::ParamType::Matrix and Properties::ParamType::Vector). More...
ParamControl for Eigen Types (Properties::ParamType::Matrix and Properties::ParamType::Vector).
This class can handle dynamic and compile-time Eigen matrices/vectors. Different types are displayed differently:
Public Member Functions | |
EigenMatrixParamControl (const std::string &name, Properties::ParamType type=Properties::ParamType::Matrix, QWidget *init=nullptr, QWidget *parent=nullptr) | |
void | updateValue (const std::string &value, const std::vector< Properties::Attribute > &attributes) override |
Updates the current value and adjusts the attributes. | |
void | retrieveValue (Properties *p) const override |
Retrieves the value from the widget and writes it into the properties. | |
QWidget * | widget () const override |
Returns the widget for this control. | |
void | setShowBracesLineEdit (bool show) |
Shows/Remove braces in the line edit for non-dynamic matrices. | |
GUI::SpinboxMatrixDialog * | spinBoxDialog () |
MatrixParameterDialog * | matrixParameterDialog () |
void | setUpdateResetMatrix (bool update) |
Set this flag to indicate that EigenMatrixParamControls should update the reset-matrix or not. | |
bool | updateResetMatrix () const |
Set this flag to indicate that EigenMatrixParamControls should update the reset-matrix or not. | |
![]() | |
ParamControl (Properties::ParamType t, const std::string &n) | |
Each control can only be used for a fixed type and parameter. | |
~ParamControl () override=default | |
Subclasses are expected to delete their widget. | |
Protected Member Functions | |
void | createMatrixSpinboxDialog () |
void | createMatrixParameterDialog () |
Additional Inherited Members | |
![]() | |
void | valueChanged () |
Emitted when the parameter value was changed by the user. | |
![]() | |
const Properties::ParamType | type |
const std::string | name |
std::vector< Properties::Attribute > | attributes |
EigenMatrixParamControl | ( | const std::string & | name, |
Properties::ParamType | type = Properties::ParamType::Matrix, | ||
QWidget * | init = nullptr, | ||
QWidget * | parent = nullptr ) |
std::logic_error | if a different type than ParamType::Matrix or ParamType::Vector is passed. |
|
overridevirtual |
Updates the current value and adjusts the attributes.
Implements ParamControl.
|
overridevirtual |
Retrieves the value from the widget and writes it into the properties.
Implements ParamControl.
|
overridevirtual |
Returns the widget for this control.
The ParamControl does not own this widget, e.g. it must be re-parented to some other QWidget or deleted manually.
Implements ParamControl.
|
inline |
Set this flag to indicate that EigenMatrixParamControls
should update the reset-matrix or not.
This flag is set in DefaultAlgorithmController::paramChanged
and used by PropertiesWidget
class to set the corresponding flag in EigenMatrixParamControls
. This mechanism is used to avoid updating the reset-matrix when changes are GUI changes internal to EigenMatrixParamControls
. See also SUITE-3626.
|
inline |
Set this flag to indicate that EigenMatrixParamControls
should update the reset-matrix or not.
This flag is set in DefaultAlgorithmController::paramChanged
and used by PropertiesWidget
class to set the corresponding flag in EigenMatrixParamControls
. This mechanism is used to avoid updating the reset-matrix when changes are GUI changes internal to EigenMatrixParamControls
. See also SUITE-3626.