summaryrefslogtreecommitdiffstats
path: root/delegates.cpp
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.cpp
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.cpp')
-rw-r--r--delegates.cpp6
1 files changed, 6 insertions, 0 deletions
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{