Optika GUI Toolik Version of the Day
Optika::Generic1DArrayWidget< S > Class Template Reference

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]

List of all members.

Constructor

 Generic1DArrayWidget (QString name, QString type, const RCP< const ParameterEntryValidator > validator, QWidget *parent=0)
 Constructs a Generic1DArrayWidget.

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.
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.

Protected types

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

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.

Overriden from GenericArrayWidget

void doAcceptWork ()
 

Private Functions

QLayout * getArrayLayout ()
 Get's the layout to be used for the array container in the widget.

Detailed Description

template<class S>
class Optika::Generic1DArrayWidget< S >

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

Array

Definition at line 766 of file Optika_ArrayWidget.hpp.


Member Typedef Documentation

template<class S>
typedef std::vector<QWidget*> Optika::Generic1DArrayWidget< S >::WVector [protected]

Convienece typedef. Represents an array of QWidgets.

Definition at line 844 of file Optika_ArrayWidget.hpp.


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.

Definition at line 882 of file Optika_ArrayWidget.hpp.


Member Function Documentation

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

Return the array backing this widget.

Parameters:
Thearray backing this widget.

Definition at line 797 of file Optika_ArrayWidget.hpp.

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.

Definition at line 816 of file Optika_ArrayWidget.hpp.

template<class S>
virtual QWidget* Optika::Generic1DArrayWidget< S >::getEditorWidget ( int  index) [pure virtual]

Gets the widget to be used as an editor for each entry in the array.

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

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::IntArrayWidget, Optika::ShortArrayWidget, Optika::DoubleArrayWidget, Optika::FloatArrayWidget, and Optika::StringArrayWidget.

template<class S >
void Optika::Generic1DArrayWidget< S >::doAcceptWork ( ) [protected, virtual]

Implements Optika::GenericArrayWidget< S >.

Definition at line 904 of file Optika_ArrayWidget.hpp.

template<class S >
QLayout * Optika::Generic1DArrayWidget< S >::getArrayLayout ( ) [private, 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.

Implements Optika::GenericArrayWidget< S >.

Definition at line 892 of file Optika_ArrayWidget.hpp.


Member Data Documentation

template<class S>
WVector Optika::Generic1DArrayWidget< S >::widgetVector [protected]

Conatins the editing widgets (e.g. QLineEdits and QSpinBoxes) comprising the array editor.

Definition at line 854 of file Optika_ArrayWidget.hpp.

template<class S>
Array<S> Optika::Generic1DArrayWidget< S >::baseArray [protected]

The array to be edited.

Definition at line 859 of file Optika_ArrayWidget.hpp.


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