DynExp
Highly flexible laboratory automation for dynamically changing experiments.
ParamsConfigDialog::Param Struct Reference

Collection of data defining a single parameter to be managed by a ParamsConfigDialog instance. Used by ParamsConfigDialog::InsertWidget(). More...

Public Types

enum class  ParamType {
  Number , SignedInteger , UnsignedInteger , Text ,
  Path , Code , TextList , IndexedTextList ,
  Index , IndexList
}
 Identifies the type of a parameter shown in the user interface. Also refer to DynExp::TextUsageType. More...
 

Public Member Functions

 Param ()=delete
 
 Param (const ParamType Type, QWidget *const Widget, const std::any Destiny, IndexType DefaultIndex=0, const bool AllowResetToDefault=true)
 Constructs a Param instance. More...
 

Public Attributes

const ParamType Type
 Type of the managed parameter. More...
 
QWidget *const Widget
 Widget to edit/show the parameter's value in the UI. More...
 
const std::any Destiny
 Reference to destination variable where to store the parameter's value after editing. More...
 
const IndexType DefaultIndex
 Default selection index for combo box-based parameters used in case of a parameter reset. More...
 
const bool AllowResetToDefault
 Determines whether to show a reset button in the UI to allow resetting the parameter to its default value. More...
 

Detailed Description

Collection of data defining a single parameter to be managed by a ParamsConfigDialog instance. Used by ParamsConfigDialog::InsertWidget().

Definition at line 100 of file ParamsConfig.h.

Member Enumeration Documentation

◆ ParamType

Identifies the type of a parameter shown in the user interface. Also refer to DynExp::TextUsageType.

Enumerator
Number 

Numeric parameter consisting of a double-type number

SignedInteger 

Numeric parameter consisting of a signed integer number

UnsignedInteger 

Numeric parameter consisting of an unsigned integer number

Text 

Plain text, no functionality is added.

Path 

Interprets the text as a file path and adds a 'browse' button.

Code 

Behaves like TextUsageType::Path, but also adds a button to open a text editor to edit the code file the text (interpreted as a file path) points to.

TextList 

Parameter consisting of a list of plain texts. The parameter stores the selected text itself.

IndexedTextList 

Parameter consisting of a list of plain texts. The parameter does not store the selected text itself but its index within a list of predefined options

Index 

Numeric parameter consisting of an unsigned integer number which refers to the ID of a DynExp::Object instance.

IndexList 

Numeric parameter consisting of a list of unsigned integer numbers which refer to an ID of a DynExp::Object instance each.

Definition at line 105 of file ParamsConfig.h.

Constructor & Destructor Documentation

◆ Param() [1/2]

ParamsConfigDialog::Param::Param ( )
delete

◆ Param() [2/2]

ParamsConfigDialog::Param::Param ( const ParamType  Type,
QWidget *const  Widget,
const std::any  Destiny,
IndexType  DefaultIndex = 0,
const bool  AllowResetToDefault = true 
)
inline

Constructs a Param instance.

Parameters
TypeRefer to Type.
WidgetRefer to Widget.
DestinyRefer to Destiny.
DefaultIndexRefer to DefaultIndex.
AllowResetToDefaultRefer to AllowResetToDefault.

Definition at line 160 of file ParamsConfig.h.

Member Data Documentation

◆ AllowResetToDefault

const bool ParamsConfigDialog::Param::AllowResetToDefault

Determines whether to show a reset button in the UI to allow resetting the parameter to its default value.

Definition at line 169 of file ParamsConfig.h.

◆ DefaultIndex

const IndexType ParamsConfigDialog::Param::DefaultIndex

Default selection index for combo box-based parameters used in case of a parameter reset.

Definition at line 168 of file ParamsConfig.h.

◆ Destiny

const std::any ParamsConfigDialog::Param::Destiny

Reference to destination variable where to store the parameter's value after editing.

Definition at line 167 of file ParamsConfig.h.

◆ Type

const ParamType ParamsConfigDialog::Param::Type

Type of the managed parameter.

Definition at line 165 of file ParamsConfig.h.

◆ Widget

QWidget* const ParamsConfigDialog::Param::Widget

Widget to edit/show the parameter's value in the UI.

Definition at line 166 of file ParamsConfig.h.


The documentation for this struct was generated from the following file: