26 #ifndef DOUBLESPINDELEGATE_H
27 #define DOUBLESPINDELEGATE_H
29 #include <QDoubleSpinBox>
30 #include <QItemDelegate>
43 QWidget *
createEditor(QWidget *parent,
const QStyleOptionViewItem &option,
44 const QModelIndex &index)
const;
46 void setEditorData(QWidget *editor,
const QModelIndex &index)
const;
47 void setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index)
const;
50 const QModelIndex &index)
const;
52 void setMin(
double min) { m_min = min; }
53 void setMax(
double max) { m_max = max; }
59 void setStep(
double step) { m_step = step; }
75 #endif // DOUBLESPINDELEGATE_H
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const
void setStep(double step)
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
void setDecimals(int decimals)
void setEditorData(QWidget *editor, const QModelIndex &index) const
DoubleSpinDelegate(QObject *parent=nullptr)
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
void setRange(double min, double max)