This class provides a widget for displaying and changing configuration parameters. More...
Signals | |
void | valueHasChanged (QString parameter, QString oldValue, QString newValue) |
Emitted when a change is made to displayed values. | |
Public Member Functions | |
ConfigurationWidget (QWidget *parent=NULL) | |
Constructor. | |
~ConfigurationWidget () | |
Destructor. | |
ConfigurationParameters * | getConfigurationParameters () |
Returns the ConfigurationParameters object. | |
const ConfigurationParameters * | getCurrentParameters () |
Returns the ConfigurationParameters object with the current parameters value (those showed on the gui) | |
bool | readOnly () const |
Returns true if the widget is in read-only mode. | |
void | restore () |
Restores previous parameters (those at the time of the last call to store()) | |
void | setConfigurationParameters (ConfigurationParameters *conf) |
Sets the ConfigurationParameters object. | |
void | setReadOnly (bool readOnly) |
Puts the widget in read-only or read-write mode. | |
void | store () |
Stores current changes to the ConfigurationParameters object. | |
void | updateParameters () |
Re-reads ConfigurationParameters object. | |
bool | valuesChanged () const |
Returns true if shown parameters value are different from those in m_configurationParameters. | |
Detailed Description
This class provides a widget for displaying and changing configuration parameters.
To use this class you have to specify a ConfigurationParameters object on which it works. You can then set the widget in read-only or read-write mode, restore changes to original values, save changes to the ConfigurationParameters object. By default the widget starts in read-only mode
Definition at line 45 of file configurationwidget.h.
Constructor & Destructor Documentation
ConfigurationWidget | ( | QWidget * | parent = NULL | ) |
Constructor.
- Parameters
-
parent the parent widget f widget flags
Definition at line 27 of file configurationwidget.cpp.
~ConfigurationWidget | ( | ) |
Destructor.
Definition at line 61 of file configurationwidget.cpp.
Member Function Documentation
|
inline |
Returns the ConfigurationParameters object.
- Returns
- the ConfigurationParameters object
- Note
- if you change the returned object, you have to call updateParameters()
Definition at line 77 of file configurationwidget.h.
|
inline |
Returns the ConfigurationParameters object with the current parameters value (those showed on the gui)
- Returns
- the ConfigurationParameters object with the current parameters value (those showed on the gui)
Definition at line 89 of file configurationwidget.h.
|
inline |
Returns true if the widget is in read-only mode.
- Returns
- true if the widget is in read-only mode
Definition at line 115 of file configurationwidget.h.
Referenced by ConfigurationWidget::setReadOnly().
void restore | ( | ) |
Restores previous parameters (those at the time of the last call to store())
This also updates the GUI
Definition at line 146 of file configurationwidget.cpp.
References ConfigurationWidget::updateParameters().
void setConfigurationParameters | ( | ConfigurationParameters * | conf | ) |
Sets the ConfigurationParameters object.
- Parameters
-
conf the ConfigurationParameters object
Definition at line 66 of file configurationwidget.cpp.
References ConfigurationWidget::updateParameters().
void setReadOnly | ( | bool | readOnly | ) |
Puts the widget in read-only or read-write mode.
- Parameters
-
readOnly if true widget goes in read only mode, if false in read-write
Definition at line 116 of file configurationwidget.cpp.
References ConfigurationWidget::readOnly().
void store | ( | ) |
Stores current changes to the ConfigurationParameters object.
Definition at line 134 of file configurationwidget.cpp.
void updateParameters | ( | ) |
Re-reads ConfigurationParameters object.
Call this if you make changes to the ConfigurationParameters object externally
Definition at line 84 of file configurationwidget.cpp.
Referenced by ConfigurationWidget::restore(), and ConfigurationWidget::setConfigurationParameters().
|
signal |
Emitted when a change is made to displayed values.
- Parameters
-
parameter the parameter that has changed (the full path) oldValue the old value of the parameter newValue the new value of the parameter
|
inline |
Returns true if shown parameters value are different from those in m_configurationParameters.
- Returns
- true if shown parameters value are different from those in m_configurationParameters
Definition at line 140 of file configurationwidget.h.
The documentation for this class was generated from the following files:
- utilities/include/ui/configurationwidget.h
- utilities/src/ui/configurationwidget.cpp