aheinecke@404: /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik aheinecke@404: * Software engineering by Intevation GmbH aheinecke@404: * aheinecke@404: * This file is Free Software under the GNU GPL (v>=2) aheinecke@404: * and comes with ABSOLUTELY NO WARRANTY! aheinecke@404: * See LICENSE.txt for details. aheinecke@404: */ 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: andre@1255: /** andre@1255: * @brief Item delegate drawing a separator in list widgets. andre@1255: */ 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