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
8217640c
Commit
8217640c
authored
Sep 16, 2014
by
Gilles Caulier
🗼
Browse files
new option to pring tag names list while slideshow
CCBUGS: 163941
parent
1e206e4b
Changes
6
Hide whitespace changes
Inline
Side-by-side
app/utils/slideshowbuilder.cpp
View file @
8217640c
...
...
@@ -36,6 +36,7 @@
// Local includes
#include
"album.h"
#include
"albummanager.h"
#include
"imageinfoalbumsjob.h"
#include
"applicationsettings.h"
...
...
@@ -56,7 +57,7 @@ public:
ImageInfoList
infoList
;
Album
*
album
;
};
SlideShowBuilder
::
SlideShowBuilder
(
const
ImageInfoList
&
infoList
)
:
ProgressItem
(
0
,
"SlideShowBuilder"
,
QString
(),
QString
(),
true
,
true
),
d
(
new
Private
)
...
...
@@ -129,15 +130,18 @@ void SlideShowBuilder::slotParseImageInfoList(const ImageInfoList& list)
for
(
ImageInfoList
::
const_iterator
it
=
list
.
constBegin
();
!
d
->
cancel
&&
(
it
!=
list
.
constEnd
())
;
++
it
)
{
ImageInfo
info
=
*
it
;
ImageInfo
info
=
*
it
;
settings
.
fileList
.
append
(
info
.
fileUrl
());
SlidePictureInfo
pictInfo
;
pictInfo
.
comment
=
info
.
comment
();
pictInfo
.
title
=
info
.
title
();
pictInfo
.
rating
=
info
.
rating
();
pictInfo
.
colorLabel
=
info
.
colorLabel
();
pictInfo
.
pickLabel
=
info
.
pickLabel
();
pictInfo
.
photoInfo
=
info
.
photoInfoContainer
();
pictInfo
.
comment
=
info
.
comment
();
pictInfo
.
title
=
info
.
title
();
pictInfo
.
rating
=
info
.
rating
();
pictInfo
.
colorLabel
=
info
.
colorLabel
();
pictInfo
.
pickLabel
=
info
.
pickLabel
();
pictInfo
.
photoInfo
=
info
.
photoInfoContainer
();
pictInfo
.
tags
=
AlbumManager
::
instance
()
->
tagNames
(
info
.
tagIds
());
pictInfo
.
tags
.
sort
();
settings
.
pictInfoMap
.
insert
(
info
.
fileUrl
(),
pictInfo
);
advance
(
i
++
);
...
...
utilities/setup/setupslideshow.cpp
View file @
8217640c
...
...
@@ -6,7 +6,7 @@
* Date : 2005-05-21
* Description : setup tab for slideshow options.
*
* Copyright (C) 2005-201
2
by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2005-201
4
by Gilles Caulier <caulier dot gilles at gmail dot com>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
...
...
@@ -61,6 +61,7 @@ public:
showLabels
(
0
),
showComment
(
0
),
showTitle
(
0
),
showTags
(
0
),
showCapIfNoTitle
(
0
),
delayInput
(
0
)
{}
...
...
@@ -75,6 +76,7 @@ public:
QCheckBox
*
showLabels
;
QCheckBox
*
showComment
;
QCheckBox
*
showTitle
;
QCheckBox
*
showTags
;
QCheckBox
*
showCapIfNoTitle
;
KIntNumInput
*
delayInput
;
...
...
@@ -128,6 +130,9 @@ SetupSlideShow::SetupSlideShow(QWidget* const parent)
d
->
showCapIfNoTitle
=
new
QCheckBox
(
i18n
(
"Show image caption if it hasn't title"
),
panel
);
d
->
showCapIfNoTitle
->
setWhatsThis
(
i18n
(
"Show the image caption at the bottom of the screen if no titles existed."
));
d
->
showTags
=
new
QCheckBox
(
i18n
(
"Show image tags"
),
panel
);
d
->
showTags
->
setWhatsThis
(
i18n
(
"Show the digiKam image tag names at the bottom of the screen."
));
d
->
showLabels
=
new
QCheckBox
(
i18n
(
"Show image labels"
),
panel
);
d
->
showLabels
->
setWhatsThis
(
i18n
(
"Show the digiKam image color label, pick label, and rating at the bottom of the screen."
));
...
...
@@ -144,6 +149,7 @@ SetupSlideShow::SetupSlideShow(QWidget* const parent)
d
->
showTitle
->
hide
();
d
->
showCapIfNoTitle
->
hide
();
d
->
showLabels
->
hide
();
d
->
showTags
->
hide
();
}
layout
->
addWidget
(
d
->
delayInput
);
...
...
@@ -157,6 +163,7 @@ SetupSlideShow::SetupSlideShow(QWidget* const parent)
layout
->
addWidget
(
d
->
showComment
);
layout
->
addWidget
(
d
->
showTitle
);
layout
->
addWidget
(
d
->
showCapIfNoTitle
);
layout
->
addWidget
(
d
->
showTags
);
layout
->
addWidget
(
d
->
showLabels
);
layout
->
addStretch
();
layout
->
setMargin
(
KDialog
::
spacingHint
());
...
...
@@ -195,6 +202,7 @@ void SetupSlideShow::applySettings()
settings
.
printComment
=
d
->
showComment
->
isChecked
();
settings
.
printTitle
=
d
->
showTitle
->
isChecked
();
settings
.
printCapIfNoTitle
=
d
->
showCapIfNoTitle
->
isChecked
();
settings
.
printTags
=
d
->
showTags
->
isChecked
();
settings
.
printLabels
=
d
->
showLabels
->
isChecked
();
settings
.
writeToConfig
();
}
...
...
@@ -214,6 +222,7 @@ void SetupSlideShow::readSettings()
d
->
showComment
->
setChecked
(
settings
.
printComment
);
d
->
showTitle
->
setChecked
(
settings
.
printTitle
);
d
->
showCapIfNoTitle
->
setChecked
(
settings
.
printCapIfNoTitle
);
d
->
showTags
->
setChecked
(
settings
.
printTags
);
d
->
showLabels
->
setChecked
(
settings
.
printLabels
);
}
...
...
utilities/setup/setupslideshow.h
View file @
8217640c
...
...
@@ -6,7 +6,7 @@
* Date : 2005-05-21
* Description : setup tab for slideshow options.
*
* Copyright (C) 2005-201
2
by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2005-201
4
by Gilles Caulier <caulier dot gilles at gmail dot com>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
...
...
utilities/slideshow/slideshow.cpp
View file @
8217640c
...
...
@@ -453,6 +453,7 @@ void SlideShow::updatePixmap()
PhotoInfoContainer
photoInfo
=
d
->
settings
.
pictInfoMap
[
d
->
currentImage
].
photoInfo
;
QString
comment
=
d
->
settings
.
pictInfoMap
[
d
->
currentImage
].
comment
;
QString
title
=
d
->
settings
.
pictInfoMap
[
d
->
currentImage
].
title
;
QStringList
tags
=
d
->
settings
.
pictInfoMap
[
d
->
currentImage
].
tags
;
int
offset
=
d
->
settings
.
printLabels
?
30
:
0
;
// Display Labels.
...
...
@@ -474,6 +475,20 @@ void SlideShow::updatePixmap()
// convert offset to pixmap units
offset
=
int
(
ratio
*
offset
);
// Display tag names.
if
(
d
->
settings
.
printTags
)
{
str
.
clear
();
if
(
!
tags
.
isEmpty
())
{
tags
.
sort
();
str
+=
tags
.
join
(
", "
);;
printInfoText
(
p
,
offset
,
str
);
}
}
// Display Titles.
if
(
d
->
settings
.
printTitle
)
...
...
utilities/slideshow/slideshowsettings.cpp
View file @
8217640c
...
...
@@ -6,7 +6,7 @@
* Date : 2007-02-13
* Description : slide show settings container.
*
* Copyright (C) 2007-201
3
by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2007-201
4
by Gilles Caulier <caulier dot gilles at gmail dot com>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
...
...
@@ -49,6 +49,7 @@ const QString SlideShowSettings::configSlideShowPrintDateEntry("SlideShowPrintDa
const
QString
SlideShowSettings
::
configSlideShowPrintExpoSensitivityEntry
(
"SlideShowPrintExpoSensitivity"
);
const
QString
SlideShowSettings
::
configSlideShowPrintMakeModelEntry
(
"SlideShowPrintMakeModel"
);
const
QString
SlideShowSettings
::
configSlideShowPrintNameEntry
(
"SlideShowPrintName"
);
const
QString
SlideShowSettings
::
configSlideShowPrintTagsEntry
(
"SlideShowPrintTags"
);
const
QString
SlideShowSettings
::
configSlideShowPrintLabelsEntry
(
"SlideShowPrintLabels"
);
SlideShowSettings
::
SlideShowSettings
()
...
...
@@ -66,7 +67,7 @@ SlideShowSettings::SlideShowSettings()
printApertureFocal
=
false
;
printMakeModel
=
false
;
printExpoSensitivity
=
false
;
print
ColorLabel
=
false
;
print
Tags
=
false
;
useFullSizePreviews
=
true
;
}
...
...
@@ -78,18 +79,19 @@ void SlideShowSettings::readFromConfig()
{
KSharedConfig
::
Ptr
config
=
KGlobal
::
config
();
KConfigGroup
group
=
config
->
group
(
configGroupName
);
startWithCurrent
=
group
.
readEntry
(
configSlideShowStartCurrentEntry
,
false
);
delay
=
group
.
readEntry
(
configSlideShowDelayEntry
,
5
);
loop
=
group
.
readEntry
(
configSlideShowLoopEntry
,
false
);
printName
=
group
.
readEntry
(
configSlideShowPrintNameEntry
,
true
);
printDate
=
group
.
readEntry
(
configSlideShowPrintDateEntry
,
false
);
printApertureFocal
=
group
.
readEntry
(
configSlideShowPrintApertureFocalEntry
,
false
);
startWithCurrent
=
group
.
readEntry
(
configSlideShowStartCurrentEntry
,
false
);
delay
=
group
.
readEntry
(
configSlideShowDelayEntry
,
5
);
loop
=
group
.
readEntry
(
configSlideShowLoopEntry
,
false
);
printName
=
group
.
readEntry
(
configSlideShowPrintNameEntry
,
true
);
printDate
=
group
.
readEntry
(
configSlideShowPrintDateEntry
,
false
);
printApertureFocal
=
group
.
readEntry
(
configSlideShowPrintApertureFocalEntry
,
false
);
printExpoSensitivity
=
group
.
readEntry
(
configSlideShowPrintExpoSensitivityEntry
,
false
);
printMakeModel
=
group
.
readEntry
(
configSlideShowPrintMakeModelEntry
,
false
);
printComment
=
group
.
readEntry
(
configSlideShowPrintCommentEntry
,
false
);
printTitle
=
group
.
readEntry
(
configSlideShowPrintTitleEntry
,
false
);
printCapIfNoTitle
=
group
.
readEntry
(
configSlideShowPrintCapIfNoTitleEntry
,
false
);
printLabels
=
group
.
readEntry
(
configSlideShowPrintLabelsEntry
,
false
);
printMakeModel
=
group
.
readEntry
(
configSlideShowPrintMakeModelEntry
,
false
);
printComment
=
group
.
readEntry
(
configSlideShowPrintCommentEntry
,
false
);
printTitle
=
group
.
readEntry
(
configSlideShowPrintTitleEntry
,
false
);
printCapIfNoTitle
=
group
.
readEntry
(
configSlideShowPrintCapIfNoTitleEntry
,
false
);
printTags
=
group
.
readEntry
(
configSlideShowPrintTagsEntry
,
false
);
printLabels
=
group
.
readEntry
(
configSlideShowPrintLabelsEntry
,
false
);
exifRotate
=
MetadataSettings
::
instance
()
->
settings
().
exifRotate
;
}
...
...
@@ -108,6 +110,7 @@ void SlideShowSettings::writeToConfig()
group
.
writeEntry
(
configSlideShowPrintCommentEntry
,
printComment
);
group
.
writeEntry
(
configSlideShowPrintTitleEntry
,
printTitle
);
group
.
writeEntry
(
configSlideShowPrintCapIfNoTitleEntry
,
printCapIfNoTitle
);
group
.
writeEntry
(
configSlideShowPrintTagsEntry
,
printTags
);
group
.
writeEntry
(
configSlideShowPrintLabelsEntry
,
printLabels
);
group
.
sync
();
}
...
...
utilities/slideshow/slideshowsettings.h
View file @
8217640c
...
...
@@ -6,7 +6,7 @@
* Date : 2007-02-13
* Description : slide show settings container.
*
* Copyright (C) 2007-201
3
by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2007-201
4
by Gilles Caulier <caulier dot gilles at gmail dot com>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
...
...
@@ -72,8 +72,13 @@ public:
/** Picture Title
*/
QString
title
;
/** Picture Tag names
*/
QStringList
tags
;
/** Exif photo info of picture
*/
PhotoInfoContainer
photoInfo
;
...
...
@@ -106,45 +111,45 @@ public:
*/
bool
exifRotate
;
/** Print picture file name
during
slide
/** Print picture file name
while
slide
*/
bool
printName
;
/** Print picture creation date
during
slide
/** Print picture creation date
while
slide
*/
bool
printDate
;
/** Print camera Aperture and Focal
during
slide
/** Print camera Aperture and Focal
while
slide
*/
bool
printApertureFocal
;
/** Print camera Make and Model
during
slide
/** Print camera Make and Model
while
slide
*/
bool
printMakeModel
;
/** Print camera Exposure and Sensitivity
during
slide
/** Print camera Exposure and Sensitivity
while
slide
*/
bool
printExpoSensitivity
;
/** Print picture comment
during
slide
/** Print picture comment
while
slide
*/
bool
printComment
;
/** Print image title
during
slide
/** Print image title
while
slide
*/
bool
printTitle
;
/** Print image captions if no title available
during
slide
/** Print image captions if no title available
while
slide
*/
bool
printCapIfNoTitle
;
/** Print
color label, pick label, and rating during
slide
/** Print
tag names while
slide
*/
bool
print
Label
s
;
bool
print
Tag
s
;
/** Print color label
during
slide
/** Print color label
, pick label, and rating while
slide
*/
bool
print
Color
Label
;
bool
printLabel
s
;
/** Slide pictures in loop
*/
...
...
@@ -180,6 +185,7 @@ private:
static
const
QString
configSlideShowPrintExpoSensitivityEntry
;
static
const
QString
configSlideShowPrintMakeModelEntry
;
static
const
QString
configSlideShowPrintNameEntry
;
static
const
QString
configSlideShowPrintTagsEntry
;
static
const
QString
configSlideShowPrintLabelsEntry
;
};
...
...
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