00001 #ifndef EXERCISEDELEGATE_H 00002 #define EXERCISEDELEGATE_H 00003 00004 #include <QStyledItemDelegate> 00005 00006 class ExerciseDelegate : public QStyledItemDelegate 00007 { 00008 public: 00009 ExerciseDelegate(QWidget *parent = 0); 00010 QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const; 00011 void setEditorData(QWidget *editor, const QModelIndex &index) const; 00012 void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const; 00013 void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index ) const; 00014 }; 00015 00016 #endif // EXERCISEDELEGATE_H