summaryrefslogtreecommitdiff
path: root/src/modconflicticondelegate.h
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2021-01-03 12:24:27 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-03 12:24:27 +0100
commitb708bcc097122e5b4f12b520d7f9880cd3cc28aa (patch)
tree46cf3c4ea863ceaef7cf6564d619c7357b0b3ff7 /src/modconflicticondelegate.h
parent3d176cf01e402897c7ab880170dbe0d0b11292c4 (diff)
Show conflict icons from children when separator is collapsed.
Diffstat (limited to 'src/modconflicticondelegate.h')
-rw-r--r--src/modconflicticondelegate.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/modconflicticondelegate.h b/src/modconflicticondelegate.h
index 7ab1bd11..a44ce89b 100644
--- a/src/modconflicticondelegate.h
+++ b/src/modconflicticondelegate.h
@@ -5,23 +5,24 @@
#include "icondelegate.h"
+class ModListView;
+
class ModConflictIconDelegate : public IconDelegate
{
Q_OBJECT;
public:
- explicit ModConflictIconDelegate(QObject *parent = 0, int logicalIndex = -1, int compactSize = 80);
- QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
-
- static QList<QString> getIconsForFlags(
- std::vector<ModInfo::EConflictFlag> flags, bool compact);
-
- static QString getFlagIcon(ModInfo::EConflictFlag flag);
+ explicit ModConflictIconDelegate(ModListView* parent = nullptr, int logicalIndex = -1, int compactSize = 80);
+ QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex &index) const override;
public slots:
void columnResized(int logicalIndex, int oldSize, int newSize);
protected:
+
+ static QList<QString> getIconsForFlags(std::vector<ModInfo::EConflictFlag> flags, bool compact);
+ static QString getFlagIcon(ModInfo::EConflictFlag flag);
+
QList<QString> getIcons(const QModelIndex &index) const override;
size_t getNumIcons(const QModelIndex &index) const override;
@@ -42,6 +43,7 @@ private:
ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITTEN
};
+ ModListView* m_View;
int m_LogicalIndex;
int m_CompactSize;
bool m_Compact;