diff options
| author | Mikaƫl Capelle <capelle.mikael@gmail.com> | 2021-01-11 12:49:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-11 12:49:42 +0100 |
| commit | 1dc2b225485a073d82e08a9820493086b2dda8b8 (patch) | |
| tree | 5a4e5478d577f065c7282cb62992c2b6c735e13f /src/modconflicticondelegate.h | |
| parent | a680dfa3e94b34bf6b0ebd65d29d7a9799e3183f (diff) | |
| parent | 05efc74e402ca3770d9fdaa2557f4030c31ee198 (diff) | |
Merge pull request #1350 from Holt59/collapsible-separators
Collapsible separators - Fix & Improvements.
Diffstat (limited to 'src/modconflicticondelegate.h')
| -rw-r--r-- | src/modconflicticondelegate.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/modconflicticondelegate.h b/src/modconflicticondelegate.h index a44ce89b..fd524444 100644 --- a/src/modconflicticondelegate.h +++ b/src/modconflicticondelegate.h @@ -4,6 +4,7 @@ #include <array> #include "icondelegate.h" +#include "modinfo.h" class ModListView; @@ -12,12 +13,9 @@ class ModConflictIconDelegate : public IconDelegate Q_OBJECT; public: - explicit ModConflictIconDelegate(ModListView* parent = nullptr, int logicalIndex = -1, int compactSize = 80); + explicit ModConflictIconDelegate(ModListView* view, 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); @@ -26,6 +24,10 @@ protected: QList<QString> getIcons(const QModelIndex &index) const override; size_t getNumIcons(const QModelIndex &index) const override; + // constructor for color table + // + ModConflictIconDelegate() : ModConflictIconDelegate(nullptr) { } + private: static constexpr std::array s_ConflictFlags{ ModInfo::FLAG_CONFLICT_MIXED, @@ -43,10 +45,7 @@ private: ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITTEN }; - ModListView* m_View; - int m_LogicalIndex; - int m_CompactSize; - bool m_Compact; + ModListView* m_view; }; #endif // MODCONFLICTICONDELEGATE_H |
