Sayonara Player
ListDelegate.h
1 #ifndef LISTDELEGATE_H_
2 #define LISTDELEGATE_H_
3 
4 #include <QStyledItemDelegate>
5 #include <QSize>
6 #include <QStyleOptionViewItem>
7 #include <QModelIndex>
8 #include <QListView>
9 
10 #include "Helper/Settings/SayonaraClass.h"
11 
12 class ListDelegate :
13  public QStyledItemDelegate,
14  protected SayonaraClass
15 {
16  Q_OBJECT
17 
18 protected:
19  QListView* _parent=nullptr;
20 
21 public:
22  ListDelegate(QListView* parent=nullptr);
23  virtual ~ListDelegate();
24 
25  virtual QSize sizeHint(const QStyleOptionViewItem &option,
26  const QModelIndex &index) const override;
27 
28  virtual void paint( QPainter *painter,
29  const QStyleOptionViewItem &option,
30  const QModelIndex &index) const override;
31 
32 };
33 
34 #endif
The SayonaraClass class provides access to Settings and notifications.
Definition: SayonaraClass.h:31
Definition: ListDelegate.h:12