digiKam
versionmanager.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-06-18
7
* Description : class for determining new file name in terms of version management
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_H
26
#define DIGIKAM_VERSION_MANAGER_H
27
28
// Qt includes
29
30
#include <QFlags>
31
#include <QMap>
32
#include <QString>
33
34
// Local includes
35
36
#include "
digikam_export.h
"
37
#include "
dimagehistory.h
"
38
#include "
versionfileoperation.h
"
39
#include "
versionmanagersettings.h
"
40
#include "
versionnamingscheme.h
"
41
42
namespace
Digikam
43
{
44
45
class
DIGIKAM_EXPORT
VersionManager
46
{
47
public
:
48
49
enum
FileNameType
50
{
51
CurrentVersionName
,
52
NewVersionName
53
};
54
55
public
:
56
57
explicit
VersionManager
();
58
virtual
~
VersionManager
();
59
60
void
setSettings(
const
VersionManagerSettings
& settings);
61
VersionManagerSettings
settings()
const
;
62
63
void
setNamingScheme(
VersionNamingScheme
* scheme);
64
VersionNamingScheme
* namingScheme()
const
;
65
66
VersionFileOperation
operation(FileNameType request,
const
VersionFileInfo
& loadedFile,
67
const
DImageHistory
& initialResolvedHistory,
68
const
DImageHistory
& currentHistory);
69
70
VersionFileOperation
operationNewVersionInFormat(
const
VersionFileInfo
& loadedFile,
71
const
QString& format,
72
const
DImageHistory
& initialResolvedHistory,
73
const
DImageHistory
& currentHistory);
74
75
VersionFileOperation
operationNewVersionAs(
const
VersionFileInfo
& loadedFile,
76
const
VersionFileInfo
& saveLocation,
77
const
DImageHistory
& initialResolvedHistory,
78
const
DImageHistory
& currentHistory);
79
80
virtual
QString toplevelDirectory(
const
QString& path);
81
82
virtual
QStringList workspaceFileFormats()
const
;
83
84
private
:
85
86
// Disable
87
VersionManager
(
const
VersionManager
&) =
delete
;
88
VersionManager
& operator=(
const
VersionManager
&) =
delete
;
89
90
private
:
91
92
class
VersionManagerPriv;
93
VersionManagerPriv*
const
d;
94
};
95
96
}
// namespace Digikam
97
98
#endif
// DIGIKAM_VERSION_MANAGER_H
Digikam::DImageHistory
Definition:
dimagehistory.h:49
Digikam::VersionFileInfo
Definition:
versionfileoperation.h:45
Digikam::VersionFileOperation
Definition:
versionfileoperation.h:72
Digikam::VersionManagerSettings
Definition:
versionmanagersettings.h:43
Digikam::VersionManager
Definition:
versionmanager.h:46
Digikam::VersionManager::FileNameType
FileNameType
Definition:
versionmanager.h:50
Digikam::VersionManager::CurrentVersionName
@ CurrentVersionName
Definition:
versionmanager.h:51
Digikam::VersionNamingScheme
Definition:
versionnamingscheme.h:41
digikam_export.h
dimagehistory.h
Digikam
Definition:
datefolderview.cpp:43
versionfileoperation.h
versionmanagersettings.h
versionnamingscheme.h
core
libs
versionmanager
versionmanager.h
Generated by
1.9.1