From f18b4201d891aea10a4b38bd923f4c8fc4ee7209 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 3 May 2025 01:08:13 +0200 Subject: Beautify genre display in ArchiveBrowser Display explicitly included genres with a check mark, and others with a cross mark. --- delegates.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'delegates.h') diff --git a/delegates.h b/delegates.h index 0db3bf9..d24095a 100644 --- a/delegates.h +++ b/delegates.h @@ -13,6 +13,8 @@ #include #include +class ArchiveBrowserModelProxy; + class FileNoDelegate : public QStyledItemDelegate { Q_OBJECT public: @@ -35,8 +37,11 @@ class FileTypeDelegate : public QStyledItemDelegate { class GenreDelegate : public QStyledItemDelegate { Q_OBJECT public: - explicit GenreDelegate(QObject *parent = nullptr) : QStyledItemDelegate(parent) {} - virtual QString displayText(const QVariant &value, const QLocale &locale) const; + explicit GenreDelegate(QObject *parent = nullptr, ArchiveBrowserModelProxy *proxy = nullptr) : QStyledItemDelegate(parent), mProxy(proxy) {}; + virtual QString displayText(const QVariant &value, const QLocale &locale) const; + + private: + ArchiveBrowserModelProxy *mProxy; }; class DvdNoDelegate : public QStyledItemDelegate { -- cgit v1.2.3-70-g09d2