18 #ifndef PARAMETERDELEGATE_H
19 #define PARAMETERDELEGATE_H
21 #include <QItemDelegate>
22 #include <QModelIndex>
26 #include <QFileDialog>
36 namespace ParameterGui
68 QWidget *
createEditor(QWidget *parent,
const QStyleOptionViewItem &option,
69 const QModelIndex &index)
const;
73 QSize
sizeHint(
const QStyleOptionViewItem &option,
const QModelIndex &index)
const;
77 void paint(QPainter *painter,
const QStyleOptionViewItem &option,
const QModelIndex &index)
const;
81 void setEditorData(QWidget *editor,
const QModelIndex &index)
const;
85 void setModelData(QWidget *editor, QAbstractItemModel *model,
86 const QModelIndex &index)
const;
double double_steps
For parameters of type double a spin box will be shown as editor.
Definition: parameter_delegate.h:104
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
Reimplemented from QItemDelegate.
ParameterDelegate(const int value_column, QObject *parent=0)
Constructor, value_column specifies the column of the parameter tree this delegate will be used on...
unsigned int int_steps
For parameters of type integer a spin box will be shown as editor.
Definition: parameter_delegate.h:110
The ParameterDelegate class implements special delegates for the QTreeWidget class used in the parame...
Definition: parameter_delegate.h:54
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
This function creates the appropriate editor for the parameter based on the index.
void commit_and_close_editor()
Reimplemented from QItemDelegate.
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
Reimplemented from QItemDelegate.
void setEditorData(QWidget *editor, const QModelIndex &index) const
Reimplemented from QItemDelegate.
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
Reimplemented from QItemDelegate.
int value_column
The column this delegate will be used on.
Definition: parameter_delegate.h:98
unsigned int double_decimals
For parameters of type double a spin box will be shown as editor.
Definition: parameter_delegate.h:116