Optika GUI Toolik Version of the Day
Optika::Delegate Class Reference

The delegate used for the Optika package. For non-documented functions please refer to the Qt API. More...

#include <Optika_delegate.hpp>

List of all members.

Constructors

 Delegate (QObject *parent=0)
 Constructs a Delegate.

Overridden from QItemDelegate

QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
 
virtual void setEditorData (QWidget *editor, const QModelIndex &index) const
 
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
 
virtual void updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const
 

Constant obtaining functions.

static const QString & getBoolEditorTrue ()
 Gets the value the delegate uses to represent "true" when constructing comboboxes for boolean parameters.
static const QString & getBoolEditorFalse ()
 Gets the value the delegate uses to represent "false" when constructing comboboxes for boolean parameters.

Private Functions

QWidget * getArrayEditor (const QModelIndex &index, QString type, QWidget *parent, bool isTwoD=false) const
 Creates an ArrayWidget to edit the parameter at the given QModelIndex.
void setArrayWidgetData (QWidget *editor, QString type, const QModelIndex &index, bool isTwoD=false) const
 Sets the data in an array widget to the current values found at index.
QVariant extractValueFromArray (QWidget *editor, QString type, bool isTwoD=false) const
 Gets an array from an ArrayWidget and puts it into a QVariant.

Detailed Description

The delegate used for the Optika package. For non-documented functions please refer to the Qt API.

Definition at line 45 of file Optika_delegate.hpp.


Constructor & Destructor Documentation

Optika::Delegate::Delegate ( QObject *  parent = 0)

Constructs a Delegate.

Parameters:
parentThe parent object of the Delegate.

Definition at line 39 of file Optika_delegate.cpp.


Member Function Documentation

QWidget * Optika::Delegate::createEditor ( QWidget *  parent,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const

*

Definition at line 41 of file Optika_delegate.cpp.

void Optika::Delegate::setEditorData ( QWidget *  editor,
const QModelIndex &  index 
) const [virtual]

*

Definition at line 138 of file Optika_delegate.cpp.

void Optika::Delegate::setModelData ( QWidget *  editor,
QAbstractItemModel *  model,
const QModelIndex &  index 
) const

*

Definition at line 171 of file Optika_delegate.cpp.

void Optika::Delegate::updateEditorGeometry ( QWidget *  editor,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const [virtual]

*

Definition at line 220 of file Optika_delegate.cpp.

static const QString& Optika::Delegate::getBoolEditorTrue ( ) [inline, static]

Gets the value the delegate uses to represent "true" when constructing comboboxes for boolean parameters.

Returns:
The value the delegate uses to represent "true" when constructing comboboxes for boolean parameters.

Definition at line 86 of file Optika_delegate.hpp.

static const QString& Optika::Delegate::getBoolEditorFalse ( ) [inline, static]

Gets the value the delegate uses to represent "false" when constructing comboboxes for boolean parameters.

Returns:
The value the delegate uses to represent "false" when constructing comboboxes for boolean parameters.

Definition at line 100 of file Optika_delegate.hpp.

QWidget * Optika::Delegate::getArrayEditor ( const QModelIndex &  index,
QString  type,
QWidget *  parent,
bool  isTwoD = false 
) const [private]

Creates an ArrayWidget to edit the parameter at the given QModelIndex.

Parameters:
indexIndex of the parameter to edit.
typeThe template type of the array.
parentThe parent widget.
Returns:
An array widget with which to edit the parameter.

Definition at line 224 of file Optika_delegate.cpp.

void Optika::Delegate::setArrayWidgetData ( QWidget *  editor,
QString  type,
const QModelIndex &  index,
bool  isTwoD = false 
) const [private]

Sets the data in an array widget to the current values found at index.

Parameters:
editorArrayWidget whose values are to be set.
typeThe template type of the array.
indexThe index of the parameter whose values are going to be put in the ArrayWidget.

Definition at line 275 of file Optika_delegate.cpp.

QVariant Optika::Delegate::extractValueFromArray ( QWidget *  editor,
QString  type,
bool  isTwoD = false 
) const [private]

Gets an array from an ArrayWidget and puts it into a QVariant.

Parameters:
editorThe ArrayWidget which has the array we want to put into a QVariant.
typethe template type of the array.
Returns:
A Qvariant containing an array that is equal to the array in the given ArrayWidget.

Definition at line 309 of file Optika_delegate.cpp.


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