digiKam
itemscanner_p.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-09-19
7  * Description : Scanning a single item - private containers.
8  *
9  * Copyright (C) 2007-2013 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10  * Copyright (C) 2013-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_ITEM_SCANNER_P_H
26 #define DIGIKAM_ITEM_SCANNER_P_H
27 
28 #include "itemscanner.h"
29 
30 // Qt includes
31 
32 #include <QImageReader>
33 #include <QElapsedTimer>
34 
35 // KDE includes
36 
37 #include <klocalizedstring.h>
38 
39 // Local includes
40 
41 #include "digikam_debug.h"
42 #include "coredburl.h"
43 #include "coredbaccess.h"
44 #include "coredb.h"
45 #include "similaritydbaccess.h"
46 #include "similaritydb.h"
47 #include "collectionlocation.h"
48 #include "collectionmanager.h"
49 #include "facetagseditor.h"
50 #include "itemcomments.h"
51 #include "itemcopyright.h"
52 #include "itemextendedproperties.h"
53 #include "itemhistorygraph.h"
54 #include "metaenginesettings.h"
55 #include "tagregion.h"
56 #include "tagscache.h"
57 #include "iostream"
58 #include "dimagehistory.h"
59 #include "itemhistorygraphdata.h"
60 
61 namespace Digikam
62 {
63 
64 class Q_DECL_HIDDEN ItemScannerCommit
65 {
66 
67 public:
68 
69  enum Operation
70  {
73  UpdateItem
74  };
75 
76 public:
77 
79 
80 public:
81 
83 
85 
95  bool hasPickTag;
96 
97  DatabaseFields::ItemInformation imageInformationFields;
98  QVariantList imageInformationInfos;
99 
100  QVariantList imageMetadataInfos;
101  QVariantList imagePositionInfos;
102 
104  QString headline;
105  QString title;
106 
108  QMultiMap<QString, QVariant> metadataFacesMap;
109 
110  QVariantList iptcCoreMetadataInfos;
111 
113  QString historyXml;
114  QString uuid;
115 };
116 
117 // ---------------------------------------------------------------------------------------
118 
119 class Q_DECL_HIDDEN LessThanByProximityToSubject
120 {
121 public:
122 
123  explicit LessThanByProximityToSubject(const ItemInfo& subject);
124 
125  bool operator()(const ItemInfo& a, const ItemInfo& b);
126 
127 public:
128 
130 };
131 
132 // ---------------------------------------------------------------------------
133 
134 class Q_DECL_HIDDEN ItemScanner::Private
135 {
136 public:
137 
138  explicit Private();
139  ~Private();
140 
141 public:
142 
143  bool hasImage;
146 
147  QFileInfo fileInfo;
148 
153 
155 
157 
158  QElapsedTimer timer;
159 };
160 
161 } // namespace Digikam
162 
163 #endif // DIGIKAM_ITEM_SCANNER_P_H
Definition: captionvalues.h:69
Definition: dimg.h:62
Definition: dmetadata.h:55
Definition: iteminfo.h:78
Definition: coredbalbuminfo.h:277
Definition: itemscanner_p.h:65
bool commitFaces
Definition: itemscanner_p.h:92
bool commitVideoMetadata
Definition: itemscanner_p.h:88
QList< int > tagIds
Definition: itemscanner_p.h:112
qlonglong copyImageAttributesId
Definition: itemscanner_p.h:84
bool commitItemInformation
Definition: itemscanner_p.h:86
Operation
Definition: itemscanner_p.h:70
@ AddItem
Definition: itemscanner_p.h:72
@ NoOp
Definition: itemscanner_p.h:71
CaptionsMap captions
Definition: itemscanner_p.h:103
bool commitIPTCCore
Definition: itemscanner_p.h:93
QString headline
Definition: itemscanner_p.h:104
bool commitItemPosition
Definition: itemscanner_p.h:89
bool hasPickTag
Definition: itemscanner_p.h:95
QString title
Definition: itemscanner_p.h:105
bool commitItemComments
Definition: itemscanner_p.h:90
bool hasColorTag
Definition: itemscanner_p.h:94
bool commitItemCopyright
Definition: itemscanner_p.h:91
QVariantList imagePositionInfos
Definition: itemscanner_p.h:101
QVariantList iptcCoreMetadataInfos
Definition: itemscanner_p.h:110
QString uuid
Definition: itemscanner_p.h:114
QString historyXml
Definition: itemscanner_p.h:113
QVariantList imageInformationInfos
Definition: itemscanner_p.h:98
bool commitImageMetadata
Definition: itemscanner_p.h:87
QMultiMap< QString, QVariant > metadataFacesMap
Definition: itemscanner_p.h:108
QVariantList imageMetadataInfos
Definition: itemscanner_p.h:100
Template copyrightTemplate
Definition: itemscanner_p.h:107
Operation operation
Definition: itemscanner_p.h:82
DatabaseFields::ItemInformation imageInformationFields
Definition: itemscanner_p.h:97
Definition: itemscanner_p.h:135
bool hasMetadata
Definition: itemscanner_p.h:144
ItemScanInfo scanInfo
Definition: itemscanner_p.h:151
DImg img
Definition: itemscanner_p.h:150
ItemScanner::ScanMode scanMode
Definition: itemscanner_p.h:152
QElapsedTimer timer
Definition: itemscanner_p.h:158
bool hasImage
Definition: itemscanner_p.h:143
DMetadata * metadata
Definition: itemscanner_p.h:149
QFileInfo fileInfo
Definition: itemscanner_p.h:147
bool hasHistoryToResolve
Definition: itemscanner_p.h:154
ItemScannerCommit commit
Definition: itemscanner_p.h:156
bool loadedFromDisk
Definition: itemscanner_p.h:145
Definition: itemscanner.h:44
ScanMode
Definition: itemscanner.h:49
Definition: itemscanner_p.h:120
ItemInfo subject
Definition: itemscanner_p.h:129
Definition: template.h:46
Definition: datefolderview.cpp:43