NDEVR
API Documentation
FieldChooser

A Widget for setting up and choosing a Field used for importing and exporting data. More...

Collaboration diagram for FieldChooser:
[legend]

Public Member Functions

 FieldChooser (QWidget *parent=nullptr)
 Constructs a FieldChooser widget.
void accepted ()
 Emitted when the field selection is accepted.
bool allowCartesianCoordinates () const
 Returns whether Cartesian coordinate types are allowed in the chooser.
bool allowColor () const
 Returns whether color types are allowed in the chooser.
bool allowDecimal () const
 Returns whether decimal types are allowed in the chooser.
bool allowInt () const
 Returns whether integer types are allowed in the chooser.
bool allowPolarCoordinates () const
 Returns whether polar coordinate types are allowed in the chooser.
void channelEditedSlot ()
 Slot called when the channel selection is edited.
void clearButtonClicked ()
 Slot called when the clear button is clicked.
void cleared ()
 Emitted when the field selection is cleared.
void defaultValueEditedSlot ()
 Slot called when the default value is edited.
void dimensionIndexEdited ()
 Slot called when the dimension index is edited.
void dimensionsEditedSlot ()
 Slot called when the dimensions selection is edited.
void edited ()
 Emitted when the field selection is edited.
DesignParameter getOption () const
 Returns the currently chosen design parameter.
TypeInfo getType () const
 Returns the currently chosen type information.
void onAccepted ()
 Slot that emits the accepted signal when the accept action is triggered.
void onDelete ()
 Slot that emits the cleared signal when the delete action is triggered.
void refreshUI ()
 Refreshes the UI to reflect the current state and options.
void setAllowCustom (bool allow_custom)
 Sets whether custom field definitions are allowed.
void setAllowDefaultValue (bool allow_default)
 Sets whether a default value input is allowed.
void setClearButtonText (const TranslatedString &text)
 Sets the text displayed on the clear button.
void setExtraContexMenu (QMenu *menu)
 Sets an extra context menu to be shown with the field chooser.
void setOptions (const Buffer< DesignParameter > &items)
 Sets the available design parameter options for the chooser.
void setOrientationUnit (const ConstPointer< Unit > spacial_unit)
 Sets the orientation unit used for angular fields.
void setSelected (DesignParameter param, const TypeInfo &type)
 Sets the currently selected parameter and type.
void setSpacialUnit (const ConstPointer< Unit > spacial_unit)
 Sets the spatial unit used for coordinate fields.
void stopClearSignalTimer ()
 Slot to stop the clear signal timer.
void typeEditedSlot ()
 Slot called when the type selection is edited.

Protected Member Functions

void channelChanged ()
 Handles a change in the selected channel.
void dimensionsChanged ()
 Handles a change in the selected dimensions.
void typeChanged ()
 Handles a change in the selected type.
void uncheckAll ()
 Unchecks all options in the chooser.

Protected Attributes

bool is_valid
 Whether the current selection is valid.
bool m_allow_custom
 Whether custom field definitions are allowed.
DesignParameter m_ascii_chosen
 The currently chosen design parameter.
Buffer< DesignParameterm_options
 The available design parameter options.
ConstPointer< Unitm_orientation_unit
 The orientation unit for angular fields.
ConstPointer< Unitm_spacial_unit
 The spatial unit for coordinate fields.
TypeInfo m_type
 The currently chosen type information.
Ui::FieldChooserUI * ui
 The UI form for this widget.

Detailed Description

A Widget for setting up and choosing a Field used for importing and exporting data.


Definition at line 46 of file FieldChooser.h.

Constructor & Destructor Documentation

◆ FieldChooser()

FieldChooser::FieldChooser ( QWidget * parent = nullptr)

Constructs a FieldChooser widget.

Parameters
[in]parentThe parent widget.

Member Function Documentation

◆ allowCartesianCoordinates()

bool FieldChooser::allowCartesianCoordinates ( ) const

Returns whether Cartesian coordinate types are allowed in the chooser.

Returns
True if Cartesian coordinates are allowed.

◆ allowColor()

bool FieldChooser::allowColor ( ) const

Returns whether color types are allowed in the chooser.

Returns
True if color types are allowed.

◆ allowDecimal()

bool FieldChooser::allowDecimal ( ) const

Returns whether decimal types are allowed in the chooser.

Returns
True if decimal types are allowed.

◆ allowInt()

bool FieldChooser::allowInt ( ) const

Returns whether integer types are allowed in the chooser.

Returns
True if integer types are allowed.

◆ allowPolarCoordinates()

bool FieldChooser::allowPolarCoordinates ( ) const

Returns whether polar coordinate types are allowed in the chooser.

Returns
True if polar coordinates are allowed.

◆ getOption()

DesignParameter FieldChooser::getOption ( ) const
inline

Returns the currently chosen design parameter.

Returns
The selected DesignParameter.

Definition at line 99 of file FieldChooser.h.

References m_ascii_chosen.

◆ getType()

TypeInfo FieldChooser::getType ( ) const
inline

Returns the currently chosen type information.

Returns
The selected TypeInfo.

Definition at line 104 of file FieldChooser.h.

References m_type.

◆ setAllowCustom()

void FieldChooser::setAllowCustom ( bool allow_custom)

Sets whether custom field definitions are allowed.

Parameters
[in]allow_customTrue to allow custom field definitions.

◆ setAllowDefaultValue()

void FieldChooser::setAllowDefaultValue ( bool allow_default)

Sets whether a default value input is allowed.

Parameters
[in]allow_defaultTrue to allow specifying a default value.

◆ setClearButtonText()

void FieldChooser::setClearButtonText ( const TranslatedString & text)

Sets the text displayed on the clear button.

Parameters
[in]textThe translated text for the clear button.

◆ setExtraContexMenu()

void FieldChooser::setExtraContexMenu ( QMenu * menu)

Sets an extra context menu to be shown with the field chooser.

Parameters
[in]menuThe additional context menu.

◆ setOptions()

void FieldChooser::setOptions ( const Buffer< DesignParameter > & items)

Sets the available design parameter options for the chooser.

Parameters
[in]itemsThe buffer of available DesignParameter options.

◆ setOrientationUnit()

void FieldChooser::setOrientationUnit ( const ConstPointer< Unit > spacial_unit)

Sets the orientation unit used for angular fields.

Parameters
[in]spacial_unitThe orientation unit to use.

◆ setSelected()

void FieldChooser::setSelected ( DesignParameter param,
const TypeInfo & type )

Sets the currently selected parameter and type.

Parameters
[in]paramThe design parameter to select.
[in]typeThe type information for the selection.

◆ setSpacialUnit()

void FieldChooser::setSpacialUnit ( const ConstPointer< Unit > spacial_unit)

Sets the spatial unit used for coordinate fields.

Parameters
[in]spacial_unitThe spatial unit to use.

◆ stopClearSignalTimer()

void FieldChooser::stopClearSignalTimer ( )
inline

Slot to stop the clear signal timer.

Currently a no-op.

Definition at line 187 of file FieldChooser.h.


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