summaryrefslogtreecommitdiff
path: root/src/modcontenticondelegate.h
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2021-01-06 19:43:21 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-10 10:27:22 +0100
commit1ac3f4d8e8ee7461f047d34e196df40499e89557 (patch)
tree803e663c2da154d0d48a4f284185b37c53e0b2f2 /src/modcontenticondelegate.h
parent76796796bec37a1670cfc4e0b1e42e7b1096b237 (diff)
Display children contents in collapsed separator.
Diffstat (limited to 'src/modcontenticondelegate.h')
-rw-r--r--src/modcontenticondelegate.h30
1 files changed, 30 insertions, 0 deletions
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<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