diff options
author | Arno <am@disconnect.de> | 2011-01-09 11:39:05 +0100 |
---|---|---|
committer | Arno <am@disconnect.de> | 2011-01-09 11:39:05 +0100 |
commit | 9603ec4b1e8cb85770f2d6b69dbe31a0fcff44f7 (patch) | |
tree | 77f32c8bf0c8863d02d2c867176f6c0c4768cfc5 /newmoviewizard.cpp | |
parent | cde287db9cb3ae5739cb45c5639313ea4847c960 (diff) | |
download | SheMov-9603ec4b1e8cb85770f2d6b69dbe31a0fcff44f7.tar.gz SheMov-9603ec4b1e8cb85770f2d6b69dbe31a0fcff44f7.tar.bz2 SheMov-9603ec4b1e8cb85770f2d6b69dbe31a0fcff44f7.zip |
Show iconized covers
When archiving covers, optionally show an iconized version of the cover
picture instead of the default decoration icon.
Diffstat (limited to 'newmoviewizard.cpp')
-rw-r--r-- | newmoviewizard.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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(); |