"Fossies" - the Fresh Open Source Software Archive

Member "digikam-6.3.0/core/utilities/setup/album/setupalbumview.cpp" (4 Sep 2019, 23564 Bytes) of package /linux/misc/digikam-6.3.0.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "setupalbumview.cpp" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 6.2.0_vs_6.3.0.

    1 /* ============================================================
    2  *
    3  * This file is a part of digiKam project
    4  * https://www.digikam.org
    5  *
    6  * Date        : 2003-02-01
    7  * Description : album view configuration setup tab
    8  *
    9  * Copyright (C) 2003-2004 by Renchi Raju <renchi dot raju at gmail dot com>
   10  * Copyright (C) 2005-2019 by Gilles Caulier <caulier dot gilles at gmail dot com>
   11  *
   12  * This program is free software; you can redistribute it
   13  * and/or modify it under the terms of the GNU General
   14  * Public License as published by the Free Software Foundation;
   15  * either version 2, or (at your option)
   16  * any later version.
   17  *
   18  * This program is distributed in the hope that it will be useful,
   19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   21  * GNU General Public License for more details.
   22  *
   23  * ============================================================ */
   24 
   25 #include "setupalbumview.h"
   26 
   27 // Qt includes
   28 
   29 #include <QButtonGroup>
   30 #include <QCheckBox>
   31 #include <QGridLayout>
   32 #include <QGroupBox>
   33 #include <QLabel>
   34 #include <QRadioButton>
   35 #include <QVBoxLayout>
   36 #include <QStyle>
   37 #include <QComboBox>
   38 #include <QApplication>
   39 #include <QMessageBox>
   40 
   41 // KDE includes
   42 
   43 #include <klocalizedstring.h>
   44 #include <ksharedconfig.h>
   45 
   46 // Local includes
   47 
   48 #include "digikam_debug.h"
   49 #include "thumbnailsize.h"
   50 #include "applicationsettings.h"
   51 #include "dfontselect.h"
   52 #include "fullscreensettings.h"
   53 #include "dxmlguiwindow.h"
   54 #include "previewsettings.h"
   55 #include "setupcategory.h"
   56 #include "setupmime.h"
   57 
   58 namespace Digikam
   59 {
   60 
   61 class Q_DECL_HIDDEN SetupAlbumView::Private
   62 {
   63 public:
   64 
   65     explicit Private()
   66       : useLargeThumbsOriginal(false),
   67         useLargeThumbsShowedInfo(false),
   68         iconTreeThumbLabel(nullptr),
   69         iconShowNameBox(nullptr),
   70         iconShowSizeBox(nullptr),
   71         iconShowDateBox(nullptr),
   72         iconShowModDateBox(nullptr),
   73         iconShowResolutionBox(nullptr),
   74         iconShowAspectRatioBox(nullptr),
   75         iconShowTitleBox(nullptr),
   76         iconShowCommentsBox(nullptr),
   77         iconShowTagsBox(nullptr),
   78         iconShowOverlaysBox(nullptr),
   79         iconShowFullscreenBox(nullptr),
   80         iconShowRatingBox(nullptr),
   81         iconShowFormatBox(nullptr),
   82         iconShowCoordinatesBox(nullptr),
   83         previewFastPreview(nullptr),
   84         previewFullView(nullptr),
   85         previewRawMode(nullptr),
   86         previewConvertToEightBit(nullptr),
   87         previewShowIcons(nullptr),
   88         showFolderTreeViewItemsCount(nullptr),
   89         largeThumbsBox(nullptr),
   90         iconTreeThumbSize(nullptr),
   91         leftClickActionComboBox(nullptr),
   92         tab(nullptr),
   93         iconViewFontSelect(nullptr),
   94         treeViewFontSelect(nullptr),
   95         fullScreenSettings(nullptr),
   96         category(nullptr),
   97         mimetype(nullptr)
   98     {
   99     }
  100 
  101     bool                useLargeThumbsOriginal;
  102     bool                useLargeThumbsShowedInfo;
  103 
  104     QLabel*             iconTreeThumbLabel;
  105 
  106     QCheckBox*          iconShowNameBox;
  107     QCheckBox*          iconShowSizeBox;
  108     QCheckBox*          iconShowDateBox;
  109     QCheckBox*          iconShowModDateBox;
  110     QCheckBox*          iconShowResolutionBox;
  111     QCheckBox*          iconShowAspectRatioBox;
  112     QCheckBox*          iconShowTitleBox;
  113     QCheckBox*          iconShowCommentsBox;
  114     QCheckBox*          iconShowTagsBox;
  115     QCheckBox*          iconShowOverlaysBox;
  116     QCheckBox*          iconShowFullscreenBox;
  117     QCheckBox*          iconShowRatingBox;
  118     QCheckBox*          iconShowFormatBox;
  119     QCheckBox*          iconShowCoordinatesBox;
  120     QRadioButton*       previewFastPreview;
  121     QRadioButton*       previewFullView;
  122     QComboBox*          previewRawMode;
  123     QCheckBox*          previewConvertToEightBit;
  124     QCheckBox*          previewShowIcons;
  125     QCheckBox*          showFolderTreeViewItemsCount;
  126     QCheckBox*          largeThumbsBox;
  127 
  128     QComboBox*          iconTreeThumbSize;
  129     QComboBox*          leftClickActionComboBox;
  130 
  131     QTabWidget*         tab;
  132 
  133     DFontSelect*        iconViewFontSelect;
  134     DFontSelect*        treeViewFontSelect;
  135 
  136     FullScreenSettings* fullScreenSettings;
  137 
  138     SetupCategory*      category;
  139     SetupMime*          mimetype;
  140 };
  141 
  142 SetupAlbumView::SetupAlbumView(QWidget* const parent)
  143     : QScrollArea(parent),
  144       d(new Private)
  145 {
  146     d->tab = new QTabWidget(viewport());
  147     setWidget(d->tab);
  148     setWidgetResizable(true);
  149 
  150     QWidget* const iwpanel    = new QWidget(d->tab);
  151     const int spacing         = QApplication::style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing);
  152 
  153     // --------------------------------------------------------
  154 
  155     QGridLayout* const grid   = new QGridLayout(iwpanel);
  156 
  157     d->iconShowNameBox        = new QCheckBox(i18n("Show file&name"), iwpanel);
  158     d->iconShowNameBox->setWhatsThis(i18n("Set this option to show the filename below the image thumbnail."));
  159 
  160     d->iconShowSizeBox        = new QCheckBox(i18n("Show file si&ze"), iwpanel);
  161     d->iconShowSizeBox->setWhatsThis(i18n("Set this option to show the file size below the image thumbnail."));
  162 
  163     d->iconShowDateBox        = new QCheckBox(i18n("Show camera creation &date"), iwpanel);
  164     d->iconShowDateBox->setWhatsThis(i18n("Set this option to show the camera creation date "
  165                                           "below the image thumbnail."));
  166 
  167     d->iconShowModDateBox     = new QCheckBox(i18n("Show file &modification date"), iwpanel);
  168     d->iconShowModDateBox->setWhatsThis(i18n("Set this option to show the file modification date "
  169                                              "below the image thumbnail if it is different than camera creation date. "
  170                                              "This option is useful to identify quickly which items have been modified."));
  171 
  172     d->iconShowResolutionBox  = new QCheckBox(i18n("Show ima&ge dimensions"), iwpanel);
  173     d->iconShowResolutionBox->setWhatsThis(i18n("Set this option to show the image size in pixels "
  174                                                 "below the image thumbnail."));
  175 
  176     d->iconShowAspectRatioBox  = new QCheckBox(i18n("Show image aspect ratio"), iwpanel);
  177     d->iconShowAspectRatioBox->setWhatsThis(i18n("Set this option to show the image aspect ratio "
  178                                                 "below the image thumbnail."));
  179 
  180     d->iconShowFormatBox       = new QCheckBox(i18n("Show image format"), iwpanel);
  181     d->iconShowFormatBox->setWhatsThis(i18n("Set this option to show image mime type over image thumbnail."));
  182 
  183     d->iconShowTitleBox        = new QCheckBox(i18n("Show digiKam tit&le"), iwpanel);
  184     d->iconShowTitleBox->setWhatsThis(i18n("Set this option to show the digiKam title "
  185                                            "below the image thumbnail."));
  186 
  187     d->iconShowCommentsBox     = new QCheckBox(i18n("Show digiKam &captions"), iwpanel);
  188     d->iconShowCommentsBox->setWhatsThis(i18n("Set this option to show the digiKam captions "
  189                                               "below the image thumbnail."));
  190 
  191     d->iconShowTagsBox         = new QCheckBox(i18n("Show digiKam &tags"), iwpanel);
  192     d->iconShowTagsBox->setWhatsThis(i18n("Set this option to show the digiKam tags list "
  193                                           "below the image thumbnail."));
  194 
  195     d->iconShowRatingBox       = new QCheckBox(i18n("Show digiKam &rating"), iwpanel);
  196     d->iconShowRatingBox->setWhatsThis(i18n("Set this option to show the digiKam rating "
  197                                             "below the image thumbnail."));
  198 
  199     d->iconShowOverlaysBox     = new QCheckBox(i18n("Show rotation overlay buttons"), iwpanel);
  200     d->iconShowOverlaysBox->setWhatsThis(i18n("Set this option to show overlay buttons over "
  201                                               "the image thumbnail to be able to process left or right image rotation."));
  202 
  203     d->iconShowFullscreenBox   = new QCheckBox(i18n("Show fullscreen overlay button"), iwpanel);
  204     d->iconShowFullscreenBox->setWhatsThis(i18n("Set this option to show an overlay button over the "
  205                                                 "image thumbnail to open it in fullscreen mode."));
  206 
  207     d->iconShowCoordinatesBox  = new QCheckBox(i18n("Show Geolocation Indicator"), iwpanel);
  208     d->iconShowCoordinatesBox->setWhatsThis(i18n("Set this option to show an icon over the image thumbnail if item has geolocation information."));
  209 
  210     QLabel* leftClickLabel     = new QLabel(i18n("Thumbnail click action:"), iwpanel);
  211     d->leftClickActionComboBox = new QComboBox(iwpanel);
  212     d->leftClickActionComboBox->addItem(i18n("Show preview"),       ApplicationSettings::ShowPreview);
  213     d->leftClickActionComboBox->addItem(i18n("Start image editor"), ApplicationSettings::StartEditor);
  214     d->leftClickActionComboBox->setToolTip(i18n("Choose what should happen when you click on a thumbnail."));
  215 
  216     d->iconViewFontSelect      = new DFontSelect(i18n("Icon View font:"), iwpanel);
  217     d->iconViewFontSelect->setToolTip(i18n("Select here the font used to display text in icon views."));
  218 
  219     d->largeThumbsBox = new QCheckBox(i18n("Use large thumbnail size for high screen resolution"), iwpanel);
  220     d->largeThumbsBox->setWhatsThis(i18n("Set this option to render icon-view with large thumbnail size, for example in case of 4K monitor is used.\n"
  221                                          "By default this option is turned off and the maximum thumbnail size is limited to 256x256 pixels. "
  222                                          "When this option is enabled, thumbnail size can be extended to 512x512 pixels.\n"
  223                                          "This option will store more data in thumbnail database and will use more system memory. "
  224                                          "digiKam needs to be restarted to take effect, and Rebuild Thumbnails option from Maintenance tool "
  225                                          "needs to be processed over whole collections."));
  226 
  227     grid->addWidget(d->iconShowNameBox,          0, 0, 1, 1);
  228     grid->addWidget(d->iconShowSizeBox,          1, 0, 1, 1);
  229     grid->addWidget(d->iconShowDateBox,          2, 0, 1, 1);
  230     grid->addWidget(d->iconShowModDateBox,       3, 0, 1, 1);
  231     grid->addWidget(d->iconShowResolutionBox,    4, 0, 1, 1);
  232     grid->addWidget(d->iconShowAspectRatioBox,   5, 0, 1, 1);
  233     grid->addWidget(d->iconShowFormatBox,        6, 0, 1, 1);
  234 
  235     grid->addWidget(d->iconShowTitleBox,         0, 1, 1, 1);
  236     grid->addWidget(d->iconShowCommentsBox,      1, 1, 1, 1);
  237     grid->addWidget(d->iconShowTagsBox,          2, 1, 1, 1);
  238     grid->addWidget(d->iconShowRatingBox,        3, 1, 1, 1);
  239     grid->addWidget(d->iconShowOverlaysBox,      4, 1, 1, 1);
  240     grid->addWidget(d->iconShowFullscreenBox,    5, 1, 1, 1);
  241     grid->addWidget(d->iconShowCoordinatesBox,   6, 1, 1, 1);
  242 
  243     grid->addWidget(leftClickLabel,              7, 0, 1, 1);
  244     grid->addWidget(d->leftClickActionComboBox,  7, 1, 1, 1);
  245     grid->addWidget(d->iconViewFontSelect,       8, 0, 1, 2);
  246     grid->addWidget(d->largeThumbsBox,           9, 0, 1, 2);
  247     grid->setContentsMargins(spacing, spacing, spacing, spacing);
  248     grid->setSpacing(spacing);
  249     grid->setRowStretch(10, 10);
  250 
  251     d->tab->insertTab(IconView, iwpanel, i18nc("@title:tab", "Icons"));
  252 
  253     // --------------------------------------------------------
  254 
  255     QWidget* const fwpanel   = new QWidget(d->tab);
  256     QGridLayout* const grid2 = new QGridLayout(fwpanel);
  257 
  258     d->iconTreeThumbLabel = new QLabel(i18n("Tree View icon size:"), fwpanel);
  259     d->iconTreeThumbSize  = new QComboBox(fwpanel);
  260     d->iconTreeThumbSize->addItem(QLatin1String("16"));
  261     d->iconTreeThumbSize->addItem(QLatin1String("22"));
  262     d->iconTreeThumbSize->addItem(QLatin1String("32"));
  263     d->iconTreeThumbSize->addItem(QLatin1String("48"));
  264     d->iconTreeThumbSize->addItem(QLatin1String("64"));
  265     d->iconTreeThumbSize->setToolTip(i18n("Set this option to configure the size in pixels of "
  266                                           "the Tree View icons in digiKam's sidebars."));
  267 
  268     d->treeViewFontSelect = new DFontSelect(i18n("Tree View font:"), fwpanel);
  269     d->treeViewFontSelect->setToolTip(i18n("Select here the font used to display text in Tree Views."));
  270 
  271     d->showFolderTreeViewItemsCount = new QCheckBox(i18n("Show a count of items in Tree Views"), fwpanel);
  272     d->showFolderTreeViewItemsCount->setToolTip(i18n("Set this option to display along the album name the number of icon-view items inside."));
  273 
  274     grid2->addWidget(d->iconTreeThumbLabel,           0, 0, 1, 1);
  275     grid2->addWidget(d->iconTreeThumbSize,            0, 1, 1, 1);
  276     grid2->addWidget(d->treeViewFontSelect,           1, 0, 1, 2);
  277     grid2->addWidget(d->showFolderTreeViewItemsCount, 2, 0, 1, 2);
  278     grid2->setContentsMargins(spacing, spacing, spacing, spacing);
  279     grid2->setSpacing(spacing);
  280     grid2->setRowStretch(3, 10);
  281 
  282     d->tab->insertTab(FolderView, fwpanel, i18nc("@title:tab", "Tree-Views"));
  283 
  284     // --------------------------------------------------------
  285 
  286     QWidget* const pwpanel        = new QWidget(d->tab);
  287     QGridLayout* const grid3      = new QGridLayout(pwpanel);
  288 
  289     d->previewFastPreview         = new QRadioButton(i18nc("@option:radio",
  290                                                            "Preview shows embedded view if available (faster)"));
  291     d->previewFullView            = new QRadioButton(i18nc("@option:radio",
  292                                                            "Preview shows the full image"));
  293     QLabel* const rawPreviewLabel = new QLabel(i18nc("@label:listbox Mode of RAW preview decoding:",
  294                                                      "Raw images:"));
  295     d->previewRawMode             = new QComboBox;
  296     d->previewRawMode->addItem(i18nc("@option:inlistbox Automatic choice of RAW image preview source",
  297                                      "Automatic"), PreviewSettings::RawPreviewAutomatic);
  298     d->previewRawMode->addItem(i18nc("@option:inlistbox Embedded preview as RAW image preview source",
  299                                      "Embedded preview"), PreviewSettings::RawPreviewFromEmbeddedPreview);
  300     d->previewRawMode->addItem(i18nc("@option:inlistbox Original, half-size data as RAW image preview source",
  301                                      "Raw data in half size"), PreviewSettings::RawPreviewFromRawHalfSize);
  302 
  303     d->previewConvertToEightBit   = new QCheckBox(i18n("Preview image is converted to 8 bits for a faster viewing"), pwpanel);
  304     d->previewConvertToEightBit->setWhatsThis(i18n("Uncheck this if you do not want to convert a 16 bits preview image to 8 bits."));
  305 
  306     d->previewShowIcons           = new QCheckBox(i18n("Show icons and text over preview"), pwpanel);
  307     d->previewShowIcons->setWhatsThis(i18n("Uncheck this if you do not want to see icons and text in the image preview."));
  308 
  309     grid3->setContentsMargins(spacing, spacing, spacing, spacing);
  310     grid3->setSpacing(spacing);
  311     grid3->addWidget(d->previewFastPreview,       0, 0, 1, 2);
  312     grid3->addWidget(d->previewFullView,          1, 0, 1, 2);
  313     grid3->addWidget(rawPreviewLabel,             2, 0, 1, 1);
  314     grid3->addWidget(d->previewRawMode,           2, 1, 1, 1);
  315     grid3->addWidget(d->previewConvertToEightBit, 3, 0, 1, 2);
  316     grid3->addWidget(d->previewShowIcons,         4, 0, 1, 2);
  317     grid3->setRowStretch(5, 10);
  318 
  319     d->previewFastPreview->setChecked(true);
  320     d->previewRawMode->setCurrentIndex(0);
  321     d->previewRawMode->setEnabled(false);
  322 
  323     d->tab->insertTab(Preview, pwpanel, i18nc("@title:tab", "Preview"));
  324 
  325     // --------------------------------------------------------
  326 
  327     QWidget* const fspanel    = new QWidget(d->tab);
  328     QVBoxLayout* const layout = new QVBoxLayout(fspanel);
  329     d->fullScreenSettings     = new FullScreenSettings(FS_ALBUMGUI, d->tab);
  330     d->fullScreenSettings->setTitle(QString());
  331     d->fullScreenSettings->setFlat(true);
  332 
  333     layout->setContentsMargins(QMargins());
  334     layout->setSpacing(spacing);
  335     layout->addWidget(d->fullScreenSettings);
  336     layout->addStretch();
  337 
  338     d->tab->insertTab(FullScreen, fspanel, i18nc("@title:tab", "Full-Screen"));
  339 
  340     // --------------------------------------------------------
  341 
  342     d->mimetype  = new SetupMime();
  343     d->tab->insertTab(MimeType, d->mimetype, i18nc("@title:tab", "Mime Types"));
  344 
  345     d->category  = new SetupCategory(d->tab);
  346     d->tab->insertTab(Category, d->category, i18nc("@title:tab", "Categories"));
  347 
  348     // --------------------------------------------------------
  349 
  350     readSettings();
  351     adjustSize();
  352 
  353     // --------------------------------------------------------
  354 
  355     connect(d->previewFullView, SIGNAL(toggled(bool)),
  356             d->previewRawMode, SLOT(setEnabled(bool)));
  357 
  358     connect(d->largeThumbsBox, SIGNAL(toggled(bool)),
  359             this, SLOT(slotUseLargeThumbsToggled(bool)));
  360 
  361     // --------------------------------------------------------
  362 }
  363 
  364 SetupAlbumView::~SetupAlbumView()
  365 {
  366     delete d;
  367 }
  368 
  369 void SetupAlbumView::applySettings()
  370 {
  371     ApplicationSettings* const settings = ApplicationSettings::instance();
  372 
  373     if (!settings)
  374     {
  375         return;
  376     }
  377 
  378     settings->setTreeViewIconSize(d->iconTreeThumbSize->currentText().toInt());
  379     settings->setTreeViewFont(d->treeViewFontSelect->font());
  380     settings->setIconShowName(d->iconShowNameBox->isChecked());
  381     settings->setIconShowTags(d->iconShowTagsBox->isChecked());
  382     settings->setIconShowSize(d->iconShowSizeBox->isChecked());
  383     settings->setIconShowDate(d->iconShowDateBox->isChecked());
  384     settings->setIconShowModDate(d->iconShowModDateBox->isChecked());
  385     settings->setIconShowResolution(d->iconShowResolutionBox->isChecked());
  386     settings->setIconShowAspectRatio(d->iconShowAspectRatioBox->isChecked());
  387     settings->setIconShowTitle(d->iconShowTitleBox->isChecked());
  388     settings->setIconShowComments(d->iconShowCommentsBox->isChecked());
  389     settings->setIconShowOverlays(d->iconShowOverlaysBox->isChecked());
  390     settings->setIconShowFullscreen(d->iconShowFullscreenBox->isChecked());
  391     settings->setIconShowCoordinates(d->iconShowCoordinatesBox->isChecked());
  392     settings->setIconShowRating(d->iconShowRatingBox->isChecked());
  393     settings->setIconShowImageFormat(d->iconShowFormatBox->isChecked());
  394     settings->setIconViewFont(d->iconViewFontSelect->font());
  395 
  396     settings->setItemLeftClickAction((ApplicationSettings::ItemLeftClickAction)
  397                                      d->leftClickActionComboBox->currentIndex());
  398 
  399     PreviewSettings previewSettings;
  400     previewSettings.quality           = d->previewFastPreview->isChecked() ? PreviewSettings::FastPreview : PreviewSettings::HighQualityPreview;
  401     previewSettings.rawLoading        = (PreviewSettings::RawLoading)d->previewRawMode->itemData(d->previewRawMode->currentIndex()).toInt();
  402     previewSettings.convertToEightBit = d->previewConvertToEightBit->isChecked();
  403     settings->setPreviewSettings(previewSettings);
  404 
  405     settings->setPreviewShowIcons(d->previewShowIcons->isChecked());
  406     settings->setShowFolderTreeViewItemsCount(d->showFolderTreeViewItemsCount->isChecked());
  407     settings->saveSettings();
  408 
  409     KConfigGroup group = KSharedConfig::openConfig()->group(settings->generalConfigGroupName());
  410     d->fullScreenSettings->saveSettings(group);
  411 
  412     d->category->applySettings();
  413     d->mimetype->applySettings();
  414 
  415     // Method ThumbnailSize::setUseLargeThumbs() is not called here to prevent
  416     // dysfunction between Thumbs DB and icon if
  417     // thumb size is over 256 and when large thumbs size support is disabled.
  418     // digiKam need to be restarted to take effect.
  419     ThumbnailSize::saveSettings(group, d->largeThumbsBox->isChecked());
  420 }
  421 
  422 void SetupAlbumView::readSettings()
  423 {
  424     ApplicationSettings* const settings = ApplicationSettings::instance();
  425 
  426     if (!settings)
  427     {
  428         return;
  429     }
  430 
  431     if (settings->getTreeViewIconSize() == 16)
  432     {
  433         d->iconTreeThumbSize->setCurrentIndex(0);
  434     }
  435     else if (settings->getTreeViewIconSize() == 22)
  436     {
  437         d->iconTreeThumbSize->setCurrentIndex(1);
  438     }
  439     else if (settings->getTreeViewIconSize() == 32)
  440     {
  441         d->iconTreeThumbSize->setCurrentIndex(2);
  442     }
  443     else if (settings->getTreeViewIconSize() == 48)
  444     {
  445         d->iconTreeThumbSize->setCurrentIndex(3);
  446     }
  447     else
  448     {
  449         d->iconTreeThumbSize->setCurrentIndex(4);
  450     }
  451 
  452     d->treeViewFontSelect->setFont(settings->getTreeViewFont());
  453     d->iconShowNameBox->setChecked(settings->getIconShowName());
  454     d->iconShowTagsBox->setChecked(settings->getIconShowTags());
  455     d->iconShowSizeBox->setChecked(settings->getIconShowSize());
  456     d->iconShowDateBox->setChecked(settings->getIconShowDate());
  457     d->iconShowModDateBox->setChecked(settings->getIconShowModDate());
  458     d->iconShowResolutionBox->setChecked(settings->getIconShowResolution());
  459     d->iconShowAspectRatioBox->setChecked(settings->getIconShowAspectRatio());
  460     d->iconShowTitleBox->setChecked(settings->getIconShowTitle());
  461     d->iconShowCommentsBox->setChecked(settings->getIconShowComments());
  462     d->iconShowOverlaysBox->setChecked(settings->getIconShowOverlays());
  463     d->iconShowFullscreenBox->setChecked(settings->getIconShowFullscreen());
  464     d->iconShowCoordinatesBox->setChecked(settings->getIconShowCoordinates());
  465     d->iconShowRatingBox->setChecked(settings->getIconShowRating());
  466     d->iconShowFormatBox->setChecked(settings->getIconShowImageFormat());
  467     d->iconViewFontSelect->setFont(settings->getIconViewFont());
  468 
  469     d->leftClickActionComboBox->setCurrentIndex((int)settings->getItemLeftClickAction());
  470 
  471     PreviewSettings previewSettings = settings->getPreviewSettings();
  472 
  473     if (previewSettings.quality == PreviewSettings::FastPreview)
  474     {
  475         d->previewFastPreview->setChecked(true);
  476     }
  477     else
  478     {
  479         d->previewFullView->setChecked(true);
  480         d->previewRawMode->setEnabled(true);
  481     }
  482 
  483     d->previewRawMode->setCurrentIndex(d->previewRawMode->findData(previewSettings.rawLoading));
  484 
  485     d->previewShowIcons->setChecked(settings->getPreviewShowIcons());
  486     d->previewConvertToEightBit->setChecked(previewSettings.convertToEightBit);
  487     d->showFolderTreeViewItemsCount->setChecked(settings->getShowFolderTreeViewItemsCount());
  488 
  489     KConfigGroup group = KSharedConfig::openConfig()->group(settings->generalConfigGroupName());
  490     d->fullScreenSettings->readSettings(group);
  491 
  492     ThumbnailSize::readSettings(group);
  493     d->useLargeThumbsOriginal = ThumbnailSize::getUseLargeThumbs();
  494     d->largeThumbsBox->setChecked(d->useLargeThumbsOriginal);
  495 
  496     d->category->readSettings();
  497     d->mimetype->readSettings();
  498 }
  499 
  500 bool SetupAlbumView::useLargeThumbsHasChanged() const
  501 {
  502     return d->largeThumbsBox->isChecked() != d->useLargeThumbsOriginal;
  503 }
  504 
  505 void SetupAlbumView::slotUseLargeThumbsToggled(bool b)
  506 {
  507     // Show info if large thumbs were enabled, and only once.
  508     if (b && d->useLargeThumbsShowedInfo && useLargeThumbsHasChanged())
  509     {
  510         d->useLargeThumbsShowedInfo = true;
  511         QMessageBox::information(this, qApp->applicationName(),
  512                                  i18nc("@info",
  513                                        "This option changes the size in which thumbnails are generated. "
  514                                        "You need to restart digiKam for this option to take effect. "
  515                                        "Furthermore, you need to regenerate all already stored thumbnails via "
  516                                        "the <interface>Tools / Maintenance</interface> menu."));
  517     }
  518 }
  519 
  520 } // namespace Digikam