summaryrefslogtreecommitdiff
path: root/src/modflagicondelegate.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/modflagicondelegate.h
parent76796796bec37a1670cfc4e0b1e42e7b1096b237 (diff)
Display children contents in collapsed separator.
Diffstat (limited to 'src/modflagicondelegate.h')
-rw-r--r--src/modflagicondelegate.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/modflagicondelegate.h b/src/modflagicondelegate.h
index c6c7c3e8..63ab8978 100644
--- a/src/modflagicondelegate.h
+++ b/src/modflagicondelegate.h
@@ -1,32 +1,30 @@
#ifndef MODFLAGICONDELEGATE_H
#define MODFLAGICONDELEGATE_H
+#include <QTreeView>
+
#include "icondelegate.h"
+#include "modinfo.h"
class ModFlagIconDelegate : public IconDelegate
{
Q_OBJECT;
public:
- explicit ModFlagIconDelegate(QObject *parent = 0, int logicalIndex = -1, int compactSize = 120);
+ explicit ModFlagIconDelegate(QTreeView* view, int column = -1, int compactSize = 120);
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
- static QList<QString> getIconsForFlags(
- std::vector<ModInfo::EFlag> flags, bool compact);
-
+protected:
+ static QList<QString> getIconsForFlags(std::vector<ModInfo::EFlag> flags, bool compact);
static QString getFlagIcon(ModInfo::EFlag flag);
-public slots:
- void columnResized(int logicalIndex, int oldSize, int newSize);
-
-protected:
QList<QString> getIcons(const QModelIndex &index) const override;
size_t getNumIcons(const QModelIndex &index) const override;
-private:
- int m_LogicalIndex;
- int m_CompactSize;
- bool m_Compact;
+ // constructor for color table
+ //
+ ModFlagIconDelegate() : ModFlagIconDelegate(nullptr) { }
+
};
#endif // MODFLAGICONDELEGATE_H