CVR-Lib last update 20 Sep 2009

cvr::viewerBase::viewerBase::configDialog Class Reference

Parent class for all configuration classes. More...

#include <cvrViewerBase.h>

Inheritance diagram for cvr::viewerBase::viewerBase::configDialog:

Inheritance graph
[legend]
Collaboration diagram for cvr::viewerBase::viewerBase::configDialog:

Collaboration graph
[legend]

List of all members.

Classes

class  tk
 Private class of the configuration dialogs which deals with all internal issues of the GTK toolkit. More...

Public Member Functions

 configDialog (viewerBase &parent)
 configDialog (const configDialog &other, viewerBase &parent)
virtual ~configDialog ()
virtual bool useInformation (const information *dataInfo)
virtual bool attachInformation (const information *dataInfo)
const informationgetInformation () const
bool validInformation () const
virtual bool setParameters (const parameters &par)
const parametersgetParameters () const
parametersgetParameters ()
parametersdetachParameters ()
configDialogcopy (const configDialog &other)
virtual configDialogclone (viewerBase &parent) const
Toolkit dependent functions
virtual bool build ()
virtual bool show ()
virtual bool hide ()
virtual bool destroy ()

Protected Member Functions

virtual void initToolkit ()
virtual void destroyToolkit ()
virtual bool onCancelButtonClicked ()
virtual bool onApplyButtonClicked ()
virtual bool onOkButtonClicked ()
configDialogoperator= (const configDialog &other)

Protected Attributes

viewerBaseparent_
parametersparams_
tktk_


Detailed Description

Parent class for all configuration classes.

The "parent" of a configuration dialog is its corresponding main window, which is set at construction time. This way, the configuration has the binding necessary to manage all information exchange.

The specific configDialog instance for a viewer is indicated with the method viewerBase::useConfig(). TODO: What to expect from the memory management?


Constructor & Destructor Documentation

cvr::viewerBase::viewerBase::configDialog::configDialog ( viewerBase parent  ) 

Construction.

cvr::viewerBase::viewerBase::configDialog::configDialog ( const configDialog other,
viewerBase parent 
)

Sort of copy constructor but with a new parent.

virtual cvr::viewerBase::viewerBase::configDialog::~configDialog (  )  [virtual]

Destruction.

Reimplemented in cvr::viewer2D::viewer2D::configDialog.


Member Function Documentation

virtual bool cvr::viewerBase::viewerBase::configDialog::attachInformation ( const information dataInfo  )  [virtual]

Use the given information block.

This method does not copy the information block, it just stores a reference to the given instance, but it overtakes the memory management.

The implementation of this method is based on useInformation(), so that you may want to overload just that method.

virtual bool cvr::viewerBase::viewerBase::configDialog::build (  )  [virtual]

Constructs the main window.

You usually don't need to call this method directly, as it is called by show() if necessary.

This is called just once for the configuration dialog at its construction time.

In inherited classes it is usually employed to build the basic structure of the configuration dialog

Reimplemented in cvr::viewer2D::viewer2D::configDialog.

virtual configDialog* cvr::viewerBase::viewerBase::configDialog::clone ( viewerBase parent  )  const [virtual]

This clone requires the parent window.

Reimplemented in cvr::viewer2D::viewer2D::configDialog.

configDialog& cvr::viewerBase::viewerBase::configDialog::copy ( const configDialog other  ) 

Copy method.

Copies everything, but the parent main window

virtual bool cvr::viewerBase::viewerBase::configDialog::destroy (  )  [virtual]

Destroys the widget completely.

Before the widget is destroyed, the window is hidden, and the parent viewer is signalized accordingly in order to destroy the configuration dialog.

Reimplemented in cvr::viewer2D::viewer2D::configDialog.

virtual void cvr::viewerBase::viewerBase::configDialog::destroyToolkit (  )  [protected, virtual]

Destroy toolkit dependent class.

This is called at destruction time and is implemented by the toolkit being used.

parameters* cvr::viewerBase::viewerBase::configDialog::detachParameters (  ) 

Get the internal copy of the parameters and eliminate the internal reference.

const information& cvr::viewerBase::viewerBase::configDialog::getInformation (  )  const

Get a read-only reference to the data block.

Reimplemented in cvr::viewer2D::viewer2D::configDialog.

parameters& cvr::viewerBase::viewerBase::configDialog::getParameters (  ) 

Get a writable reference to the internal parameters.

const parameters& cvr::viewerBase::viewerBase::configDialog::getParameters (  )  const

Get read-only reference to the internal parameters.

virtual bool cvr::viewerBase::viewerBase::configDialog::hide (  )  [virtual]

Hides the configuration dialog.

Reimplemented in cvr::viewer2D::viewer2D::configDialog.

virtual void cvr::viewerBase::viewerBase::configDialog::initToolkit (  )  [protected, virtual]

Initialize toolkit dependent class.

This is called at construction time but is implemented by the toolkit being used.

virtual bool cvr::viewerBase::viewerBase::configDialog::onApplyButtonClicked (  )  [protected, virtual]

Virtual function called when the user clicks the apply button.

virtual bool cvr::viewerBase::viewerBase::configDialog::onCancelButtonClicked (  )  [protected, virtual]

Virtual function called when the user clicks the cancel button.

virtual bool cvr::viewerBase::viewerBase::configDialog::onOkButtonClicked (  )  [protected, virtual]

Virtual function called when the user clicks the ok button.

configDialog& cvr::viewerBase::viewerBase::configDialog::operator= ( const configDialog other  )  [protected]

Disable operator=.

virtual bool cvr::viewerBase::viewerBase::configDialog::setParameters ( const parameters par  )  [virtual]

Set a copy of the given parameters.

Here at the base class this method just set-ups the pointer making a copy of the given parameters.

Inherited classes have to set also the GUI elements of the configuration dialog to the corresponding parameters.

Reimplemented in cvr::viewer2D::viewer2D::configDialog.

virtual bool cvr::viewerBase::viewerBase::configDialog::show (  )  [virtual]

Show the configuration dialog.

Reimplemented in cvr::viewer2D::viewer2D::configDialog.

virtual bool cvr::viewerBase::viewerBase::configDialog::useInformation ( const information dataInfo  )  [virtual]

Use the given information block.

This method does not copy the information block, it just stores a reference to the given instance.

Inherited methods should call this one and transfer all data in the information block to the GUI elements.

Reimplemented in cvr::viewer2D::viewer2D::configDialog.

bool cvr::viewerBase::viewerBase::configDialog::validInformation (  )  const

Check if an information block has been assigned or not.


Member Data Documentation

parameters* cvr::viewerBase::viewerBase::configDialog::params_ [protected]

Parameters of the configuration dialog.

They are a copy of the given parameters, and they have to be removed by this class.

viewerBase* cvr::viewerBase::viewerBase::configDialog::parent_ [protected]

Reference to the parent viewer.

tk* cvr::viewerBase::viewerBase::configDialog::tk_ [mutable, protected]

The toolkit instance created only at construction time through the initToolkit() method and destroyed in the destructor through the destroyToolkit() method.


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

Generated on Sun Sep 20 22:09:11 2009 for CVR-Lib by Doxygen 1.5.8