CCIMXDesktop
 
Loading...
Searching...
No Matches
SessionDrawDelegate.h
1#ifndef SESSIONDRAWDELEGATE_H
2#define SESSIONDRAWDELEGATE_H
3#include <QStyledItemDelegate>
4
5class SessionDrawDelegate : public QStyledItemDelegate {
6public:
7 explicit SessionDrawDelegate(QObject* parent = nullptr);
8 void paint(QPainter* p, const QStyleOptionViewItem& opt, const QModelIndex& idx) const override;
9
10 QSize sizeHint(const QStyleOptionViewItem&, const QModelIndex&) const override;
11
12private:
13 void paintSelectedBkground(QPainter* p, const QStyleOptionViewItem& opt, const QModelIndex& idx) const;
14 void paintAvatar(QPainter* p, const QStyleOptionViewItem& opt, const QModelIndex& idx) const;
15 void paintText(QPainter* p, const QStyleOptionViewItem& opt, const QModelIndex& idx) const;
16 void paintUnread(QPainter* p, const QStyleOptionViewItem& opt, const QModelIndex& idx) const;
17};
18
19#endif // SESSIONDRAWDELEGATE_H
Definition SessionDrawDelegate.h:5