summaryrefslogtreecommitdiff
path: root/src/modconflicticondelegate.h
diff options
context:
space:
mode:
authorChris Bessent <lost.dragonist@gmail.com>2020-01-06 05:17:01 -0700
committerGitHub <noreply@github.com>2020-01-06 05:17:01 -0700
commitdfa600996c49c1b23dca884c963dc917bd9cfc0a (patch)
treec6def4277cc962822d0dcde71fa9148e050f693f /src/modconflicticondelegate.h
parente69078e2399a88bda7bb9ffae7a3d57db9a4e9cf (diff)
parentd1a788dfad341b32235abc25c2ba1645f8be1ace (diff)
Merge pull request #954 from ModOrganizer2/Develop
Stage for release 2.2.2
Diffstat (limited to 'src/modconflicticondelegate.h')
-rw-r--r--src/modconflicticondelegate.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/modconflicticondelegate.h b/src/modconflicticondelegate.h
new file mode 100644
index 00000000..8645da12
--- /dev/null
+++ b/src/modconflicticondelegate.h
@@ -0,0 +1,36 @@
+#ifndef MODCONFLICTICONDELEGATE_H
+#define MODCONFLICTICONDELEGATE_H
+
+#include "icondelegate.h"
+
+class ModConflictIconDelegate : public IconDelegate
+{
+ Q_OBJECT;
+
+public:
+ explicit ModConflictIconDelegate(QObject *parent = 0, int logicalIndex = -1, int compactSize = 80);
+ virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
+
+ static QList<QString> getIconsForFlags(
+ std::vector<ModInfo::EConflictFlag> flags, bool compact);
+
+ static QString getFlagIcon(ModInfo::EConflictFlag flag);
+
+public slots:
+ void columnResized(int logicalIndex, int oldSize, int newSize);
+
+protected:
+ virtual QList<QString> getIcons(const QModelIndex &index) const;
+ virtual size_t getNumIcons(const QModelIndex &index) const;
+
+private:
+ static ModInfo::EConflictFlag m_ConflictFlags[4];
+ static ModInfo::EConflictFlag m_ArchiveLooseConflictFlags[2];
+ static ModInfo::EConflictFlag m_ArchiveConflictFlags[3];
+
+ int m_LogicalIndex;
+ int m_CompactSize;
+ bool m_Compact;
+};
+
+#endif // MODCONFLICTICONDELEGATE_H