Optika  Development
 All Classes Files Functions Variables Typedefs Pages
List of all members
Optika::Generic1DArrayWidget< S > Class Template Referenceabstract

A templated abstract base class for all 1D array editing widgets. More...

#include <Optika_ArrayWidget.hpp>

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

Public Member Functions

Constructor
 Generic1DArrayWidget (QString name, QString type, const RCP< const ParameterEntryValidator > validator, QWidget *parent=0)
 Constructs a Generic1DArrayWidget. More...
 
Attribute/Query Methods
const Array< S > getData () const
 
Miscellaneous
void initData (Array< S > array)
 Initializes all of the data in the array widget so when it pops up, the individual widgets are populate with their current values in the array. Also, sets the baseArray to array. More...
 
virtual QWidget * getEditorWidget (int index)=0
 Gets the widget to be used as an editor for each entry in the array.
 
virtual Array< S > getArrayFromWidgets ()=0
 Get a new array reflecting the current values entered in the widgets. More...
 
- Public Member Functions inherited from Optika::GenericArrayWidget< S >
const QString getType () const
 Gets the type of array being edited. More...
 
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!
 
 GenericArrayWidget (QString name, QString type, const RCP< const ParameterEntryValidator > validator, QWidget *parent=0)
 Constructs a GenericArrayWidget. More...
 

Protected Types

Protected types
typedef std::vector< QWidget * > WVector
 Convienece typedef. Represents an array of QWidgets.
 

Protected Member Functions

Overriden from GenericArrayWidget
void doAcceptWork ()
 
- Protected Member Functions inherited from Optika::GenericArrayWidget< S >
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.
 

Protected Attributes

Protected members
WVector widgetVector
 Conatins the editing widgets (e.g. QLineEdits and QSpinBoxes) comprising the array editor.
 
Array< S > baseArray
 The array to be edited.
 
- Protected Attributes inherited from Optika::GenericArrayWidget< S >
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::Generic1DArrayWidget< S >

A templated abstract base class for all 1D array editing widgets.

Array

Constructor & Destructor Documentation

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

Constructs a Generic1DArrayWidget.

Parameters
nameThe name of the parmaeter being edited.
typeThe array's template type.
validatorThe validator on the array (null if there is none).
parentThe parent widget.

Member Function Documentation

template<class S>
virtual Array<S> Optika::Generic1DArrayWidget< S >::getArrayFromWidgets ( )
pure virtual

Get a new array reflecting the current values entered in the widgets.

Returns
A new array reflecting the currecnt values entered in the widgets.

Implemented in Optika::StringArrayWidget, Optika::FloatArrayWidget, Optika::DoubleArrayWidget, Optika::ShortArrayWidget, and Optika::IntArrayWidget.

template<class S>
const Array<S> Optika::Generic1DArrayWidget< S >::getData ( ) const
inline

Return the array backing this widget.

Parameters
Thearray backing this widget.
template<class S>
void Optika::Generic1DArrayWidget< S >::initData ( Array< S >  array)
inline

Initializes all of the data in the array widget so when it pops up, the individual widgets are populate with their current values in the array. Also, sets the baseArray to array.

Parameters
arrayThe array that should be used to populate the individual widgets making up the ArrayWidget.

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