FactDev  0.1
doublespinboxdelegate.h
1 #ifndef SPINBOXDELEGATE_H
2 #define SPINBOXDELEGATE_H
3 
4 #include <QItemDelegate>
5 #include <QDoubleSpinBox>
6 
7 namespace Gui {
8 namespace Widgets {
9 namespace Delegates {
10 
15 class DoubleSpinBoxDelegate : public QItemDelegate
16 {
17  Q_OBJECT
18 
19 public:
24  DoubleSpinBoxDelegate(QObject *parent = 0);
25 
35  QWidget *createEditor(QWidget *parent,
36  const QStyleOptionViewItem &option,
37  const QModelIndex &index) const;
38 
46  void setEditorData(QWidget *editor, const QModelIndex &index) const;
47 
55  void setModelData(QWidget *editor,
56  QAbstractItemModel *model,
57  const QModelIndex &index) const;
58 
67  void updateEditorGeometry(QWidget *editor,
68  const QStyleOptionViewItem &option,
69  const QModelIndex &index) const;
70 };
71 
72 }
73 }
74 }
75 #endif // SPINBOXDELEGATE_H
DoubleSpinBoxDelegate(QObject *parent=0)
DoubleSpinBoxDelegate::DoubleSpinBoxDelegate.
Definition: doublespinboxdelegate.cpp:7
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const
DoubleSpinBoxDelegate::updateEditorGeometry Update the editor for the item specified by index accordi...
Definition: doublespinboxdelegate.cpp:30
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
DoubleSpinBoxDelegate::setEditorData Sets the data to be displayed and edited by the editor from the ...
Definition: doublespinboxdelegate.cpp:38
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
DoubleSpinBoxDelegate::createEditor Return a ComboBox specified by index item defined by the parent w...
Definition: doublespinboxdelegate.cpp:11
void setEditorData(QWidget *editor, const QModelIndex &index) const
DoubleSpinBoxDelegate::setEditorData Sets the data to be displayed and edited by the editor from the ...
Definition: doublespinboxdelegate.cpp:21
The DoubleSpinBoxDelegate class.
Definition: doublespinboxdelegate.h:15