From a3b79646fe6984b0f2203ed9819ba03b0a4db978 Mon Sep 17 00:00:00 2001 From: Arno Date: Tue, 29 Apr 2025 11:27:51 +0200 Subject: 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. --- delegates.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'delegates.cpp') diff --git a/delegates.cpp b/delegates.cpp index 7a14bb4..4be7f4d 100644 --- a/delegates.cpp +++ b/delegates.cpp @@ -56,6 +56,12 @@ QWidget *FileTypeDelegate::createEditor(QWidget *parent, const QStyleOptionViewI return retval; } +/* Delegate for Genres */ +QString GenreDelegate::displayText(const QVariant &value, const QLocale &) const { + QStringList genres = value.toStringList(); + return genres.join(' '); +} + /* Delegate for Dvd no. */ QString DvdNoDelegate::displayText(const QVariant &value, const QLocale &locale) const{ -- cgit v1.2.3-70-g09d2