summaryrefslogtreecommitdiffstats
path: root/delegates.h
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2025-04-29 11:27:51 +0200
committerArno <arno@disconnect.de>2025-04-29 11:27:51 +0200
commita3b79646fe6984b0f2203ed9819ba03b0a4db978 (patch)
tree4776207df9d1ef77cbe6010a4d47bab8f1f6f60d /delegates.h
parent48cc96e4b51706796c119eb953706c61b9c60228 (diff)
downloadSheMov-a3b79646fe6984b0f2203ed9819ba03b0a4db978.tar.gz
SheMov-a3b79646fe6984b0f2203ed9819ba03b0a4db978.tar.bz2
SheMov-a3b79646fe6984b0f2203ed9819ba03b0a4db978.zip
Display Genres in ArchiveBrowser
This takes quite a toll on the startup time, because it executes an extra Query for each item in the archive, but I hope it's worth it. The final goal being to filter the archive by genres, so uninteresting moves can be moved easier.
Diffstat (limited to 'delegates.h')
-rw-r--r--delegates.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/delegates.h b/delegates.h
index 72b3b13..0db3bf9 100644
--- a/delegates.h
+++ b/delegates.h
@@ -32,6 +32,13 @@ class FileTypeDelegate : public QStyledItemDelegate {
QHash<int, QString> mFiletypeMap;
};
+class GenreDelegate : public QStyledItemDelegate {
+ Q_OBJECT
+ public:
+ explicit GenreDelegate(QObject *parent = nullptr) : QStyledItemDelegate(parent) {}
+ virtual QString displayText(const QVariant &value, const QLocale &locale) const;
+};
+
class DvdNoDelegate : public QStyledItemDelegate {
Q_OBJECT
public: