Optika Development
Public Member Functions
Optika::GenericArrayWidget< S > Class Template Reference

An Abstract base class for both 2D and 1D ArrayWidgets. More...

#include <Optika_ArrayWidget.hpp>

Inheritance diagram for Optika::GenericArrayWidget< S >:
Inheritance graph
[legend]
Collaboration diagram for Optika::GenericArrayWidget< S >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

const QString getType () const
 Gets the type of array being edited.
const QString getName () const
 Returns the name of the parameter being edits.
const RCP< const
ParameterEntryValidator > 
getEntryValidator () const
 Returns the validator being used on the array.
virtual void accept ()=0
 called when the user is done entering data into the widget. MUST BE IMPLEMENTED AS A SLOT IN CONCRETE SUBCLASSES!
Constructors
 GenericArrayWidget (QString name, QString type, const RCP< const ParameterEntryValidator > validator, QWidget *parent=0)
 Constructs a GenericArrayWidget.

Protected Member Functions

Protected Functions
virtual void setupArrayLayout ()
 Sets up the layout for the arrayContainer, including adding what ever editing widget should be used for the particual type of array.
virtual QLayout * getArrayLayout ()=0
 Get's the layout to be used for the array container in the widget.
virtual void doAcceptWork ()=0
 Gathers all the user inputed data and closes the dialog.

Protected Attributes

Protected Members
QWidget * arrayContainer
 The widget containing all of the editing widgets (e.g. QLineEdits, and QSpinBoxes) that comprise the array editor.

Detailed Description

template<class S>
class Optika::GenericArrayWidget< S >

An Abstract base class for both 2D and 1D ArrayWidgets.

Note the absence of the Q_OBJECT macro. This is becuase classes using the Q_OBJECT macro can't be templated (bummer). The macro is therfore present in the subclasses.


Constructor & Destructor Documentation

template<class S >
Optika::GenericArrayWidget< S >::GenericArrayWidget ( QString  name,
QString  type,
const RCP< const ParameterEntryValidator >  validator,
QWidget *  parent = 0 
)

Constructs a GenericArrayWidget.

Parameters:
nameThe name of the parameter beting edited.
typeThe arrays template type.
validatorThe validator to be used on the Array.
parentThe parent widget.

References Optika::GenericArrayWidget< S >::accept(), and Optika::GenericArrayWidget< S >::arrayContainer.


Member Function Documentation

template<class S>
virtual QLayout* Optika::GenericArrayWidget< S >::getArrayLayout ( ) [protected, pure virtual]

Get's the layout to be used for the array container in the widget.

Returns:
The layout to be used for the array container in the widget.

Referenced by Optika::GenericArrayWidget< short >::setupArrayLayout().

template<class S>
const QString Optika::GenericArrayWidget< S >::getType ( ) const [inline]

Gets the type of array being edited.

Returns:
The type of array being edited.

The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs