File indexing completed on 2025-01-19 03:57:57

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2010-10-09
0007  * Description : Widget to choose options for face scanning
0008  *
0009  * SPDX-FileCopyrightText: 2010-2012 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
0010  * SPDX-FileCopyrightText: 2012-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_FACE_SCAN_WIDGET_P_H
0017 #define DIGIKAM_FACE_SCAN_WIDGET_P_H
0018 
0019 #include "facescanwidget.h"
0020 
0021 // Qt includes
0022 
0023 #include <QApplication>
0024 #include <QButtonGroup>
0025 #include <QGroupBox>
0026 #include <QCheckBox>
0027 #include <QGridLayout>
0028 #include <QLabel>
0029 #include <QMouseEvent>
0030 #include <QKeyEvent>
0031 #include <QRadioButton>
0032 #include <QToolButton>
0033 #include <QIcon>
0034 #include <QVBoxLayout>
0035 #include <QPushButton>
0036 #include <QStyle>
0037 #include <QList>
0038 
0039 // KDE includes
0040 
0041 #include <kconfiggroup.h>
0042 #include <klocalizedstring.h>
0043 
0044 // Local includes
0045 
0046 #include "digikam_config.h"
0047 #include "digikam_globals.h"
0048 #include "dlayoutbox.h"
0049 #include "dnuminput.h"
0050 #include "digikam_debug.h"
0051 #include "albummodel.h"
0052 #include "albumselectors.h"
0053 #include "albummanager.h"
0054 #include "applicationsettings.h"
0055 #include "squeezedcombobox.h"
0056 #include "dexpanderbox.h"
0057 #include "facedbaccess.h"
0058 #include "facedb.h"
0059 
0060 namespace Digikam
0061 {
0062 
0063 class Q_DECL_HIDDEN FaceScanWidget::Private
0064 {
0065 public:
0066 
0067     explicit Private()
0068         : workflowWidget                    (nullptr),
0069           detectAndRecognizeButton          (nullptr),
0070           detectButton                      (nullptr),
0071           alreadyScannedBox                 (nullptr),
0072           reRecognizeButton                 (nullptr),
0073           helpButton                        (nullptr),
0074           tabWidget                         (nullptr),
0075           albumSelectors                    (nullptr),
0076           accuracyInput                     (nullptr),
0077           useYoloV3Button                   (nullptr),
0078           useFullCpuButton                  (nullptr),
0079           configName                        (QLatin1String("Face Management Settings")),
0080           configMainTask                    (QLatin1String("Face Scan Main Task")),
0081           configValueDetect                 (QLatin1String("Detect")),
0082           configValueDetectAndRecognize     (QLatin1String("Detect and Recognize Faces")),
0083           configValueRecognizedMarkedFaces  (QLatin1String("Recognize Marked Faces")),
0084           configAlreadyScannedHandling      (QLatin1String("Already Scanned Handling")),
0085           configUseFullCpu                  (QLatin1String("Use Full CPU")),
0086           settingsConflicted                (false)
0087     {
0088     }
0089 
0090     QWidget*          workflowWidget;
0091     QRadioButton*     detectAndRecognizeButton;
0092     QRadioButton*     detectButton;
0093     SqueezedComboBox* alreadyScannedBox;
0094     QRadioButton*     reRecognizeButton;
0095     QPushButton*      helpButton;
0096 
0097     QTabWidget*       tabWidget;
0098 
0099     AlbumSelectors*   albumSelectors;
0100 
0101     DIntNumInput*     accuracyInput;
0102 
0103     QCheckBox*        useYoloV3Button;
0104     QCheckBox*        useFullCpuButton;
0105 
0106     const QString     configName;
0107     const QString     configMainTask;
0108     const QString     configValueDetect;
0109     const QString     configValueDetectAndRecognize;
0110     const QString     configValueRecognizedMarkedFaces;
0111     const QString     configAlreadyScannedHandling;
0112     const QString     configUseFullCpu;
0113 
0114     bool              settingsConflicted;
0115 };
0116 
0117 } // namespace Digikam
0118 
0119 #endif // DIGIKAM_FACE_SCAN_WIDGET_P_H