#ifndef LISTVIEWDELEGATE_H
#define LISTVIEWDELEGATE_H

#include <QtGui>
#include <QStyledItemDelegate>

class ListviewDelegate : public QStyledItemDelegate
{
public:
    ListviewDelegate();
    virtual ~ListviewDelegate();

   // enum datarole {headerTextRole = Qt::UserRole + 100,subHeaderTextrole = Qt::UserRole+101,IconRole = Qt::UserRole+102};
    enum datarole {threadRole = Qt::UserRole + 100,IconRole = Qt::UserRole+101,typeRole = Qt::UserRole+102,patternRole = Qt::UserRole+103,IndexRole = Qt::UserRole+104,NbpointsRole = Qt::UserRole+105};

    void paint(QPainter *painter, const QStyleOptionViewItem &option,
               const QModelIndex &index) const;

    QSize sizeHint(const QStyleOptionViewItem &option,
                   const QModelIndex &index ) const;
};

#endif // LISTVIEWDELEGATE_H
