aboutsummaryrefslogtreecommitdiff
path: root/libs/installer_bsplugins/src/BSPluginList/PluginListStyledItemDelegate.h
blob: 9ef2b819fc19b6e5124cc39f3ba14ca510be42cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef BSPLUGINLIST_PLUGINLISTSTYLEDITEMDELEGATE_H
#define BSPLUGINLIST_PLUGINLISTSTYLEDITEMDELEGATE_H

#include <QStyledItemDelegate>

namespace BSPluginList
{

class PluginListView;

class PluginListStyledItemDelegate final : public QStyledItemDelegate
{
  Q_OBJECT

public:
  explicit PluginListStyledItemDelegate(PluginListView* view);

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

protected:
  void initStyleOption(QStyleOptionViewItem* option,
                       const QModelIndex& index) const override;

private:
  PluginListView* m_View;
};

}  // namespace BSPluginList

#endif  // BSPLUGINLIST_PLUGINLISTSTYLEDITEMDELEGATE_H