ImFusion SDK 4.3
EigenMatrixParamControl Class Reference

#include <ImFusion/GUI/PropertiesWidgetParamControls.h>

ParamControl for Eigen Types (Properties::ParamType::Matrix and Properties::ParamType::Vector). More...

+ Inheritance diagram for EigenMatrixParamControl:

Detailed Description

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:

  • Vector: spin boxes are displayed that allow editing the single elements
  • mat4: a line-edit is shown, but clicking on "Edit via Dialog" displays the customary MatrixParameterDialog.
  • Other compile-time matrices as well as run-time matrices: a line-edit is shown as default. Clicking on "Edit via Dialog" displays the SpinBoxMatrixDialog for convenient element editing.

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::SpinboxMatrixDialogspinBoxDialog ()
 
MatrixParameterDialogmatrixParameterDialog ()
 
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.
 
- Public Member Functions inherited from ParamControl
 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

- Signals inherited from ParamControl
void valueChanged ()
 Emitted when the parameter value was changed by the user.
 
- Public Attributes inherited from ParamControl
const Properties::ParamType type
 
const std::string name
 
std::vector< Properties::Attributeattributes
 

Constructor & Destructor Documentation

◆ EigenMatrixParamControl()

EigenMatrixParamControl ( const std::string & name,
Properties::ParamType type = Properties::ParamType::Matrix,
QWidget * init = nullptr,
QWidget * parent = nullptr )
Exceptions
std::logic_errorif a different type than ParamType::Matrix or ParamType::Vector is passed.

Member Function Documentation

◆ updateValue()

void updateValue ( const std::string & value,
const std::vector< Properties::Attribute > & attributes )
overridevirtual

Updates the current value and adjusts the attributes.

Implements ParamControl.

◆ retrieveValue()

void retrieveValue ( Properties * p) const
overridevirtual

Retrieves the value from the widget and writes it into the properties.

Implements ParamControl.

◆ widget()

QWidget * widget ( ) const
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.

◆ setUpdateResetMatrix()

void setUpdateResetMatrix ( bool update)
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.

◆ updateResetMatrix()

bool updateResetMatrix ( ) const
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.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close