summaryrefslogtreecommitdiff
path: root/src/modcontenticondelegate.h
blob: 736244f6cf9177e4fe094d47353156c57ecc94b2 (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
#ifndef MODCONTENTICONDELEGATE_H
#define MODCONTENTICONDELEGATE_H

#include "icondelegate.h"

class ModListView;

class ModContentIconDelegate : public IconDelegate
{
  Q_OBJECT
public:
  explicit ModContentIconDelegate(ModListView* view, int column = -1,
                                  int compactSize = 150);

  bool helpEvent(QHelpEvent* event, QAbstractItemView* view,
                 const QStyleOptionViewItem& option, const QModelIndex& index) override;

protected:
  QList<QString> getIcons(const QModelIndex& index) const override;
  size_t getNumIcons(const QModelIndex& index) const override;

  // constructor for color table
  //
  ModContentIconDelegate() : ModContentIconDelegate(nullptr) {}

private:
  ModListView* m_view;
};

#endif  // GENERICICONDELEGATE_H