6#include <QtWidgets/QItemDelegate>
13class CTaskItemDelegate:
public QItemDelegate
16 typedef QItemDelegate BaseClass;
20 DR_TASK_UUID = Qt::UserRole,
26 DR_TASK_PREVIEW_OBJECT,
27 DR_TASK_PROCESSING_STATE,
28 DR_TASK_PROCESSING_STATE_ICON,
30 DR_LAST = DR_TASK_ENABLED
33 CTaskItemDelegate(QObject* parent =
nullptr);
37 virtual QSize sizeHint(
const QStyleOptionViewItem& option,
const QModelIndex& index)
const override;
38 virtual void paint(QPainter* painter,
const QStyleOptionViewItem& option,
const QModelIndex& index)
const override;
39 virtual QWidget* createEditor(QWidget* parent,
const QStyleOptionViewItem& option,
const QModelIndex& index)
const override;
43class CMicroTaskItemDelegate :
public CTaskItemDelegate
46 typedef CTaskItemDelegate BaseClass;
48 CMicroTaskItemDelegate(QObject* parent =
nullptr);
52 virtual void paint(QPainter* painter,
const QStyleOptionViewItem& option,
const QModelIndex& index)
const override;