rrenkert@273: #ifndef SEPARATORITEMDELEGATE_H rrenkert@273: #define SEPARATORITEMDELEGATE_H rrenkert@273: /** rrenkert@273: * @file separatoritemdelegate.h rrenkert@273: * @brief Item delegate drawing a separator in list widgets. rrenkert@273: * rrenkert@273: */ rrenkert@273: rrenkert@273: #include rrenkert@273: rrenkert@273: class SeparatorItemDelegate : public QStyledItemDelegate rrenkert@273: { rrenkert@273: Q_OBJECT rrenkert@273: rrenkert@273: public: rrenkert@273: SeparatorItemDelegate(QWidget *parent = 0) : QStyledItemDelegate(parent){} rrenkert@273: rrenkert@273: /** rrenkert@273: * @brief Renders the delegate using the given painter and options. rrenkert@273: * rrenkert@273: * @param painter The painter to draw the item. rrenkert@273: * @param option The style options. rrenkert@273: * @param index The model index of the item to draw. rrenkert@273: */ rrenkert@273: void paint(QPainter *painter, const QStyleOptionViewItem &option, rrenkert@273: const QModelIndex &index) const; rrenkert@273: }; rrenkert@273: #endif