From 1ac3f4d8e8ee7461f047d34e196df40499e89557 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Wed, 6 Jan 2021 19:43:21 +0100 Subject: Display children contents in collapsed separator. --- src/modcontenticondelegate.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/modcontenticondelegate.h (limited to 'src/modcontenticondelegate.h') diff --git a/src/modcontenticondelegate.h b/src/modcontenticondelegate.h new file mode 100644 index 00000000..c195df18 --- /dev/null +++ b/src/modcontenticondelegate.h @@ -0,0 +1,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 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 -- cgit v1.3.1