From 9603ec4b1e8cb85770f2d6b69dbe31a0fcff44f7 Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 9 Jan 2011 11:39:05 +0100 Subject: Show iconized covers When archiving covers, optionally show an iconized version of the cover picture instead of the default decoration icon. --- newmoviewizard.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'newmoviewizard.cpp') diff --git a/newmoviewizard.cpp b/newmoviewizard.cpp index 4c4e7c9..f5fe333 100644 --- a/newmoviewizard.cpp +++ b/newmoviewizard.cpp @@ -469,6 +469,16 @@ QVariant WizardTreeModel::data(const QModelIndex &index, int role) const{ return item->data(FilePart); } if(role == Qt::DecorationRole){ + if(index.column() == 0){ + QSettings s; + bool iconizeCover = s.value("ui/iconizecovers", false).toBool(); + if(iconizeCover){ + int fileType = item->data(FileType).toInt(); + if((fileType == FrontCover) || (fileType == BackCover) || (fileType == GeneralCover)){ + return QIcon(item->data(FullPath).toString()); + } + } + } return SmTreeModel::data(index, role); } return QVariant(); -- cgit v1.2.3-70-g09d2