digiKam
collectionscannerobserver.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 : 2007-04-16
7  * Description : Schema update
8  *
9  * Copyright (C) 2007-2008 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
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_COLLECTION_SCANNER_OBSERVER_H
25 #define DIGIKAM_COLLECTION_SCANNER_OBSERVER_H
26 
27 // Qt includes
28 
29 #include <QString>
30 
31 // Local includes
32 
33 #include "digikam_export.h"
34 
35 namespace Digikam
36 {
37 
38 class CollectionScanner;
39 
40 class DIGIKAM_DATABASE_EXPORT CollectionScannerObserver
41 {
42 public:
43 
45  virtual ~CollectionScannerObserver() = default;
46 
47  virtual bool continueQuery() = 0;
48 
49 private:
50 
51  Q_DISABLE_COPY(CollectionScannerObserver)
52 };
53 
54 // ------------------------------------------------------------------------------------------
55 
56 class DIGIKAM_DATABASE_EXPORT InitializationObserver : public CollectionScannerObserver
57 {
58 public:
59 
61  {
64  UpdateErrorMustAbort
65  };
66 
67 public:
68 
70  ~InitializationObserver() override = default;
71 
72  virtual void moreSchemaUpdateSteps(int numberOfSteps) = 0;
73  virtual void schemaUpdateProgress(const QString& message, int numberOfSteps = 1) = 0;
74  virtual void finishedSchemaUpdate(UpdateResult result) = 0;
75  virtual void connectCollectionScanner(CollectionScanner* const scanner) = 0;
76  virtual void error(const QString& errorMessage) = 0;
77 
78 private:
79 
80  Q_DISABLE_COPY(InitializationObserver)
81 };
82 
83 } // namespace Digikam
84 
85 #endif // DIGIKAM_COLLECTION_SCANNER_OBSERVER_H
Definition: collectionscannerobserver.h:41
virtual ~CollectionScannerObserver()=default
Definition: collectionscanner.h:50
Definition: collectionscannerobserver.h:57
virtual void schemaUpdateProgress(const QString &message, int numberOfSteps=1)=0
UpdateResult
Definition: collectionscannerobserver.h:61
@ UpdateError
Definition: collectionscannerobserver.h:63
@ UpdateSuccess
Definition: collectionscannerobserver.h:62
~InitializationObserver() override=default
virtual void moreSchemaUpdateSteps(int numberOfSteps)=0
virtual void finishedSchemaUpdate(UpdateResult result)=0
virtual void error(const QString &errorMessage)=0
virtual void connectCollectionScanner(CollectionScanner *const scanner)=0
Definition: datefolderview.cpp:43