summaryrefslogtreecommitdiffstats
path: root/delegates.h
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2025-05-03 01:08:13 +0200
committerArno <arno@disconnect.de>2025-05-03 01:08:13 +0200
commitf18b4201d891aea10a4b38bd923f4c8fc4ee7209 (patch)
treeb36b9364cfdef72bb3152d5c6fdeb1b8b8b270ab /delegates.h
parent88a80f8fb94ad10a9162ff340e392e79a7103fa3 (diff)
downloadSheMov-f18b4201d891aea10a4b38bd923f4c8fc4ee7209.tar.gz
SheMov-f18b4201d891aea10a4b38bd923f4c8fc4ee7209.tar.bz2
SheMov-f18b4201d891aea10a4b38bd923f4c8fc4ee7209.zip
Beautify genre display in ArchiveBrowser
Display explicitly included genres with a check mark, and others with a cross mark.
Diffstat (limited to 'delegates.h')
-rw-r--r--delegates.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/delegates.h b/delegates.h
index 0db3bf9..d24095a 100644
--- a/delegates.h
+++ b/delegates.h
@@ -13,6 +13,8 @@
#include <QStyleOptionViewItem>
#include <QStyledItemDelegate>
+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 {