digiKam
itemfiltermodelthreads.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 : 2009-03-11
7  * Description : Qt item model for database entries - threads management
8  *
9  * Copyright (C) 2009-2011 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_ITEM_FILTER_MODEL_THREADS_H
25 #define DIGIKAM_ITEM_FILTER_MODEL_THREADS_H
26 
27 // Qt includes
28 
29 #include <QThread>
30 
31 // Local includes
32 
33 #include "digikam_export.h"
34 #include "workerobject.h"
35 #include "itemfiltermodel.h"
36 
37 namespace Digikam
38 {
39 
40 class ItemFilterModelTodoPackage;
41 
42 class DIGIKAM_DATABASE_EXPORT ItemFilterModelWorker : public WorkerObject
43 {
44  Q_OBJECT
45 
46 public:
47 
49 
50  bool checkVersion(const ItemFilterModelTodoPackage& package);
51 
52 public Q_SLOTS:
53 
54  virtual void process(ItemFilterModelTodoPackage package) = 0;
55 
56 Q_SIGNALS:
57 
58  void processed(const ItemFilterModelTodoPackage& package);
59  void discarded(const ItemFilterModelTodoPackage& package);
60 
61 protected:
62 
64 };
65 
66 // -----------------------------------------------------------------------------------------
67 
68 class DIGIKAM_DATABASE_EXPORT ItemFilterModelPreparer : public ItemFilterModelWorker
69 {
70  Q_OBJECT
71 
72 public:
73 
76  {
77  }
78 
79  void process(ItemFilterModelTodoPackage package) override;
80 };
81 
82 // ----------------------------------------------------------------------------------------
83 
84 class DIGIKAM_DATABASE_EXPORT ItemFilterModelFilterer : public ItemFilterModelWorker
85 {
86  Q_OBJECT
87 
88 public:
89 
92  {
93  }
94 
95  void process(ItemFilterModelTodoPackage package) override;
96 };
97 
98 } // namespace Digikam
99 
100 #endif // DIGIKAM_ITEM_FILTER_MODEL_THREADS_H
Definition: itemfiltermodelthreads.h:85
ItemFilterModelFilterer(ItemFilterModel::ItemFilterModelPrivate *const d)
Definition: itemfiltermodelthreads.h:90
Definition: itemfiltermodelthreads.h:69
ItemFilterModelPreparer(ItemFilterModel::ItemFilterModelPrivate *const d)
Definition: itemfiltermodelthreads.h:74
Definition: itemfiltermodel_p.h:54
Definition: itemfiltermodelthreads.h:43
virtual void process(ItemFilterModelTodoPackage package)=0
void processed(const ItemFilterModelTodoPackage &package)
ItemFilterModel::ItemFilterModelPrivate * d
Definition: itemfiltermodelthreads.h:63
void discarded(const ItemFilterModelTodoPackage &package)
Definition: workerobject.h:45
Definition: datefolderview.cpp:43