File indexing completed on 2025-01-19 03:59:31

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2012-01-30
0007  * Description : maintenance dialog
0008  *
0009  * SPDX-FileCopyrightText: 2012-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #include "maintenancedlg.h"
0016 
0017 // Qt includes
0018 
0019 #include <QLabel>
0020 #include <QPushButton>
0021 #include <QCheckBox>
0022 #include <QGridLayout>
0023 #include <QComboBox>
0024 #include <QScrollArea>
0025 #include <QIcon>
0026 #include <QStandardPaths>
0027 #include <QDialogButtonBox>
0028 #include <QVBoxLayout>
0029 
0030 // KDE includes
0031 
0032 #include <kconfiggroup.h>
0033 #include <klocalizedstring.h>
0034 #include <ksharedconfig.h>
0035 
0036 // Local includes
0037 
0038 #include "digikam_config.h"
0039 #include "digikam_globals.h"
0040 #include "dlayoutbox.h"
0041 #include "dexpanderbox.h"
0042 #include "dnuminput.h"
0043 #include "setup.h"
0044 #include "albumselectors.h"
0045 #include "facescansettings.h"
0046 #include "imagequalitycontainer.h"
0047 #include "imagequalityconfselector.h"
0048 #include "metadatasynchronizer.h"
0049 #include "dxmlguiwindow.h"
0050 #include "applicationsettings.h"
0051 #include "drangebox.h"
0052 #include "autotagsassignment.h"
0053 #include "autotagsassign.h"
0054 
0055 namespace Digikam
0056 {
0057 
0058 class Q_DECL_HIDDEN MaintenanceDlg::Private
0059 {
0060 public:
0061 
0062     enum Operation
0063     {
0064         Options = 0,
0065         NewItems,
0066         DbCleanup,
0067         Thumbnails,
0068         FingerPrints,
0069         Duplicates,
0070         FaceManagement,
0071         AutotagsAssignment,
0072         ImageQualitySorter,
0073         MetadataSync,
0074         Stretch
0075     };
0076 
0077 public:
0078 
0079     Private();
0080 
0081 public:
0082 
0083     static const QString configGroupName;
0084     static const QString configUseLastSettings;
0085     static const QString configUseMutiCoreCPU;
0086     static const QString configNewItems;
0087     static const QString configThumbnails;
0088     static const QString configScanThumbs;
0089     static const QString configFingerPrints;
0090     static const QString configScanFingerPrints;
0091     static const QString configDuplicates;
0092     static const QString configMinSimilarity;
0093     static const QString configMaxSimilarity;
0094     static const QString configDuplicatesRestriction;
0095     static const QString configFaceManagement;
0096     static const QString configFaceScannedHandling;
0097     static const QString configAutotagsAssignment;
0098     static const QString configAutotaggingScanMode;
0099     static const QString configModelSelectionMode;
0100     static const QString configImageQualitySorter;
0101     static const QString configQualityScanMode;
0102     static const QString configQualitySettingsSelected;
0103     static const QString configMetadataSync;
0104     static const QString configCleanupDatabase;
0105     static const QString configCleanupThumbDatabase;
0106     static const QString configCleanupFacesDatabase;
0107     static const QString configCleanupSimilarityDatabase;
0108     static const QString configShrinkDatabases;
0109     static const QString configSyncDirection;
0110 
0111 public:
0112 
0113     QDialogButtonBox*         buttons;
0114     QLabel*                   logo;
0115     QLabel*                   title;
0116     QCheckBox*                scanThumbs;
0117     QCheckBox*                scanFingerPrints;
0118     QCheckBox*                useLastSettings;
0119     QCheckBox*                useMutiCoreCPU;
0120     QCheckBox*                cleanThumbsDb;
0121     QCheckBox*                cleanFacesDb;
0122     QCheckBox*                cleanSimilarityDb;
0123     QCheckBox*                retrainAllFaces;
0124     QCheckBox*                shrinkDatabases;
0125     QComboBox*                qualityScanMode;
0126     QComboBox*                autotaggingScanMode;
0127     QComboBox*                modelSelectionMode;
0128     QPushButton*              metadataSetup;
0129     ImageQualityConfSelector* qualitySelector;
0130     QComboBox*                syncDirection;
0131     DHBox*                    similarityRangeBox;
0132     DHBox*                    dupeRestrictionBox;
0133     DVBox*                    vbox;
0134     DVBox*                    vbox2;
0135     DVBox*                    vbox3;
0136     DVBox*                    vbox4;
0137     DVBox*                    vbox5;
0138     DVBox*                    duplicatesBox;
0139     DIntRangeBox*             similarityRange;
0140     QComboBox*                faceScannedHandling;
0141     QComboBox*                searchResultRestriction;
0142     DExpanderBox*             expanderBox;
0143     AlbumSelectors*           albumSelectors;
0144 };
0145 
0146 } // namespace Digikam