diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-06 19:43:21 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-10 10:27:22 +0100 |
| commit | 1ac3f4d8e8ee7461f047d34e196df40499e89557 (patch) | |
| tree | 803e663c2da154d0d48a4f284185b37c53e0b2f2 /src/modconflicticondelegate.h | |
| parent | 76796796bec37a1670cfc4e0b1e42e7b1096b237 (diff) | |
Display children contents in collapsed separator.
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 |
