digiKam
timeadjustcontainer.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 : 2012-04-19
7  * Description : time adjust settings container.
8  *
9  * Copyright (C) 2012-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) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * ============================================================ */
22 
23 #ifndef DIGIKAM_TIME_ADJUST_CONTAINER_H
24 #define DIGIKAM_TIME_ADJUST_CONTAINER_H
25 
26 // Qt includes
27 
28 #include <QUrl>
29 #include <QDateTime>
30 
31 // Local includes
32 
33 #include "digikam_export.h"
34 
35 namespace Digikam
36 {
37 
41 class DIGIKAM_EXPORT TimeAdjustContainer
42 {
43 
44 public:
45 
47  {
48  APPDATE = 0,
52  CUSTOMDATE
53  };
54 
56  {
57  EXIFIPTCXMP = 0,
62  XMPCREATED
63  };
64 
66  {
67  FILELASTMOD = 0,
68  FILECREATED
69  };
70 
71  enum AdjType
72  {
73  COPYVALUE = 0,
76  INTERVAL
77  };
78 
79 public:
80 
83 
85  bool atLeastOneUpdateToProcess() const;
86 
87  QDateTime calculateAdjustedDate(const QDateTime& originalTime, int index = 0);
88  QDateTime getDateTimeFromUrl(const QUrl& url) const;
89 
90 public:
91 
92  QDateTime customDate;
93  QDateTime customTime;
94  QDateTime adjustmentTime;
95 
105 
111 };
112 
113 // -------------------------------------------------------------------
114 
119 {
120 
121 public:
122 
123  explicit DeltaTime();
124 
125  ~DeltaTime();
126 
128  bool isNull() const;
129 
130 public:
131 
133 
138 };
139 
140 } // namespace Digikam
141 
142 #endif // DIGIKAM_TIME_ADJUST_CONTAINER_H
Definition: timeadjustcontainer.h:119
int deltaHours
Definition: timeadjustcontainer.h:135
DeltaTime()
Definition: timeadjustcontainer.cpp:190
bool isNull() const
Check if at least one option is selected.
Definition: timeadjustcontainer.cpp:203
int deltaMinutes
Definition: timeadjustcontainer.h:136
int deltaSeconds
Definition: timeadjustcontainer.h:137
bool deltaNegative
Definition: timeadjustcontainer.h:132
~DeltaTime()
Definition: timeadjustcontainer.cpp:199
int deltaDays
Definition: timeadjustcontainer.h:134
Definition: timeadjustcontainer.h:42
QDateTime customDate
Definition: timeadjustcontainer.h:92
QDateTime adjustmentTime
Definition: timeadjustcontainer.h:94
UseFileDateType
Definition: timeadjustcontainer.h:66
bool updXMPVideo
Definition: timeadjustcontainer.h:102
int metadataSource
Definition: timeadjustcontainer.h:107
bool updFileModDate
Definition: timeadjustcontainer.h:104
bool updIPTCDate
Definition: timeadjustcontainer.h:101
QDateTime customTime
Definition: timeadjustcontainer.h:93
UseMetaDateType
Definition: timeadjustcontainer.h:56
@ EXIFORIGINAL
Definition: timeadjustcontainer.h:59
@ IPTCCREATED
Definition: timeadjustcontainer.h:61
@ EXIFDIGITIZED
Definition: timeadjustcontainer.h:60
@ EXIFCREATED
Definition: timeadjustcontainer.h:58
int adjustmentDays
Definition: timeadjustcontainer.h:110
bool updEXIFThmDate
Definition: timeadjustcontainer.h:100
bool updXMPDate
Definition: timeadjustcontainer.h:103
bool updIfAvailable
Definition: timeadjustcontainer.h:96
UseDateSource
Definition: timeadjustcontainer.h:47
@ FILEDATE
Definition: timeadjustcontainer.h:50
@ FILENAME
Definition: timeadjustcontainer.h:49
@ METADATADATE
Definition: timeadjustcontainer.h:51
int adjustmentType
Definition: timeadjustcontainer.h:109
bool updEXIFModDate
Definition: timeadjustcontainer.h:97
bool updEXIFOriDate
Definition: timeadjustcontainer.h:98
bool updEXIFDigDate
Definition: timeadjustcontainer.h:99
int fileDateSource
Definition: timeadjustcontainer.h:108
int dateSource
Definition: timeadjustcontainer.h:106
AdjType
Definition: timeadjustcontainer.h:72
@ ADDVALUE
Definition: timeadjustcontainer.h:74
@ SUBVALUE
Definition: timeadjustcontainer.h:75
Definition: datefolderview.cpp:43