digiKam
metaenginesettingscontainer.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 : 2010-08-20
7  * Description : MetaEngine Settings Container.
8  *
9  * Copyright (C) 2010-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_META_ENGINE_SETTINGS_CONTAINER_H
25 #define DIGIKAM_META_ENGINE_SETTINGS_CONTAINER_H
26 
27 // Qt includes
28 
29 #include <QFlags>
30 #include <QDebug>
31 #include <QStringList>
32 
33 // Local includes
34 
35 #include "digikam_export.h"
36 #include "metaengine.h"
37 
38 class KConfigGroup;
39 
40 namespace Digikam
41 {
42 
47 class DIGIKAM_EXPORT MetaEngineSettingsContainer
48 {
49 public:
50 
62  {
63  NoRotation = 0,
64  RotateByInternalFlag = 1 << 0,
65  RotateByMetadataFlag = 1 << 1,
66  RotateByLosslessRotation = 1 << 2,
67  RotateByLossyRotation = 1 << 3,
68 
69  RotatingFlags = RotateByInternalFlag | RotateByMetadataFlag,
70  RotatingPixels = RotateByLosslessRotation | RotateByLossyRotation
71  };
72  Q_DECLARE_FLAGS(RotationBehaviorFlags, RotationBehaviorFlag)
73 
74 public:
75 
76  explicit MetaEngineSettingsContainer();
78 
79 public:
80 
81  void readFromConfig(KConfigGroup& group);
82  void writeToConfig(KConfigGroup& group) const;
83 
84  QStringList defaultExifToolSearchPaths() const;
85 
86 public:
87 
88  bool exifRotate;
90 
95  bool saveRating;
96 
98  bool saveTags;
101 
111 
113 
114  RotationBehaviorFlags rotationBehavior;
115 
116  QStringList sidecarExtensions;
117 
118  QString exifToolPath;
119 };
120 
122 DIGIKAM_EXPORT QDebug operator<<(QDebug dbg, const MetaEngineSettingsContainer& inf);
123 
124 } // namespace Digikam
125 
126 Q_DECLARE_OPERATORS_FOR_FLAGS(Digikam::MetaEngineSettingsContainer::RotationBehaviorFlags)
127 
128 #endif // DIGIKAM_META_ENGINE_SETTINGS_CONTAINER_H
Definition: metaenginesettingscontainer.h:48
bool useCompatibleFileName
Definition: metaenginesettingscontainer.h:108
bool saveTags
Definition: metaenginesettingscontainer.h:98
bool exifRotate
Definition: metaenginesettingscontainer.h:88
bool exifSetOrientation
Definition: metaenginesettingscontainer.h:89
QStringList sidecarExtensions
Definition: metaenginesettingscontainer.h:116
RotationBehaviorFlags rotationBehavior
Definition: metaenginesettingscontainer.h:114
bool useLazySync
Definition: metaenginesettingscontainer.h:109
RotationBehaviorFlag
Definition: metaenginesettingscontainer.h:62
bool saveDateTime
Definition: metaenginesettingscontainer.h:92
QString exifToolPath
Definition: metaenginesettingscontainer.h:118
bool saveRating
Definition: metaenginesettingscontainer.h:95
bool clearMetadataIfRescan
Definition: metaenginesettingscontainer.h:106
bool saveComments
Definition: metaenginesettingscontainer.h:91
bool writeDngFiles
Definition: metaenginesettingscontainer.h:103
bool useXMPSidecar4Reading
Definition: metaenginesettingscontainer.h:107
bool saveTemplate
Definition: metaenginesettingscontainer.h:97
bool rescanImageIfModified
Definition: metaenginesettingscontainer.h:105
bool useFastScan
Definition: metaenginesettingscontainer.h:110
bool writeRawFiles
Definition: metaenginesettingscontainer.h:102
bool saveColorLabel
Definition: metaenginesettingscontainer.h:94
bool updateFileTimeStamp
Definition: metaenginesettingscontainer.h:104
bool savePosition
Definition: metaenginesettingscontainer.h:100
MetaEngine::MetadataWritingMode metadataWritingMode
Definition: metaenginesettingscontainer.h:112
bool savePickLabel
Definition: metaenginesettingscontainer.h:93
bool saveFaceTags
Definition: metaenginesettingscontainer.h:99
MetadataWritingMode
Definition: metaengine.h:67
Definition: datefolderview.cpp:43
QDebug operator<<(QDebug dbg, const DbEngineParameters &p)
Definition: dbengineparameters.cpp:863