summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configurationdialog.cpp4
-rw-r--r--configurationdialog.h1
-rw-r--r--newmoviewizard.cpp10
3 files changed, 15 insertions, 0 deletions
diff --git a/configurationdialog.cpp b/configurationdialog.cpp
index 2381c60..39a6858 100644
--- a/configurationdialog.cpp
+++ b/configurationdialog.cpp
@@ -159,6 +159,8 @@ ConfigurationDialog::ConfigurationDialog(QWidget *parent, Qt::WindowFlags f) : Q
QVBoxLayout *archiveLayout = new QVBoxLayout;
mAutoAddCovers = new QCheckBox(tr("Automatically add covers"));
archiveLayout->addWidget(mAutoAddCovers);
+ mIconizeCovers = new QCheckBox(tr("Iconize covers"));
+ archiveLayout->addWidget(mIconizeCovers);
archiveBox->setLayout(archiveLayout);
//misc - assemble
@@ -332,6 +334,7 @@ void ConfigurationDialog::readSettings(){
mGrabFrameFrom->setText(s.value("ui/grabframe", "00:00:00").toString());
mGrabFrameFrom->setEnabled(s.value("ui/hovermovies", false).toBool());
mAutoAddCovers->setChecked(s.value("ui/autoaddcovers", false).toBool());
+ mIconizeCovers->setChecked(s.value("ui/iconizecovers", false).toBool());
//read paths
mArchiveDir->setText(s.value("paths/archivedir").toString());
@@ -403,6 +406,7 @@ void ConfigurationDialog::writeSettings(){
s.setValue("ui/hovermovies", (mHoverMovies->checkState() == Qt::Checked));
s.setValue("ui/grabframe", mGrabFrameFrom->text());
s.setValue("ui/autoaddcovers", (mAutoAddCovers->checkState() == Qt::Checked));
+ s.setValue("ui/iconizecovers", (mIconizeCovers->checkState() == Qt::Checked));
//write database
s.setValue("database/hostname", mDatabaseHost->text());
diff --git a/configurationdialog.h b/configurationdialog.h
index 4d4717f..e33928f 100644
--- a/configurationdialog.h
+++ b/configurationdialog.h
@@ -65,6 +65,7 @@ class ConfigurationDialog : public QDialog {
QCheckBox *mHoverArchive;
QCheckBox *mHoverMovies;
QCheckBox *mAutoAddCovers;
+ QCheckBox *mIconizeCovers;
QSpinBox *mHoverOpacity;
QLabel *mSeenColor;
QLabel *mClipboardColor;
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();