41 #ifndef OPTIKA_DELEGATE_HPP_
42 #define OPTIKA_DELEGATE_HPP_
43 #include <QItemDelegate>
44 #include <QModelIndex>
77 QWidget*
createEditor(QWidget *parent,
const QStyleOptionViewItem &option,
const QModelIndex &index)
const;
79 virtual void setEditorData(QWidget *editor,
const QModelIndex &index)
const;
81 void setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index)
const;
83 virtual void updateEditorGeometry(QWidget *editor,
const QStyleOptionViewItem &option,
const QModelIndex &index)
const;
100 static const QString boolEditorTrue(
"true");
101 return boolEditorTrue;
114 static const QString boolEditorFalse(
"false");
115 return boolEditorFalse;
132 QWidget*
getArrayEditor(
const QModelIndex& index, QString type, QWidget *parent,
bool isTwoD=
false)
const;
142 void setArrayWidgetData(QWidget* editor, QString type,
const QModelIndex& index,
bool isTwoD=
false)
const;
static const QString & getBoolEditorTrue()
Gets the value the delegate uses to represent "true" when constructing comboboxes for boolean paramet...
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
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.
static const QString & getBoolEditorFalse()
Gets the value the delegate uses to represent "false" when constructing comboboxes for boolean parame...
QVariant extractValueFromArray(QWidget *editor, QString type, bool isTwoD=false) const
Gets an array from an ArrayWidget and puts it into a QVariant.
virtual void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const
Delegate(QObject *parent=0)
Constructs a Delegate.
virtual void setEditorData(QWidget *editor, const QModelIndex &index) const
QWidget * getArrayEditor(const QModelIndex &index, QString type, QWidget *parent, bool isTwoD=false) const
Creates an ArrayWidget to edit the parameter at the given QModelIndex.
The delegate used for the Optika package. For non-documented functions please refer to the Qt API...