Optika GUI Toolik  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
Optika::Generic2DArrayWidget< S > Class Template Referenceabstract

An abstract base class for all 2D Array Widets. More...

#include <Optika_ArrayWidget.hpp>

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

Constructors

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

Getters and Setters

void initData (TwoDArray< 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...
 
TwoDArray< S > getArrayFromWidgets ()
 Retrieves all the data currently entered in each of the individual widgets and compiles it into a TwoDArray. More...
 
virtual S getWidgetValue (int row, int col)=0
 Gets the current value entred in the widget located at row,col. More...
 
TwoDArray< S > getData () const
 gets the data currently stored in baseArray. More...
 

Protected Functions

void doAcceptWork ()
 Do all the things that need to be done when accept is called. More...
 
virtual QWidget * getEditorWidget (int row, int col)=0
 

Protected members

TwoDArray< QWidget * > widgetArray
 An array containing the individual widgets which make up the array widget editor. The widget at row,col is the widget which will edit the value at row,col in the baseArray. More...
 
TwoDArray< S > baseArray
 The actual array data that the widget is editing. When the user is finished editing, this TwoDArray is then populated with the values they entered. More...
 

Private functions

QLayout * getArrayLayout ()
 Retrieves the layout to be used in the array container. More...
 

Additional Inherited Members

- 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. More...
 
const RCP< const
ParameterEntryValidator
getEntryValidator () const
 Returns the validator being used on the array. More...
 
virtual void accept ()=0
 called when the user is done entering data into the widget. MUST BE IMPLEMENTED AS A SLOT IN CONCRETE SUBCLASSES! More...
 
 GenericArrayWidget (QString name, QString type, const RCP< const ParameterEntryValidator > validator, QWidget *parent=0)
 Constructs a GenericArrayWidget. More...
 
- 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. More...
 
- 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. More...
 

Detailed Description

template<class S>
class Optika::Generic2DArrayWidget< S >

An abstract base class for all 2D Array Widets.

TwoDArray

Definition at line 235 of file Optika_ArrayWidget.hpp.

Constructor & Destructor Documentation

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

Constructs a Generic2DArrayWidget.

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

Definition at line 378 of file Optika_ArrayWidget.hpp.

Member Function Documentation

template<class S>
void Optika::Generic2DArrayWidget< S >::initData ( TwoDArray< 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 270 of file Optika_ArrayWidget.hpp.

template<class S>
TwoDArray<S> Optika::Generic2DArrayWidget< S >::getArrayFromWidgets ( )
inline

Retrieves all the data currently entered in each of the individual widgets and compiles it into a TwoDArray.

Returns
A TwoDArray representing the current values in the idividual widgets.

Definition at line 282 of file Optika_ArrayWidget.hpp.

template<class S>
virtual S Optika::Generic2DArrayWidget< S >::getWidgetValue ( int  row,
int  col 
)
pure virtual

Gets the current value entred in the widget located at row,col.

Returns
The value entered in the widget at row,col.

Implemented in Optika::String2DArrayWidget, Optika::Float2DArrayWidget, Optika::Double2DArrayWidget, Optika::Short2DArrayWidget, and Optika::Int2DArrayWidget.

template<class S>
TwoDArray<S> Optika::Generic2DArrayWidget< S >::getData ( ) const
inline

gets the data currently stored in baseArray.

Definition at line 311 of file Optika_ArrayWidget.hpp.

template<class S>
void Optika::Generic2DArrayWidget< S >::doAcceptWork ( )
inlineprotectedvirtual

Do all the things that need to be done when accept is called.

Namely, set the base array to what is currently entered in the individual widgets and call done.

Implements Optika::GenericArrayWidget< S >.

Definition at line 328 of file Optika_ArrayWidget.hpp.

template<class S>
virtual QWidget* Optika::Generic2DArrayWidget< S >::getEditorWidget ( int  row,
int  col 
)
protectedpure virtual

Get a widget used for editing the value located at row,col in the baseArray.

Parameters
rowThe row of the value for which an editor widget is desired.
colThe column of the value for which and editor widget is desired.
Returns
An editor widget used to edit the value at row,co. in the baseArray.

Implemented in Optika::String2DArrayWidget, Optika::Float2DArrayWidget, Optika::Double2DArrayWidget, Optika::Short2DArrayWidget, and Optika::Int2DArrayWidget.

template<class S >
QLayout * Optika::Generic2DArrayWidget< S >::getArrayLayout ( )
privatevirtual

Retrieves the layout to be used in the array container.

Implements Optika::GenericArrayWidget< S >.

Definition at line 388 of file Optika_ArrayWidget.hpp.

Member Data Documentation

template<class S>
TwoDArray<QWidget*> Optika::Generic2DArrayWidget< S >::widgetArray
protected

An array containing the individual widgets which make up the array widget editor. The widget at row,col is the widget which will edit the value at row,col in the baseArray.

Definition at line 354 of file Optika_ArrayWidget.hpp.

template<class S>
TwoDArray<S> Optika::Generic2DArrayWidget< S >::baseArray
protected

The actual array data that the widget is editing. When the user is finished editing, this TwoDArray is then populated with the values they entered.

Definition at line 361 of file Optika_ArrayWidget.hpp.


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