digiKam
databaseworkeriface.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-18
7  * Description : database worker interface
8  *
9  * Copyright (C) 2012 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_DATABASE_WORKER_IFACE_H
25 #define DIGIKAM_DATABASE_WORKER_IFACE_H
26 
27 // Qt includes
28 
29 #include <QList>
30 
31 // Local includes
32 
33 #include "fileactionmngr.h"
35 #include "iteminfo.h"
36 #include "workerobject.h"
37 
38 namespace Digikam
39 {
40 
41 class MetadataHub;
42 
43 class DatabaseWorkerInterface : public WorkerObject // clazy:exclude=ctor-missing-parent-argument
44 {
45  Q_OBJECT
46 
47 public Q_SLOTS:
48 
49  virtual void assignTags(const FileActionItemInfoList&, const QList<int>&) {};
50  virtual void removeTags(const FileActionItemInfoList&, const QList<int>&) {};
51  virtual void assignPickLabel(const FileActionItemInfoList&, int) {};
52  virtual void assignColorLabel(const FileActionItemInfoList&, int) {};
53  virtual void assignRating(const FileActionItemInfoList&, int) {};
54  virtual void editGroup(int, const ItemInfo&, const FileActionItemInfoList&) {};
55  virtual void setExifOrientation(const FileActionItemInfoList&, int) {};
57  virtual void copyAttributes(const FileActionItemInfoList&, const QStringList&) {};
58 
59 Q_SIGNALS:
60 
62  void writeOrientationToFiles(FileActionItemInfoList infos, int orientation);
63  void writeMetadata(FileActionItemInfoList infos, int flag);
64 };
65 
66 // ------------------------------------------------------------------------------------
67 
69 {
70  Q_OBJECT
71 
72 public:
73 
75  : d(dd)
76  {
77  }
78 
79 public:
80 
81  void assignTags(const FileActionItemInfoList& infos, const QList<int>& tagIDs) override;
82  void removeTags(const FileActionItemInfoList& infos, const QList<int>& tagIDs) override;
83  void assignPickLabel(const FileActionItemInfoList& infos, int pickId) override;
84  void assignColorLabel(const FileActionItemInfoList& infos, int colorId) override;
85  void assignRating(const FileActionItemInfoList& infos, int rating) override;
86  void editGroup(int groupAction, const ItemInfo& pick, const FileActionItemInfoList& infos) override;
87  void setExifOrientation(const FileActionItemInfoList& infos, int orientation) override;
88  void applyMetadata(const FileActionItemInfoList& infos, DisjointMetadata* hub) override;
89  void copyAttributes(const FileActionItemInfoList& infos, const QStringList& derivedPaths) override;
90 
91 private:
92 
93  void changeTags(const FileActionItemInfoList& infos, const QList<int>& tagIDs, bool addOrRemove);
94 
95 private:
96 
97  FileActionMngr::Private* const d;
98 };
99 
100 } // namespace Digikam
101 
102 #endif // DIGIKAM_DATABASE_WORKER_IFACE_H
Definition: databaseworkeriface.h:44
virtual void copyAttributes(const FileActionItemInfoList &, const QStringList &)
Definition: databaseworkeriface.h:57
virtual void assignPickLabel(const FileActionItemInfoList &, int)
Definition: databaseworkeriface.h:51
void writeMetadataToFiles(FileActionItemInfoList infos)
virtual void applyMetadata(const FileActionItemInfoList &, DisjointMetadata *)
Definition: databaseworkeriface.h:56
virtual void assignTags(const FileActionItemInfoList &, const QList< int > &)
Definition: databaseworkeriface.h:49
void writeMetadata(FileActionItemInfoList infos, int flag)
virtual void assignColorLabel(const FileActionItemInfoList &, int)
Definition: databaseworkeriface.h:52
virtual void removeTags(const FileActionItemInfoList &, const QList< int > &)
Definition: databaseworkeriface.h:50
virtual void setExifOrientation(const FileActionItemInfoList &, int)
Definition: databaseworkeriface.h:55
virtual void editGroup(int, const ItemInfo &, const FileActionItemInfoList &)
Definition: databaseworkeriface.h:54
virtual void assignRating(const FileActionItemInfoList &, int)
Definition: databaseworkeriface.h:53
void writeOrientationToFiles(FileActionItemInfoList infos, int orientation)
Definition: disjointmetadata.h:47
Definition: fileactionimageinfolist.h:104
Definition: databaseworkeriface.h:69
void editGroup(int groupAction, const ItemInfo &pick, const FileActionItemInfoList &infos) override
Definition: databaseworkeriface.cpp:258
void assignTags(const FileActionItemInfoList &infos, const QList< int > &tagIDs) override
Definition: databaseworkeriface.cpp:44
void applyMetadata(const FileActionItemInfoList &infos, DisjointMetadata *hub) override
Definition: databaseworkeriface.cpp:335
void assignColorLabel(const FileActionItemInfoList &infos, int colorId) override
Definition: databaseworkeriface.cpp:163
void removeTags(const FileActionItemInfoList &infos, const QList< int > &tagIDs) override
Definition: databaseworkeriface.cpp:49
void setExifOrientation(const FileActionItemInfoList &infos, int orientation) override
Definition: databaseworkeriface.cpp:302
void assignRating(const FileActionItemInfoList &infos, int rating) override
Definition: databaseworkeriface.cpp:210
FileActionMngrDatabaseWorker(FileActionMngr::Private *const dd)
Definition: databaseworkeriface.h:74
void copyAttributes(const FileActionItemInfoList &infos, const QStringList &derivedPaths) override
Definition: databaseworkeriface.cpp:375
void assignPickLabel(const FileActionItemInfoList &infos, int pickId) override
Definition: databaseworkeriface.cpp:116
Definition: fileactionmngr_p.h:78
Definition: iteminfo.h:78
Definition: workerobject.h:45
Definition: datefolderview.cpp:43