digiKam
savingcontext.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 : 2006-01-20
7  * Description : image editor GUI saving context container
8  *
9  * Copyright (C) 2006-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2006-2012 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
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_SAVING_CONTEXT_H
26 #define DIGIKAM_SAVING_CONTEXT_H
27 
28 // Qt includes
29 
30 #include <QUrl>
31 #include <QString>
32 
33 // Local includes
34 
35 #include "digikam_export.h"
36 #include "filereadwritelock.h"
37 #include "versionfileoperation.h"
38 
39 namespace Digikam
40 {
41 
42 class DIGIKAM_EXPORT SavingContext
43 {
44 public:
45 
47  {
51  SavingStateVersion
52  };
53 
55  {
57  SynchronousSaving
58  };
59 
60 public:
61 
62  explicit SavingContext()
63  : savingState (SavingStateNone),
64  synchronizingState (NormalSaving),
65  synchronousSavingResult(false),
66  destinationExisted (false),
67  abortingSaving (false),
68  executedOperation (SavingStateNone),
69  saveTempFile (nullptr)
70  {
71  }
72 
73 public:
74 
81 
82  QString originalFormat;
83  QString format;
84 
85  QUrl srcURL;
87  QUrl moveSrcURL;
88 
91 
93 };
94 
95 } // namespace Digikam
96 
97 #endif // DIGIKAM_SAVING_CONTEXT_H
Definition: filereadwritelock.h:92
Definition: savingcontext.h:43
bool destinationExisted
Definition: savingcontext.h:78
QString saveTempFileName
Definition: savingcontext.h:90
bool synchronousSavingResult
Definition: savingcontext.h:77
QString format
Definition: savingcontext.h:83
bool abortingSaving
Definition: savingcontext.h:79
SavingState
Definition: savingcontext.h:47
@ SavingStateSaveAs
Definition: savingcontext.h:50
@ SavingStateSave
Definition: savingcontext.h:49
@ SavingStateNone
Definition: savingcontext.h:48
SafeTemporaryFile * saveTempFile
Definition: savingcontext.h:89
VersionFileOperation versionFileOperation
Definition: savingcontext.h:92
QUrl destinationURL
Definition: savingcontext.h:86
QString originalFormat
Definition: savingcontext.h:82
QUrl srcURL
Definition: savingcontext.h:85
QUrl moveSrcURL
Definition: savingcontext.h:87
SavingContext()
Definition: savingcontext.h:62
SynchronizingState synchronizingState
Definition: savingcontext.h:76
SavingState savingState
Definition: savingcontext.h:75
SavingState executedOperation
Definition: savingcontext.h:80
SynchronizingState
Definition: savingcontext.h:55
@ NormalSaving
Definition: savingcontext.h:56
Definition: versionfileoperation.h:72
Definition: datefolderview.cpp:43