digiKam
newitemsfinder.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2012-01-20
7  * Description : new items finder.
8  *
9  * Copyright (C) 2012-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_NEW_ITEMS_FINDER_H
25 #define DIGIKAM_NEW_ITEMS_FINDER_H
26 
27 // Qt includes
28 
29 #include <QObject>
30 #include <QString>
31 #include <QStringList>
32 
33 // Local includes
34 
35 #include "maintenancetool.h"
36 #include "digikam_export.h"
37 
38 namespace Digikam
39 {
40 
41 class DIGIKAM_GUI_EXPORT NewItemsFinder : public MaintenanceTool
42 {
43  Q_OBJECT
44 
45 public:
46 
48  {
51  ScheduleCollectionScan
52  };
53 
54 public:
55 
56  explicit NewItemsFinder(const FinderMode mode = CompleteCollectionScan,
57  const QStringList& foldersToScan = QStringList(),
58  ProgressItem* const parent = nullptr);
59  ~NewItemsFinder() override;
60 
61 private Q_SLOTS:
62 
63  void slotStart() override;
64  void slotScanStarted(const QString&);
65  void slotPartialScanDone(const QString&);
66  void slotTotalFilesToScan(int);
67  void slotFilesScanned(int);
68  void slotCancel() override;
69 
70 private:
71 
72  class Private;
73  Private* const d;
74 };
75 
76 } // namespace Digikam
77 
78 #endif // DIGIKAM_NEW_ITEMS_FINDER_H
Definition: maintenancetool.h:41
Definition: newitemsfinder.h:42
FinderMode
Definition: newitemsfinder.h:48
@ ScanDeferredFiles
Defer whole collection scan.
Definition: newitemsfinder.h:50
@ CompleteCollectionScan
Scan whole collection immediately.
Definition: newitemsfinder.h:49
Definition: progressmanager.h:45
Definition: datefolderview.cpp:43