![]() |
NDEVR
API Documentation
|
Automatically creates a widget based on a GenericOption. More...
Public Member Functions | |
| GenericOptionsWidget (const GenericOption &option, QWidget *parent=nullptr) | |
| Constructs a GenericOptionsWidget from a GenericOption. | |
| GenericOptionsWidget (QWidget *parent=nullptr) | |
| Constructs an empty GenericOptionsWidget. | |
| void | edited () |
| Emitted when the option value has been edited. | |
| void | editingFinished () |
| Emitted when the user finishes editing. | |
| GenericOption & | option () |
| Returns the GenericOption associated with this widget. | |
| const GenericOption & | option () const |
| Returns the GenericOption associated with this widget (const). | |
| void | refreshFileChooser () |
| Refreshes the file chooser portion of the widget, if applicable. | |
| void | refreshResetToDefault () |
| Refreshes the reset-to-default button state. | |
| void | refreshWidget () |
| Refreshes the widget to reflect the current option state. | |
| void | setOption (const GenericOption &option) |
| Sets the option and rebuilds the widget accordingly. | |
Protected Attributes | |
| Button * | m_browse_button = nullptr |
| Browse button for file-type options. | |
| FileChooserDialog * | m_chooser_dialog = nullptr |
| File chooser dialog for file-type options. | |
| GenericOption | m_option |
| The GenericOption this widget represents. | |
| Button * | m_reset_button = nullptr |
| Button to reset the option to its default value. | |
| QWidget * | m_widget = nullptr |
| The main editing widget for the option. | |
Automatically creates a widget based on a GenericOption.
Definition at line 13 of file GenericOptionsWidgets.h.
| GenericOptionsWidget::GenericOptionsWidget | ( | const GenericOption & | option, |
| QWidget * | parent = nullptr ) |
Constructs a GenericOptionsWidget from a GenericOption.
| [in] | option | The option to create a widget for. |
| [in] | parent | The parent widget. |
References option().
| GenericOptionsWidget::GenericOptionsWidget | ( | QWidget * | parent = nullptr | ) |
Constructs an empty GenericOptionsWidget.
| [in] | parent | The parent widget. |
|
inline |
Returns the GenericOption associated with this widget.
Definition at line 46 of file GenericOptionsWidgets.h.
References m_option.
|
inline |
Returns the GenericOption associated with this widget (const).
Definition at line 38 of file GenericOptionsWidgets.h.
References m_option.
Referenced by GenericOptionsWidget(), and setOption().
| void GenericOptionsWidget::setOption | ( | const GenericOption & | option | ) |
Sets the option and rebuilds the widget accordingly.
| [in] | option | The new GenericOption to display. |
References option().