1 #ifndef CHANNELSITEMDELEGATE_H
2 #define CHANNELSITEMDELEGATE_H
3 
4 #include <QtGui>
5 
6 class ChannelsItemDelegate : public QStyledItemDelegate {
7 
8     Q_OBJECT
9 
10 public:
11     ChannelsItemDelegate(QObject* parent = 0);
12     QSize sizeHint(const QStyleOptionViewItem&, const QModelIndex&) const;
13     void paint(QPainter*, const QStyleOptionViewItem&, const QModelIndex&) const;
14 
15 private:
16     void paintChannel(QPainter*, const QStyleOptionViewItem&, const QModelIndex&) const;
17     void paintAggregate(QPainter*, const QStyleOptionViewItem&, const QModelIndex&) const;
18     void paintUnwatched(QPainter*, const QStyleOptionViewItem&, const QModelIndex&) const;
19     void paintBadge(QPainter *painter, const QRect &line, const QString &text) const;
20     void drawItem(QPainter*, const QRect &line, const QPixmap &thumbnail, const QString &name) const;
21 
22 };
23 
24 #endif // CHANNELSITEMDELEGATE_H
25