This class provides a widget for displaying and changing configuration parameters. More...

List of all members.

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:
parentthe parent widget
fwidget flags

Definition at line 27 of file configurationwidget.cpp.

Destructor.

Definition at line 61 of file configurationwidget.cpp.


Member Function Documentation

ConfigurationParameters* getConfigurationParameters ( ) [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.

const ConfigurationParameters* getCurrentParameters ( ) [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.

bool readOnly ( ) const [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:
confthe 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:
readOnlyif 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().

void valueHasChanged ( QString  parameter,
QString  oldValue,
QString  newValue 
) [signal]

Emitted when a change is made to displayed values.

Parameters:
parameterthe parameter that has changed (the full path)
oldValuethe old value of the parameter
newValuethe new value of the parameter
bool valuesChanged ( ) const [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: