ConfigWidget Class Reference
[GUIAlgorithms]

The base class for displaying a widget where users may set algorithm configuration options via gui interaction. More...

#include <config_widget.h>

Inherits QWidget.

Inherited by TestConfigWidget, and ThresholdConfigWidget.

Inheritance diagram for ConfigWidget:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ConfigWidget (QWidget *parent=0)
 ~ConfigWidget ()
void setMetadataForInputDataset (std::string dataset_key, metadata_pointer_type metadata)
void setConfiguration (configuration_pointer_type configuration)
virtual void applyConfiguration ()=0
configuration_pointer_type getConfiguration () const
virtual bool showConfiguration ()=0

Protected Member Functions

metadata_pointer_type const getMetadataForInputDataset (std::string dataset_key) const

Protected Attributes

configuration_pointer_type configuration_

Detailed Description

The base class for displaying a widget where users may set algorithm configuration options via gui interaction.

The base class for displaying a widget where users may set algorithm configuration options via gui interaction. It defines common logic to all such widgets, i.e. the setting of an associated Configuration object, of Metadata for selected input datasets and methods telling the widget to show itself or apply the user's configuration settings to the configuration object.

Author:
Tobias Gross (tobias.gross@imedgine.org)

Christian Koerner (christian.koerner@imedgine.org)

Alexander Lex (alexander.lex@imedgine.org)

Marc Streit (marc.streit@imedgine.org)

Martin Reininger (martin.reininger@imedgine.org)

Definition at line 49 of file config_widget.h.


Constructor & Destructor Documentation

ConfigWidget QWidget *  parent = 0  ) 
 

Constructor

Parameters:
parent The parent widget

Definition at line 22 of file config_widget.cpp.

~ConfigWidget  ) 
 

Destructor

Definition at line 27 of file config_widget.cpp.


Member Function Documentation

virtual void applyConfiguration  )  [pure virtual]
 

Write the values of the configuration attributes given by the application user into the configuration object.

Implemented in TestConfigWidget, and ThresholdConfigWidget.

Referenced by AlgorithmWidget::okPressed().

configuration_pointer_type getConfiguration  )  const
 

Returns the configuration object

Returns:
A base class pointer to the concrete configuration of the algorithm

Definition at line 63 of file config_widget.cpp.

References ConfigWidget::configuration_.

Referenced by AlgorithmWidget::okPressed().

metadata_pointer_type const getMetadataForInputDataset std::string  dataset_key  )  const [protected]
 

Retrieves the metadata for a particular input dataset denoted by dataset_key

Parameters:
dataset_key the input dataset
Returns:
a metadata smart pointer containing the info for the dataset
Exceptions:
MetadataNotFoundException if no metadata could be found

Definition at line 45 of file config_widget.cpp.

Referenced by ThresholdConfigWidget::showConfiguration().

void setConfiguration configuration_pointer_type  configuration  ) 
 

Set the configuration object for this widget

Parameters:
configuration the configuration object

Definition at line 70 of file config_widget.cpp.

References ConfigWidget::configuration_.

Referenced by Controller::createConfigWidget().

void setMetadataForInputDataset std::string  dataset_key,
metadata_pointer_type  metadata
 

Set the metadata for a certain input dataset denoted by dataset_key.

Parameters:
dataset_key metadata is set for the dataset with this key
metadata the metadata to set

Definition at line 34 of file config_widget.cpp.

virtual bool showConfiguration  )  [pure virtual]
 

a method where the algorithm programmer has to let the config widget "show" itself, displaying its widgets and setting any options the algorithm programmer needs.

Returns:
a boolean describing if the operation was successful

Implemented in TestConfigWidget, and ThresholdConfigWidget.


The documentation for this class was generated from the following files:
Generated on Sun Aug 13 18:20:04 2006 for iMEDgine by  doxygen 1.4.6