Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
digiKam
Commits
d646b109
Commit
d646b109
authored
May 10, 2016
by
Maik Qualmann
Browse files
use always 4-digit year and seconds in Metadata Editor
CCBUGS: 315740
CCBUGS: 362441
parent
970442ab
Changes
5
Hide whitespace changes
Inline
Side-by-side
utilities/metadataedit/exif/exifdatetime.cpp
View file @
d646b109
...
...
@@ -100,11 +100,28 @@ EXIFDateTime::EXIFDateTime(QWidget* const parent)
{
QGridLayout
*
const
grid
=
new
QGridLayout
(
this
);
QString
dateTimeFormat
=
QLocale
().
dateTimeFormat
(
QLocale
::
ShortFormat
);
if
(
!
dateTimeFormat
.
contains
(
QLatin1String
(
"yyyy"
)))
{
dateTimeFormat
.
replace
(
QLatin1String
(
"yy"
),
QLatin1String
(
"yyyy"
));
}
if
(
!
dateTimeFormat
.
contains
(
QLatin1String
(
"ss"
)))
{
dateTimeFormat
.
replace
(
QLatin1String
(
"mm"
),
QLatin1String
(
"mm:ss"
));
}
// --------------------------------------------------------
d
->
dateCreatedCheck
=
new
QCheckBox
(
i18n
(
"Creation date and time"
),
this
);
d
->
dateCreatedSubSecCheck
=
new
QCheckBox
(
i18n
(
"Creation sub-second"
),
this
);
d
->
dateCreatedSel
=
new
QDateTimeEdit
(
this
);
d
->
dateCreatedSel
->
setDisplayFormat
(
dateTimeFormat
);
d
->
dateCreatedSubSecEdit
=
new
QSpinBox
(
this
);
d
->
dateCreatedSubSecEdit
->
setMinimum
(
0
);
d
->
dateCreatedSubSecEdit
->
setMaximum
(
999
);
...
...
@@ -132,7 +149,10 @@ EXIFDateTime::EXIFDateTime(QWidget* const parent)
d
->
dateOriginalCheck
=
new
QCheckBox
(
i18n
(
"Original date and time"
),
this
);
d
->
dateOriginalSubSecCheck
=
new
QCheckBox
(
i18n
(
"Original sub-second"
),
this
);
d
->
dateOriginalSel
=
new
QDateTimeEdit
(
this
);
d
->
dateOriginalSel
->
setDisplayFormat
(
dateTimeFormat
);
d
->
dateOriginalSubSecEdit
=
new
QSpinBox
(
this
);
d
->
dateOriginalSubSecEdit
->
setMinimum
(
0
);
d
->
dateOriginalSubSecEdit
->
setMaximum
(
999
);
...
...
@@ -155,7 +175,10 @@ EXIFDateTime::EXIFDateTime(QWidget* const parent)
d
->
dateDigitalizedCheck
=
new
QCheckBox
(
i18n
(
"Digitization date and time"
),
this
);
d
->
dateDigitalizedSubSecCheck
=
new
QCheckBox
(
i18n
(
"Digitization sub-second"
),
this
);
d
->
dateDigitalizedSel
=
new
QDateTimeEdit
(
this
);
d
->
dateDigitalizedSel
->
setDisplayFormat
(
dateTimeFormat
);
d
->
dateDigitalizedSubSecEdit
=
new
QSpinBox
(
this
);
d
->
dateDigitalizedSubSecEdit
->
setMinimum
(
0
);
d
->
dateDigitalizedSubSecEdit
->
setMaximum
(
999
);
...
...
utilities/metadataedit/iptc/iptcenvelope.cpp
View file @
d646b109
...
...
@@ -164,6 +164,16 @@ IPTCEnvelope::IPTCEnvelope(QWidget* const parent)
QRegExp
asciiRx
(
QLatin1String
(
"[
\x20
-
\x7F
]+$"
));
QValidator
*
const
asciiValidator
=
new
QRegExpValidator
(
asciiRx
,
this
);
QString
dateFormat
=
QLocale
().
dateFormat
(
QLocale
::
ShortFormat
);
if
(
!
dateFormat
.
contains
(
QLatin1String
(
"yyyy"
)))
{
dateFormat
.
replace
(
QLatin1String
(
"yy"
),
QLatin1String
(
"yyyy"
));
}
QString
timeFormat
=
QLatin1String
(
"hh:mm:ss"
);
// --------------------------------------------------------
d
->
destinationCheck
=
new
QCheckBox
(
i18n
(
"Destination:"
),
this
);
...
...
@@ -253,8 +263,12 @@ IPTCEnvelope::IPTCEnvelope(QWidget* const parent)
d
->
dateSentCheck
=
new
QCheckBox
(
i18n
(
"Sent date:"
),
this
);
d
->
timeSentCheck
=
new
QCheckBox
(
i18n
(
"Sent time:"
),
this
);
d
->
zoneSentSel
=
new
TimeZoneComboBox
(
this
);
d
->
dateSentSel
=
new
QDateEdit
(
this
);
d
->
dateSentSel
->
setDisplayFormat
(
dateFormat
);
d
->
timeSentSel
=
new
QTimeEdit
(
this
);
d
->
timeSentSel
->
setDisplayFormat
(
timeFormat
);
d
->
setTodaySentBtn
=
new
QPushButton
();
d
->
setTodaySentBtn
->
setIcon
(
QIcon
::
fromTheme
(
QLatin1String
(
"go-jump-today"
)));
...
...
utilities/metadataedit/iptc/iptcorigin.cpp
View file @
d646b109
...
...
@@ -127,13 +127,27 @@ IPTCOrigin::IPTCOrigin(QWidget* const parent)
QRegExp
asciiRx
(
QLatin1String
(
"[
\x20
-
\x7F
]+$"
));
QValidator
*
const
asciiValidator
=
new
QRegExpValidator
(
asciiRx
,
this
);
QString
dateFormat
=
QLocale
().
dateFormat
(
QLocale
::
ShortFormat
);
if
(
!
dateFormat
.
contains
(
QLatin1String
(
"yyyy"
)))
{
dateFormat
.
replace
(
QLatin1String
(
"yy"
),
QLatin1String
(
"yyyy"
));
}
QString
timeFormat
=
QLatin1String
(
"hh:mm:ss"
);
// --------------------------------------------------------
d
->
dateDigitalizedCheck
=
new
QCheckBox
(
i18n
(
"Digitization date"
),
this
);
d
->
timeDigitalizedCheck
=
new
QCheckBox
(
i18n
(
"Digitization time"
),
this
);
d
->
zoneDigitalizedSel
=
new
TimeZoneComboBox
(
this
);
d
->
dateDigitalizedSel
=
new
QDateEdit
(
this
);
d
->
dateDigitalizedSel
->
setDisplayFormat
(
dateFormat
);
d
->
timeDigitalizedSel
=
new
QTimeEdit
(
this
);
d
->
timeDigitalizedSel
->
setDisplayFormat
(
timeFormat
);
d
->
setTodayDigitalizedBtn
=
new
QPushButton
();
d
->
setTodayDigitalizedBtn
->
setIcon
(
QIcon
::
fromTheme
(
QLatin1String
(
"go-jump-today"
)));
...
...
@@ -153,8 +167,13 @@ IPTCOrigin::IPTCOrigin(QWidget* const parent)
d
->
dateCreatedCheck
=
new
QCheckBox
(
i18n
(
"Creation date"
),
this
);
d
->
timeCreatedCheck
=
new
QCheckBox
(
i18n
(
"Creation time"
),
this
);
d
->
zoneCreatedSel
=
new
TimeZoneComboBox
(
this
);
d
->
dateCreatedSel
=
new
QDateEdit
(
this
);
d
->
dateCreatedSel
->
setDisplayFormat
(
dateFormat
);
d
->
timeCreatedSel
=
new
QTimeEdit
(
this
);
d
->
timeCreatedSel
->
setDisplayFormat
(
timeFormat
);
d
->
syncEXIFDateCheck
=
new
QCheckBox
(
i18n
(
"Sync EXIF creation date"
),
this
);
d
->
setTodayCreatedBtn
=
new
QPushButton
();
...
...
utilities/metadataedit/iptc/iptcproperties.cpp
View file @
d646b109
...
...
@@ -129,13 +129,27 @@ IPTCProperties::IPTCProperties(QWidget* const parent)
QRegExp
asciiRx
(
QLatin1String
(
"[
\x20
-
\x7F
]+$"
));
QValidator
*
const
asciiValidator
=
new
QRegExpValidator
(
asciiRx
,
this
);
QString
dateFormat
=
QLocale
().
dateFormat
(
QLocale
::
ShortFormat
);
if
(
!
dateFormat
.
contains
(
QLatin1String
(
"yyyy"
)))
{
dateFormat
.
replace
(
QLatin1String
(
"yy"
),
QLatin1String
(
"yyyy"
));
}
QString
timeFormat
=
QLatin1String
(
"hh:mm:ss"
);
// --------------------------------------------------------
d
->
dateReleasedCheck
=
new
QCheckBox
(
i18n
(
"Release date"
),
this
);
d
->
timeReleasedCheck
=
new
QCheckBox
(
i18n
(
"Release time"
),
this
);
d
->
zoneReleasedSel
=
new
TimeZoneComboBox
(
this
);
d
->
dateReleasedSel
=
new
QDateEdit
(
this
);
d
->
dateReleasedSel
->
setDisplayFormat
(
dateFormat
);
d
->
timeReleasedSel
=
new
QTimeEdit
(
this
);
d
->
timeReleasedSel
->
setDisplayFormat
(
timeFormat
);
d
->
setTodayReleasedBtn
=
new
QPushButton
();
d
->
setTodayReleasedBtn
->
setIcon
(
QIcon
::
fromTheme
(
QLatin1String
(
"go-jump-today"
)));
...
...
@@ -155,8 +169,12 @@ IPTCProperties::IPTCProperties(QWidget* const parent)
d
->
dateExpiredCheck
=
new
QCheckBox
(
i18n
(
"Expiration date"
),
this
);
d
->
timeExpiredCheck
=
new
QCheckBox
(
i18n
(
"Expiration time"
),
this
);
d
->
zoneExpiredSel
=
new
TimeZoneComboBox
(
this
);
d
->
dateExpiredSel
=
new
QDateEdit
(
this
);
d
->
dateExpiredSel
->
setDisplayFormat
(
dateFormat
);
d
->
timeExpiredSel
=
new
QTimeEdit
(
this
);
d
->
timeExpiredSel
->
setDisplayFormat
(
timeFormat
);
d
->
setTodayExpiredBtn
=
new
QPushButton
();
d
->
setTodayExpiredBtn
->
setIcon
(
QIcon
::
fromTheme
(
QLatin1String
(
"go-jump-today"
)));
...
...
utilities/metadataedit/xmp/xmporigin.cpp
View file @
d646b109
...
...
@@ -107,11 +107,27 @@ XMPOrigin::XMPOrigin(QWidget* const parent)
{
QGridLayout
*
const
grid
=
new
QGridLayout
(
this
);
QString
dateTimeFormat
=
QLocale
().
dateTimeFormat
(
QLocale
::
ShortFormat
);
if
(
!
dateTimeFormat
.
contains
(
QLatin1String
(
"yyyy"
)))
{
dateTimeFormat
.
replace
(
QLatin1String
(
"yy"
),
QLatin1String
(
"yyyy"
));
}
if
(
!
dateTimeFormat
.
contains
(
QLatin1String
(
"ss"
)))
{
dateTimeFormat
.
replace
(
QLatin1String
(
"mm"
),
QLatin1String
(
"mm:ss"
));
}
// --------------------------------------------------------
d
->
dateDigitalizedCheck
=
new
QCheckBox
(
i18n
(
"Digitization date"
),
this
);
d
->
zoneDigitalizedSel
=
new
TimeZoneComboBox
(
this
);
d
->
dateDigitalizedSel
=
new
QDateTimeEdit
(
this
);
d
->
dateDigitalizedSel
->
setDisplayFormat
(
dateTimeFormat
);
d
->
setTodayDigitalizedBtn
=
new
QPushButton
();
d
->
setTodayDigitalizedBtn
->
setIcon
(
QIcon
::
fromTheme
(
QLatin1String
(
"go-jump-today"
)));
...
...
@@ -128,7 +144,10 @@ XMPOrigin::XMPOrigin(QWidget* const parent)
d
->
dateCreatedCheck
=
new
QCheckBox
(
i18n
(
"Creation date"
),
this
);
d
->
zoneCreatedSel
=
new
TimeZoneComboBox
(
this
);
d
->
dateCreatedSel
=
new
QDateTimeEdit
(
this
);
d
->
dateCreatedSel
->
setDisplayFormat
(
dateTimeFormat
);
d
->
syncEXIFDateCheck
=
new
QCheckBox
(
i18n
(
"Sync EXIF creation date"
),
this
);
d
->
setTodayCreatedBtn
=
new
QPushButton
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment