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
2e283f2a
Commit
2e283f2a
authored
Oct 31, 2014
by
Gilles Caulier
🗼
Browse files
make libkgeomap as optional dependency to support Geolocation Maps
BUGS: 267789
FIXED-IN: 4.5.0
parent
e2041fbd
Changes
26
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
2e283f2a
...
...
@@ -325,10 +325,10 @@ MACRO_OPTIONAL_FIND_PACKAGE(Doxygen)
MACRO_OPTIONAL_FIND_PACKAGE
(
Sqlite2
)
MACRO_BOOL_TO_01
(
SQLITE2_FOUND HAVE_SQLITE2
)
MACRO_BOOL_TO_01
(
EIGEN3_FOUND HAVE_EIGEN3
)
MACRO_BOOL_TO_01
(
K
IPI
_FOUND HAVE_K
IPI
)
MACRO_BOOL_TO_01
(
K
FACE
_FOUND HAVE_K
FACE
)
MACRO_BOOL_TO_01
(
EIGEN3_FOUND
HAVE_EIGEN3
)
MACRO_BOOL_TO_01
(
KIPI_FOUND HAVE_KIPI
)
MACRO_BOOL_TO_01
(
K
FACE
_FOUND
HAVE_K
FACE
)
MACRO_BOOL_TO_01
(
K
GEOMAP
_FOUND HAVE_K
GEOMAP
)
# Whether to use Qt's scaling to downscale previews. Under MacOSX, Qt
# can make use of the higher physical resolution of Retina
...
...
@@ -372,7 +372,6 @@ PRINT_LIBRARY_STATUS("liblcms" "http://www.littlecms.com"
PRINT_LIBRARY_STATUS
(
"Boost Graph"
"http://www.boost.org/doc/libs/1_43_0/libs/graph/doc/index.html"
" (headers only)"
Boost_FOUND
)
PRINT_LIBRARY_STATUS
(
"libkexiv2"
"http://www.digikam.org/sharedlibs"
" (version >= 1.2.0)"
KEXIV2_FOUND
)
PRINT_LIBRARY_STATUS
(
"libkdcraw"
"http://www.digikam.org/sharedlibs"
" (version >=
${
KDCRAW_MIN_VERSION
}
)"
KDCRAW_FOUND
)
PRINT_LIBRARY_STATUS
(
"libkgeomap"
"http://www.digikam.org/sharedlibs"
" (version >= 2.0.0)"
KGEOMAP_FOUND
)
PRINT_LIBRARY_STATUS
(
"libpgf"
"http://www.libpgf.org"
" (version >=
${
PGF_MIN_VERSION
}
)"
PGF_FOUND
)
# ================================================================
...
...
@@ -399,6 +398,17 @@ ENDIF(KFACE_FOUND)
# ================================================================
IF
(
KGEOMAP_FOUND
)
MESSAGE
(
STATUS
" libkgeomap library found................. YES (optional)"
)
ELSE
(
KGEOMAP_FOUND
)
MESSAGE
(
STATUS
" libkgeomap library found................. NO (optional)"
)
MESSAGE
(
STATUS
""
)
MESSAGE
(
STATUS
" digiKam will be compiled without geolocation maps support."
)
MESSAGE
(
STATUS
""
)
ENDIF
(
KGEOMAP_FOUND
)
# ================================================================
IF
(
EIGEN3_FOUND
)
MESSAGE
(
STATUS
" Eigen3 library found..................... YES (optional)"
)
ELSE
(
EIGEN3_FOUND
)
...
...
@@ -496,13 +506,13 @@ ENDIF(DOXYGEN_FOUND)
# ================================================================
IF
(
LCMS_FOUND AND JPEG_FOUND AND PNG_FOUND AND TIFF_FOUND AND Boost_FOUND AND JASPER_FOUND AND KDCRAW_FOUND AND KEXIV2_FOUND
AND KGEOMAP_FOUND
)
IF
(
LCMS_FOUND AND JPEG_FOUND AND PNG_FOUND AND TIFF_FOUND AND Boost_FOUND AND JASPER_FOUND AND KDCRAW_FOUND AND KEXIV2_FOUND
)
MESSAGE
(
STATUS
" digiKam can be compiled.................. YES"
)
SET
(
DIGIKAM_CAN_BE_COMPILED true
)
ELSE
(
LCMS_FOUND AND JPEG_FOUND AND PNG_FOUND AND TIFF_FOUND AND Boost_FOUND AND JASPER_FOUND AND KDCRAW_FOUND AND KEXIV2_FOUND
AND KGEOMAP_FOUND
)
ELSE
(
LCMS_FOUND AND JPEG_FOUND AND PNG_FOUND AND TIFF_FOUND AND Boost_FOUND AND JASPER_FOUND AND KDCRAW_FOUND AND KEXIV2_FOUND
)
MESSAGE
(
FATAL_ERROR
" digiKam will be compiled................. NO (Look README file for more details about dependencies)"
)
SET
(
DIGIKAM_CAN_BE_COMPILED false
)
ENDIF
(
LCMS_FOUND AND JPEG_FOUND AND PNG_FOUND AND TIFF_FOUND AND Boost_FOUND AND JASPER_FOUND AND KDCRAW_FOUND AND KEXIV2_FOUND
AND KGEOMAP_FOUND
)
ENDIF
(
LCMS_FOUND AND JPEG_FOUND AND PNG_FOUND AND TIFF_FOUND AND Boost_FOUND AND JASPER_FOUND AND KDCRAW_FOUND AND KEXIV2_FOUND
)
IF
(
DIGIKAM_CAN_BE_COMPILED AND FORCED_UNBUNDLE
AND
((
NOT PGF_FOUND
)
OR
(
NOT EIGEN3_FOUND
)))
MESSAGE
(
STATUS
""
)
...
...
@@ -574,8 +584,6 @@ IF(DIGIKAM_CAN_BE_COMPILED)
${
KDE4_DEFINITIONS
}
${
KDCRAW_DEFINITIONS
}
${
KEXIV2_DEFINITIONS
}
${
KFACE_DEFINITIONS
}
${
KGEOMAP_DEFINITIONS
}
)
# Enable C++ Exceptions support, require by Greycstoration algorithm (CImg.h)
...
...
@@ -585,8 +593,6 @@ IF(DIGIKAM_CAN_BE_COMPILED)
INCLUDE_DIRECTORIES
(
${
KEXIV2_INCLUDE_DIR
}
${
KDCRAW_INCLUDE_DIR
}
${
KFACE_INCLUDE_DIR
}
${
KGEOMAP_INCLUDE_DIR
}
${
KDE4_INCLUDES
}
${
QT_INCLUDES
}
${
GPHOTO2_INCLUDE_DIRS
}
...
...
@@ -636,6 +642,7 @@ IF(DIGIKAM_CAN_BE_COMPILED)
IF
(
KIPI_FOUND
)
INCLUDE_DIRECTORIES
(
${
KIPI_INCLUDE_DIR
}
)
ADD_DEFINITIONS
(
${
KIPI_DEFINITIONS
}
)
ENDIF
(
KIPI_FOUND
)
...
...
@@ -644,9 +651,19 @@ IF(DIGIKAM_CAN_BE_COMPILED)
IF
(
KFACE_FOUND
)
INCLUDE_DIRECTORIES
(
${
KFACE_INCLUDE_DIR
}
)
ADD_DEFINITIONS
(
${
KFACE_DEFINITIONS
}
)
ENDIF
(
KFACE_FOUND
)
# Faces detection and recognition support
IF
(
KGEOMAP_FOUND
)
INCLUDE_DIRECTORIES
(
${
KGEOMAP_INCLUDE_DIR
}
)
ADD_DEFINITIONS
(
${
KGEOMAP_DEFINITIONS
}
)
ENDIF
(
KGEOMAP_FOUND
)
# ==================================================================================================
# Common targets parts
...
...
@@ -815,13 +832,18 @@ IF(DIGIKAM_CAN_BE_COMPILED)
${
CMAKE_CURRENT_SOURCE_DIR
}
/libs/imageproperties/imagepropertiestab.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/libs/imageproperties/imagepropertiesmetadatatab.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/libs/imageproperties/imagepropertiescolorstab.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/libs/imageproperties/imagepropertiesgpstab.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/libs/imageproperties/imagegpsmodelhelper.cpp
)
SET
(
libkgeomaphelper_SRCS
${
CMAKE_CURRENT_SOURCE_DIR
}
/libs/kgeomaphelper/digikam2kgeomap.cpp
)
IF
(
KGEOMAP_FOUND
)
SET
(
libkgeomaphelper_SRCS
${
CMAKE_CURRENT_SOURCE_DIR
}
/libs/kgeomaphelper/digikam2kgeomap.cpp
)
SET
(
libimageproperties_SRCS
${
libimageproperties_SRCS
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/libs/imageproperties/imagepropertiesgpstab.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/libs/imageproperties/imagegpsmodelhelper.cpp
)
ENDIF
(
KGEOMAP_FOUND
)
# --enable-final triggers: http://bugs.kde.org/show_bug.cgi?id=126326
# digikam: camera download: auto-rotated images lose EXIF info ...
...
...
@@ -1322,10 +1344,12 @@ IF(DIGIKAM_CAN_BE_COMPILED)
${
CMAKE_CURRENT_SOURCE_DIR
}
/utilities/fuzzysearch/sketchwidget.cpp
)
SET
(
libgpssearch_SRCS
${
CMAKE_CURRENT_SOURCE_DIR
}
/utilities/gpssearch/gpssearchview.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/utilities/gpssearch/gpsmarkertiler.cpp
)
IF
(
KGEOMAP_FOUND
)
SET
(
libgpssearch_SRCS
${
CMAKE_CURRENT_SOURCE_DIR
}
/utilities/gpssearch/gpssearchview.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/utilities/gpssearch/gpsmarkertiler.cpp
)
ENDIF
(
KGEOMAP_FOUND
)
SET
(
libimageversionssidebar_SRCS
${
CMAKE_CURRENT_SOURCE_DIR
}
/libs/models/imageversionsmodel.cpp
...
...
@@ -1455,7 +1479,6 @@ IF(DIGIKAM_CAN_BE_COMPILED)
${
CMAKE_CURRENT_SOURCE_DIR
}
/app/views/imagepreviewviewitem.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/app/views/imagepreviewview.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/app/views/mediaplayerview.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/app/views/mapwidgetview.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/app/views/welcomepageview.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/app/views/leftsidebarwidgets.cpp
...
...
@@ -1485,6 +1508,13 @@ IF(DIGIKAM_CAN_BE_COMPILED)
)
ENDIF
(
KFACE_FOUND
)
IF
(
KGEOMAP_FOUND
)
SET
(
libdigikamgui_SRCS
${
libdigikamgui_SRCS
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/app/views/mapwidgetview.cpp
)
ENDIF
(
KGEOMAP_FOUND
)
IF
(
DIGIKAM_ENABLE_MODELTEST
)
MESSAGE
(
STATUS
"Modeltest enabled"
)
SET
(
libdigikamgui_SRCS
${
libdigikamgui_SRCS
}
...
...
NEWS
View file @
2e283f2a
...
...
@@ -5,6 +5,7 @@ NEW FEATURES:
General : Remove internal libpgf. Add external and mandatory dependency to libpgf >= 6.12.24.
General : libkipi is now an optional dependency to support kipi-plugins.
General : libkgeomap is now an optional dependency to support geolocation maps.
General : libkface is now an optional dependency to support faces detection and recocognition.
BUGFIXES FROM KDE BUGZILLA (https://www.digikam.org/changelog):
...
...
@@ -23,4 +24,5 @@ BUGFIXES FROM KDE BUGZILLA (https://www.digikam.org/changelog):
012 ==> 340439 - No auto-rotation/flip Images after download [patch].
013 ==> 338407 - Import not showing image thumbnails for certain Canon cameras [patch].
014 ==> 326718 - Clear text button on file rename does nothing [patch].
015 ==>
015 ==> 267789] Make face detection (kface) and geo tagging (kmap) optional features [patch].
016 ==>
app/CMakeLists.txt
View file @
2e283f2a
...
...
@@ -23,7 +23,6 @@ SET(digikamcore_LIB_SRCS
${
libdigikamhelpers_SRCS
}
${
libtthread_SRCS
}
${
libversionmanager_SRCS
}
${
libkgeomaphelper_SRCS
}
${
libkde3rdparty_SRCS
}
# widgets and dialogs
...
...
@@ -49,6 +48,12 @@ SET(digikamcore_LIB_SRCS
${
libeditorplugin_SRCS
}
)
IF
(
KGEOMAP_FOUND
)
SET
(
digikamcore_LIB_SRCS
${
digikamcore_LIB_SRCS
}
${
libkgeomaphelper_SRCS
}
)
ENDIF
(
KGEOMAP_FOUND
)
KDE4_ADD_UI_FILES
(
digikamcore_LIB_SRCS
${
CMAKE_CURRENT_SOURCE_DIR
}
/../utilities/imageeditor/printiface/printoptionspage.ui
)
...
...
@@ -87,7 +92,6 @@ TARGET_LINK_LIBRARIES(digikamcore
${
KDCRAW_LIBRARIES
}
${
KEXIV2_LIBRARIES
}
${
KGEOMAP_LIBRARIES
}
${
LCMS_LIBRARIES
}
)
...
...
@@ -128,6 +132,10 @@ IF(KFACE_FOUND)
TARGET_LINK_LIBRARIES
(
digikamcore
${
KFACE_LIBRARIES
}
)
ENDIF
(
KFACE_FOUND
)
IF
(
KGEOMAP_FOUND
)
TARGET_LINK_LIBRARIES
(
digikamcore
${
KGEOMAP_LIBRARIES
}
)
ENDIF
(
KGEOMAP_FOUND
)
SET_TARGET_PROPERTIES
(
digikamcore PROPERTIES VERSION
${
DIGIKAM_VERSION_SHORT
}
SOVERSION
${
DIGIKAM_VERSION_SHORT
}
)
IF
(
WIN32
)
...
...
@@ -202,8 +210,6 @@ SET(digikam_SRCS ${libeditorgui_SRCS}
${
libmaintenance_SRCS
}
${
libsearchwindow_SRCS
}
${
libfuzzysearch_SRCS
}
${
libgpssearch_SRCS
}
${
libkgeomaphelper_SRCS
}
${
libqueuemanager_SRCS
}
${
libalbummodels_SRCS
}
${
libdigikamgui_SRCS
}
...
...
@@ -230,6 +236,10 @@ IF(KFACE_FOUND)
SET
(
digikam_SRCS
${
digikam_SRCS
}
${
libfacemanagement_SRCS
}
)
ENDIF
(
KFACE_FOUND
)
IF
(
KGEOMAP_FOUND
)
SET
(
digikam_SRCS
${
digikam_SRCS
}
${
libkgeomaphelper_SRCS
}
${
libgpssearch_SRCS
}
)
ENDIF
(
KGEOMAP_FOUND
)
QT4_ADD_DBUS_ADAPTOR
(
digikam_SRCS main/org.kde.digikam.xml main/digikamapp.h Digikam::DigikamApp
)
KDE4_ADD_APP_ICON
(
digikam_SRCS
"../data/icons/apps/hi*-app-digikam.png"
)
...
...
@@ -259,8 +269,6 @@ TARGET_LINK_LIBRARIES(digikam
${
KDE4_SOLID_LIBS
}
${
KDE4_THREADWEAVER_LIBRARIES
}
${
KFACE_LIBRARIES
}
${
KGEOMAP_LIBRARIES
}
${
KEXIV2_LIBRARIES
}
${
KDCRAW_LIBRARIES
}
...
...
@@ -308,6 +316,10 @@ IF(KFACE_FOUND)
TARGET_LINK_LIBRARIES
(
digikam
${
KFACE_LIBRARIES
}
)
ENDIF
(
KFACE_FOUND
)
IF
(
KGEOMAP_FOUND
)
TARGET_LINK_LIBRARIES
(
digikam
${
KGEOMAP_LIBRARIES
}
)
ENDIF
(
KGEOMAP_FOUND
)
INSTALL
(
TARGETS digikam
${
INSTALL_TARGETS_DEFAULT_ARGS
}
)
# Others Files to install #######################################################
...
...
app/main/digikamapp.cpp
View file @
2e283f2a
...
...
@@ -145,6 +145,7 @@
#include "newitemsfinder.h"
#include "imagepluginloader.h"
#include "tagsmanager.h"
#include "imagesortsettings.h"
#ifdef HAVE_KIPI
#include "kipipluginloader.h"
...
...
@@ -898,11 +899,13 @@ void DigikamApp::setupActions()
connect
(
d
->
imagePreviewAction
,
SIGNAL
(
triggered
()),
d
->
view
,
SLOT
(
slotImagePreview
()));
d
->
imageViewSelectionAction
->
addAction
(
d
->
imagePreviewAction
);
#ifdef HAVE_KGEOMAP
d
->
imageMapViewAction
=
new
KToggleAction
(
KIcon
(
"applications-internet"
),
i18nc
(
"@action Switch to map view"
,
"Map"
),
this
);
actionCollection
()
->
addAction
(
"map_view"
,
d
->
imageMapViewAction
);
connect
(
d
->
imageMapViewAction
,
SIGNAL
(
triggered
()),
d
->
view
,
SLOT
(
slotMapWidgetView
()));
d
->
imageViewSelectionAction
->
addAction
(
d
->
imageMapViewAction
);
#endif // HAVE_KGEOMAP
d
->
imageTableViewAction
=
new
KToggleAction
(
KIcon
(
"view-list-details"
),
i18nc
(
"@action Switch to table view"
,
"Table"
),
this
);
...
...
@@ -3100,7 +3103,9 @@ void DigikamApp::slotSwitchedToMapView()
{
//TODO: Link to map view's zoom actions
d
->
zoomBar
->
setBarMode
(
DZoomBar
::
ThumbsSizeCtrl
);
#ifdef HAVE_KGEOMAP
d
->
imageMapViewAction
->
setChecked
(
true
);
#endif // HAVE_KGEOMAP
toogleShowBar
();
}
...
...
app/main/digikamapp_p.h
View file @
2e283f2a
...
...
@@ -121,7 +121,9 @@ public:
assignTagAction
(
0
),
imageViewSelectionAction
(
0
),
imagePreviewAction
(
0
),
#ifdef HAVE_KGEOMAP
imageMapViewAction
(
0
),
#endif // HAVE_KGEOMAP
imageTableViewAction
(
0
),
imageIconViewAction
(
0
),
imageLightTableAction
(
0
),
...
...
@@ -243,7 +245,9 @@ public:
// Image Actions
KSelectAction
*
imageViewSelectionAction
;
KToggleAction
*
imagePreviewAction
;
#ifdef HAVE_KGEOMAP
KToggleAction
*
imageMapViewAction
;
#endif // HAVE_KGEOMAP
KToggleAction
*
imageTableViewAction
;
KToggleAction
*
imageIconViewAction
;
KAction
*
imageLightTableAction
;
...
...
app/utils/config-digikam.h.cmake.in
View file @
2e283f2a
...
...
@@ -39,9 +39,12 @@
/* Define to 1 if an external Kipi shared library have been found */
#cmakedefine HAVE_KIPI
/* Define to 1 if an external K
ipi
shared library have been found */
/* Define to 1 if an external K
face
shared library have been found */
#cmakedefine HAVE_KFACE
/* Define to 1 if an external Kgeomap shared library have been found */
#cmakedefine HAVE_KGEOMAP
/* Define to 1 if an external Eigen3 shared library have been found */
#cmakedefine HAVE_EIGEN3
...
...
app/views/digikamview.cpp
View file @
2e283f2a
...
...
@@ -59,7 +59,6 @@
#include "filterstatusbar.h"
#include "leftsidebarwidgets.h"
#include "loadingcacheinterface.h"
#include "mapwidgetview.h"
#include "mediaplayerview.h"
#include "metadatasettings.h"
#include "newitemsfinder.h"
...
...
@@ -86,6 +85,10 @@
#include "albumlabelstreeview.h"
#include "tagsactionmngr.h"
#ifdef HAVE_KGEOMAP
#include "mapwidgetview.h"
#endif // HAVE_KGEOMAP
#ifdef USE_PRESENTATION_MODE
#include "qmlshow.h"
#endif // USE_PRESENTATION_MODE
...
...
@@ -113,7 +116,11 @@ public:
timelineSideBar
(
0
),
searchSideBar
(
0
),
fuzzySearchSideBar
(
0
),
#ifdef HAVE_KGEOMAP
gpsSearchSideBar
(
0
),
mapView
(
0
),
#endif // HAVE_KGEOMAP
#ifdef HAVE_KFACE
peopleSideBar
(
0
),
...
...
@@ -121,7 +128,6 @@ public:
parent
(
0
),
iconView
(
0
),
mapView
(
0
),
tableView
(
0
),
albumManager
(
0
),
albumHistory
(
0
),
...
...
@@ -166,16 +172,17 @@ public:
SearchSideBarWidget
*
searchSideBar
;
FuzzySearchSideBarWidget
*
fuzzySearchSideBar
;
#ifdef HAVE_KGEOMAP
GPSSearchSideBarWidget
*
gpsSearchSideBar
;
MapWidgetView
*
mapView
;
#endif // HAVE_KGEOMAP
#ifdef HAVE_KFACE
PeopleSideBarWidget
*
peopleSideBar
;
#endif
/* HAVE_KFACE */
DigikamApp
*
parent
;
DigikamImageView
*
iconView
;
MapWidgetView
*
mapView
;
TableView
*
tableView
;
AlbumManager
*
albumManager
;
AlbumHistory
*
albumHistory
;
...
...
@@ -272,7 +279,11 @@ DigikamView::DigikamView(QWidget* const parent, DigikamModelCollection* const mo
d
->
stackedview
->
setDockArea
(
d
->
dockArea
);
d
->
iconView
=
d
->
stackedview
->
imageIconView
();
#ifdef HAVE_KGEOMAP
d
->
mapView
=
d
->
stackedview
->
mapWidgetView
();
#endif // HAVE_KGEOMAP
d
->
tableView
=
d
->
stackedview
->
tableView
();
d
->
addPageUpDownActions
(
this
,
d
->
stackedview
->
imagePreviewView
());
...
...
@@ -327,12 +338,14 @@ DigikamView::DigikamView(QWidget* const parent, DigikamModelCollection* const mo
d
->
searchModificationHelper
);
d
->
leftSideBarWidgets
<<
d
->
fuzzySearchSideBar
;
#ifdef HAVE_KGEOMAP
d
->
gpsSearchSideBar
=
new
GPSSearchSideBarWidget
(
d
->
leftSideBar
,
d
->
modelCollection
->
getSearchModel
(),
d
->
searchModificationHelper
,
d
->
iconView
->
imageFilterModel
(),
d
->
iconView
->
getSelectionModel
());
d
->
leftSideBarWidgets
<<
d
->
gpsSearchSideBar
;
#endif // HAVE_KGEOMAP
#ifdef HAVE_KFACE
...
...
@@ -537,8 +550,10 @@ void DigikamView::setupConnections()
connect
(
this
,
SIGNAL
(
signalNoCurrentItem
()),
d
->
rightSideBar
,
SLOT
(
slotNoCurrentItem
()));
#ifdef HAVE_KGEOMAP
connect
(
d
->
gpsSearchSideBar
,
SIGNAL
(
signalMapSoloItems
(
QList
<
qlonglong
>
,
QString
)),
d
->
iconView
->
imageFilterModel
(),
SLOT
(
setIdWhitelist
(
QList
<
qlonglong
>
,
QString
)));
#endif // HAVE_KGEOMAP
// -- Filter Bars Connections ---------------------------------
...
...
@@ -715,7 +730,10 @@ void DigikamView::loadViewState()
d
->
initialAlbumID
=
group
.
readEntry
(
"InitialAlbumID"
,
0
);
#ifdef HAVE_KGEOMAP
d
->
mapView
->
loadState
();
#endif // HAVE_KGEOMAP
d
->
tableView
->
loadState
();
d
->
rightSideBar
->
loadState
();
}
...
...
@@ -759,7 +777,10 @@ void DigikamView::saveViewState()
group
.
writeEntry
(
"InitialAlbumID"
,
0
);
}
#ifdef HAVE_KGEOMAP
d
->
mapView
->
saveState
();
#endif // HAVE_KGEOMAP
d
->
tableView
->
saveState
();
d
->
rightSideBar
->
saveState
();
}
...
...
@@ -1184,7 +1205,11 @@ void DigikamView::slotAlbumSelected(QList<Album*> albums)
if
(
albums
.
isEmpty
()
||
!
albums
.
first
())
{
d
->
iconView
->
openAlbum
(
QList
<
Album
*>
());
#ifdef HAVE_KGEOMAP
d
->
mapView
->
openAlbum
(
0
);
#endif // HAVE_KGEOMAP
slotTogglePreviewMode
(
ImageInfo
());
return
;
}
...
...
@@ -2239,8 +2264,10 @@ ImageInfo DigikamView::currentInfo() const
case
StackedView
::
TableViewMode
:
return
d
->
tableView
->
currentInfo
();
#ifdef HAVE_KGEOMAP
case
StackedView
::
MapWidgetMode
:
return
d
->
mapView
->
currentImageInfo
();
#endif // HAVE_KGEOMAP
case
StackedView
::
MediaPlayerMode
:
case
StackedView
::
PreviewImageMode
:
...
...
app/views/leftsidebarwidgets.cpp
View file @
2e283f2a
...
...
@@ -1259,6 +1259,8 @@ void FuzzySearchSideBarWidget::newSimilarSearch(const ImageInfo& imageInfo)
// -----------------------------------------------------------------------------
#ifdef HAVE_KGEOMAP
class
GPSSearchSideBarWidget
::
Private
{
public:
...
...
@@ -1331,6 +1333,8 @@ QString GPSSearchSideBarWidget::getCaption()
return
i18nc
(
"Search images on a map"
,
"Map"
);
}
#endif // HAVE_KGEOMAP
// -----------------------------------------------------------------------------
#ifdef HAVE_KFACE
...
...
app/views/leftsidebarwidgets.h
View file @
2e283f2a
...
...
@@ -35,13 +35,16 @@
#include "config-digikam.h"
#include "albummodel.h"
#include "albummodificationhelper.h"
#include "gpssearchview.h"
#include "imagealbumfiltermodel.h"
#include "searchmodificationhelper.h"
#include "sidebarwidget.h"
#include "imagefiltermodel.h"
#include "albumlabelstreeview.h"
#ifdef HAVE_KGEOMAP
#include "gpssearchview.h"
#endif // HAVE_KGEOMAP
namespace
Digikam
{
...
...
@@ -321,6 +324,8 @@ private:
// -----------------------------------------------------------------------------------------
#ifdef HAVE_KGEOMAP
/**
* SideBarWidget for the gps search.
*
...
...
@@ -355,6 +360,8 @@ private:
Private
*
const
d
;
};
#endif // HAVE_KGEOMAP
// -----------------------------------------------------------------------------------------
#ifdef HAVE_KFACE
...
...
app/views/mapwidgetview.h
View file @
2e283f2a
...
...
@@ -62,7 +62,7 @@ public:
enum
Application
{
ApplicationDigikam
=
1
,
ApplicationDigikam
=
1
,
ApplicationImportUI
=
2
};
...
...
app/views/stackedview.cpp
View file @
2e283f2a
...
...
@@ -7,8 +7,8 @@
* Description : A widget stack to embedded album content view
* or the current image preview.
*
* Copyright (C) 2006-201
1
by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2013 by Michael G. Hansen <mike at mghansen dot de>
* Copyright (C) 2006-201
4
by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2013
by Michael G. Hansen <mike at mghansen dot de>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
...
...
@@ -56,18 +56,21 @@
#include "welcomepageview.h"
#include "mediaplayerview.h"
#include "thumbbardock.h"
#include "mapwidgetview.h"
#include "tableview.h"
#ifdef HAVE_KGEOMAP
#include "mapwidgetview.h"
#endif // HAVE_KGEOMAP
namespace
Digikam
{
class
StackedView
::
StackedView
Priv
class
StackedView
::
Priv
ate
{
public:
StackedView
Priv
()
Priv
ate
()
{
dockArea
=
0
;
splitter
=
0
;
...
...
@@ -77,10 +80,12 @@ public:
imagePreviewView
=
0
;
welcomePageView
=
0
;
mediaPlayerView
=
0
;
mapWidgetView
=
0
;
needUpdateBar
=
false
;
syncingSelection
=
false
;
tableView
=
0
;
#ifdef HAVE_KGEOMAP
mapWidgetView
=
0
;
#endif // HAVE_KGEOMAP
}
bool
needUpdateBar
;
...
...
@@ -95,12 +100,14 @@ public:
MediaPlayerView
*
mediaPlayerView
;
ThumbBarDock
*
thumbBarDock
;
WelcomePageView
*
welcomePageView
;
MapWidgetView
*
mapWidgetView
;
TableView
*
tableView
;
#ifdef HAVE_KGEOMAP
MapWidgetView
*
mapWidgetView
;
#endif // HAVE_KGEOMAP
};
StackedView
::
StackedView
(
QWidget
*
parent
)
:
QStackedWidget
(
parent
),
d
(
new
StackedView
Priv
)
StackedView
::
StackedView
(
QWidget
*
const
parent
)
:
QStackedWidget
(
parent
),
d
(
new
Priv
ate
)
{
d
->
imageIconView
=
new
DigikamImageView
(
this
);
d
->
imagePreviewView
=
new
ImagePreviewView
(
this
);
...
...
@@ -113,25 +120,29 @@ StackedView::StackedView(QWidget* parent)
d
->
welcomePageView
=
new
WelcomePageView
(
this
);
d
->
mediaPlayerView
=
new
MediaPlayerView
(
this
);
d
->
tableView
=
new
TableView
(
d
->
imageIconView
->
getSelectionModel
(),
d
->
imageIconView
->
imageFilterModel
(),
this
);
d
->
tableView
->
setObjectName
(
"mainwindow_tableview"
);
#ifdef HAVE_KGEOMAP
d
->
mapWidgetView
=
new
MapWidgetView
(
d
->
imageIconView
->
getSelectionModel
(),
d
->
imageIconView
->
imageFilterModel
(),
this
,
MapWidgetView
::
ApplicationDigikam
);
d
->
mapWidgetView
->
setObjectName
(
"mainwindow_mapwidgetview"
);
d
->
tableView
=
new
TableView
(
d
->
imageIconView
->
getSelectionModel
(),
d
->
imageIconView
->
imageFilterModel
(),
this
);
d
->
tableView
->
setObjectName
(
"mainwindow_tableview"
);
#endif // HAVE_KGEOMAP
insertWidget
(
IconViewMode
,
d
->
imageIconView
);
insertWidget
(
PreviewImageMode
,
d
->
imagePreviewView
);
insertWidget
(
WelcomePageMode
,
d
->
welcomePageView
->
view
());
insertWidget
(
MediaPlayerMode
,
d
->
mediaPlayerView
);
insertWidget
(
MapWidgetMode
,
d
->
mapWidgetView
);
insertWidget
(
TableViewMode
,
d
->
tableView
);
#ifdef HAVE_KGEOMAP
insertWidget
(
MapWidgetMode
,
d
->
mapWidgetView
);
#endif // HAVE_KGEOMAP
setViewMode
(
IconViewMode
);
setAttribute
(
Qt
::
WA_DeleteOnClose
);
...
...
@@ -255,10 +266,12 @@ ImagePreviewView* StackedView::imagePreviewView() const
return
d
->
imagePreviewView
;
}
#ifdef HAVE_KGEOMAP
MapWidgetView
*
StackedView
::
mapWidgetView
()
const
{
return
d
->
mapWidgetView
;
}
#endif // HAVE_KGEOMAP
TableView
*
StackedView
::
tableView
()
const
{
...
...
@@ -366,17 +379,22 @@ void StackedView::setViewMode(const StackedViewMode mode)
setCurrentIndex
(
mode
);
}
#ifdef HAVE_KGEOMAP
d
->
mapWidgetView
->
setActive
(
mode
==
MapWidgetMode