digiKam
versionmanagersettings.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-12-20
7  * Description : settings container for versioning
8  *
9  * Copyright (C) 2010-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10  * Copyright (C) 2010 by Martin Klapetek <martin dot klapetek 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_VERSION_MANAGER_SETTINGS_H
26 #define DIGIKAM_VERSION_MANAGER_SETTINGS_H
27 
28 // Qt includes
29 
30 #include <QFlags>
31 #include <QString>
32 
33 // Local includes
34 
35 #include "digikam_export.h"
36 
37 class KConfigGroup;
38 
39 namespace Digikam
40 {
41 
42 class DIGIKAM_EXPORT VersionManagerSettings
43 {
44 public:
45 
47  {
48  NoIntermediates = 0,
49  AfterEachSession = 1 << 0,
50  AfterRawConversion = 1 << 1,
51  WhenNotReproducible = 1 << 2
52  };
53  Q_DECLARE_FLAGS(IntermediateBehavior, IntermediateSavepoint)
54 
56  {
57  OnlyShowCurrent = 0,
58  ShowOriginal = 1 << 0,
59  ShowIntermediates = 1 << 1
60  };
61  Q_DECLARE_FLAGS(ShowInViewFlags, ShowInViewFlag)
62 
64  {
66  AutoSave
67  };
68 
69 public:
70 
72 
73  void readFromConfig(KConfigGroup& group);
74  void writeToConfig(KConfigGroup& group) const;
75 
76 public:
77 
78  bool enabled;
79 
80  IntermediateBehavior saveIntermediateVersions;
81  ShowInViewFlags showInViewFlags;
83 
85  QString format;
86 };
87 
88 } // namespace Digikam
89 
90 Q_DECLARE_OPERATORS_FOR_FLAGS(Digikam::VersionManagerSettings::IntermediateBehavior)
91 Q_DECLARE_OPERATORS_FOR_FLAGS(Digikam::VersionManagerSettings::ShowInViewFlags)
92 
93 #endif // DIGIKAM_VERSION_MANAGER_SETTINGS_H
Definition: versionmanagersettings.h:43
ShowInViewFlags showInViewFlags
Definition: versionmanagersettings.h:81
QString format
Image format string as defined for database, in upper case.
Definition: versionmanagersettings.h:85
bool enabled
Definition: versionmanagersettings.h:78
IntermediateSavepoint
Definition: versionmanagersettings.h:47
ShowInViewFlag
Definition: versionmanagersettings.h:56
EditorClosingMode
Definition: versionmanagersettings.h:64
@ AlwaysAsk
Definition: versionmanagersettings.h:65
EditorClosingMode editorClosingMode
Definition: versionmanagersettings.h:82
IntermediateBehavior saveIntermediateVersions
Definition: versionmanagersettings.h:80
Definition: datefolderview.cpp:43