Commit 46767337 authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

Add an icon over thumbnails to indicate the geotagging status.

This include : Album icon-view, Preview Thumbbar, Editor Thumbbar, LightTable Thumbbar, Import Icon-view, Import ThumbBar, Showfoto Thummbar
A new settings in digiKam-AlbumView, DigiKam-Camera, and Showfoto-Misc pages have been add to turn on/of this feature (disabled by default)
BUGS: 254131
FIXED-IN: 4.1.0
parent 115da91f
......@@ -21,4 +21,5 @@ BUGFIXES FROM KDE BUGZILLA (alias B.K.O | http://bugs.kde.org):
012 ==> 323014 - Import : download / delete all delete only one image.
013 ==> 323111 - When images are deleted in the import view, some non-deleted thumbnails disappear from the view.
014 ==> 330063 - digiKam, when deleting photo no confirmation [patch].
015 ==>
\ No newline at end of file
015 ==> 311522 - Better place for thumbnails in geolocation.
016 ==>
\ No newline at end of file
......@@ -90,10 +90,12 @@ void DigikamImageDelegate::updateRects()
d->imageInformationRect = QRect(d->margin, y, d->contentWidth, 0);
const AlbumSettings* albumSettings = AlbumSettings::instance();
d->drawImageFormat = albumSettings->getIconShowImageFormat();
d->drawCoordinates = AlbumSettings::instance()->getIconShowCoordinates();
const int iconSize = KIconLoader::SizeSmallMedium;
d->pickLabelRect = QRect(d->margin, y, iconSize, iconSize);
d->groupRect = QRect(d->contentWidth - iconSize, y, iconSize, iconSize);
d->coordinatesRect = QRect(d->contentWidth - KIconLoader::SizeSmall+2, d->pixmapRect.top(), KIconLoader::SizeSmall, KIconLoader::SizeSmall);
if (albumSettings->getIconShowRating())
{
......
......@@ -8,7 +8,7 @@
*
* Copyright (C) 2002-2005 by Renchi Raju <renchi dot raju at gmail dot com>
* Copyright (C) 2009-2011 by Andi Clemens <andi dot clemens at gmail dot com>
* Copyright (C) 2002-2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2002-2014 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2006-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
*
* This program is free software; you can redistribute it
......@@ -69,6 +69,7 @@ void ImageDelegate::ImageDelegatePrivate::clearRects()
titleRect = QRect(0, 0, 0, 0);
commentsRect = QRect(0, 0, 0, 0);
resolutionRect = QRect(0, 0, 0, 0);
coordinatesRect = QRect(0, 0, 0, 0);
arRect = QRect(0, 0, 0, 0);
sizeRect = QRect(0, 0, 0, 0);
tagRect = QRect(0, 0, 0, 0);
......@@ -203,6 +204,12 @@ QRect ImageDelegate::groupIndicatorRect() const
return d->groupRect;
}
QRect ImageDelegate::coordinatesIndicatorRect() const
{
Q_D(const ImageDelegate);
return d->coordinatesRect;
}
void ImageDelegate::prepareThumbnails(ImageThumbnailModel* thumbModel, const QList<QModelIndex>& indexes)
{
thumbModel->prepareThumbnails(indexes, thumbnailSize());
......@@ -211,7 +218,7 @@ void ImageDelegate::prepareThumbnails(ImageThumbnailModel* thumbModel, const QLi
QPixmap ImageDelegate::retrieveThumbnailPixmap(const QModelIndex& index, int thumbnailSize)
{
// work around constness
QAbstractItemModel* model = const_cast<QAbstractItemModel*>(index.model());
QAbstractItemModel* const model = const_cast<QAbstractItemModel*>(index.model());
// set requested thumbnail size
model->setData(index, thumbnailSize, ImageModel::ThumbnailRole);
// get data from model
......@@ -351,6 +358,11 @@ void ImageDelegate::paint(QPainter* p, const QStyleOptionViewItem& option, const
drawImageFormat(p, actualPixmapRect, frm);
}
if (d->drawCoordinates && info.hasCoordinates())
{
drawGeolocationIndicator(p, d->coordinatesRect);
}
if (d->drawFocusFrame)
{
drawFocusRect(p, option, isSelected);
......
......@@ -7,6 +7,7 @@
* Description : Qt item view for images - the delegate
*
* Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
* Copyright (C) 2009-2014 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
......@@ -56,6 +57,7 @@ public:
QRect tagsRect() const;
QRect actualPixmapRect(const QModelIndex& index) const;
QRect groupIndicatorRect() const;
QRect coordinatesIndicatorRect() const;
int calculatethumbSizeToFit(int ws);
......
......@@ -7,7 +7,7 @@
* Description : Qt item view for images - the delegate
*
* Copyright (C) 2002-2005 by Renchi Raju <renchi dot raju at gmail dot com>
* Copyright (C) 2002-2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2002-2014 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2009-2011 by Andi Clemens <andi dot clemens at gmail dot com>
* Copyright (C) 2006-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
*
......@@ -50,6 +50,7 @@ public:
categoryDrawer = 0;
contentWidth = 0;
drawImageFormat = false;
drawCoordinates = false;
drawMouseOverFrame = true;
drawFocusFrame = true;
ratingOverThumbnail = false;
......@@ -72,10 +73,12 @@ public:
QRect sizeRect;
QRect tagRect;
QRect imageInformationRect;
QRect coordinatesRect;
QRect pickLabelRect;
QRect groupRect;
bool drawImageFormat;
bool drawCoordinates;
bool drawFocusFrame;
bool drawMouseOverFrame;
bool ratingOverThumbnail;
......
......@@ -6,7 +6,7 @@
* Date : 2009-05-31
* Description : rotate icon view item at mouse hover
*
* Copyright (C) 2009-2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2009-2014 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
......@@ -38,7 +38,7 @@
namespace Digikam
{
ImageRotateOverlayButton::ImageRotateOverlayButton(ImageRotateOverlayDirection dir, QAbstractItemView* parentView)
ImageRotateOverlayButton::ImageRotateOverlayButton(ImageRotateOverlayDirection dir, QAbstractItemView* const parentView)
: ItemViewHoverButton(parentView),
m_direction(dir)
{
......@@ -75,7 +75,7 @@ void ImageRotateOverlayButton::updateToolTip()
// --------------------------------------------------------------------
ImageRotateOverlay::ImageRotateOverlay(ImageRotateOverlayDirection dir, QObject* parent)
ImageRotateOverlay::ImageRotateOverlay(ImageRotateOverlayDirection dir, QObject* const parent)
: HoverButtonDelegateOverlay(parent),
m_direction(dir)
{
......@@ -103,7 +103,7 @@ void ImageRotateOverlay::updateButton(const QModelIndex& index)
{
const QRect rect = m_view->visualRect(index);
const int gap = 5;
const int x = rect.right() - (isLeft() ? (2*gap + 32) : (gap + 16));
const int x = rect.right() - 2*gap - (isLeft() ? KIconLoader::SizeSmall*3 + 2 : KIconLoader::SizeSmall*2 +2);
const int y = rect.top() + gap;
button()->move(QPoint(x, y));
}
......
......@@ -6,7 +6,7 @@
* Date : 2009-05-31
* Description : rotate icon view item at mouse hover
*
* Copyright (C) 2009-2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2009-2014 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
......@@ -47,7 +47,7 @@ class ImageRotateOverlayButton : public ItemViewHoverButton
{
public:
ImageRotateOverlayButton(ImageRotateOverlayDirection dir, QAbstractItemView* parentView);
ImageRotateOverlayButton(ImageRotateOverlayDirection dir, QAbstractItemView* const parentView);
virtual QSize sizeHint() const;
protected:
......@@ -68,14 +68,14 @@ class ImageRotateOverlay : public HoverButtonDelegateOverlay
public:
ImageRotateOverlay(ImageRotateOverlayDirection dir, QObject* parent);
ImageRotateOverlay(ImageRotateOverlayDirection dir, QObject* const parent);
virtual void setActive(bool active);
ImageRotateOverlayDirection direction() const { return m_direction; }
bool isLeft() const { return m_direction == ImageRotateOverlayLeft; }
bool isLeft() const { return m_direction == ImageRotateOverlayLeft; }
bool isRight() const { return m_direction == ImageRotateOverlayRight; }
static ImageRotateOverlay* left(QObject* parent) { return new ImageRotateOverlay(ImageRotateOverlayLeft, parent); }
static ImageRotateOverlay* left(QObject* parent) { return new ImageRotateOverlay(ImageRotateOverlayLeft, parent); }
static ImageRotateOverlay* right(QObject* parent) { return new ImageRotateOverlay(ImageRotateOverlayRight, parent); }
Q_SIGNALS:
......
......@@ -8,7 +8,7 @@
*
* Copyright (C) 2002-2005 by Renchi Raju <renchi dot raju at gmail dot com>
* Copyright (C) 2010-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
* Copyright (C) 2002-2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2002-2014 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2009-2011 by Andi Clemens <andi dot clemens at gmail dot com>
*
* This program is free software; you can redistribute it
......@@ -27,11 +27,10 @@
#include "imagethumbnaildelegate.moc"
#include "imagedelegatepriv.h"
// Qt includes
// KDE includes
#include <kdebug.h>
#include <kiconloader.h>
// Local includes
......@@ -119,9 +118,11 @@ void ImageThumbnailDelegate::updateRects()
{
Q_D(ImageThumbnailDelegate);
d->coordinatesRect = QRect(d->contentWidth - KIconLoader::SizeSmall+2, d->pixmapRect.top(), KIconLoader::SizeSmall, KIconLoader::SizeSmall);
d->pixmapRect = QRect(d->margin, d->margin, d->contentWidth, d->contentWidth);
d->rect = QRect(0, 0, d->contentWidth + 2*d->margin, d->contentWidth + 2*d->margin);
d->drawImageFormat = AlbumSettings::instance()->getIconShowImageFormat();
d->drawCoordinates = AlbumSettings::instance()->getIconShowCoordinates();
if (AlbumSettings::instance()->getIconShowRating())
{
......
......@@ -7,7 +7,7 @@
* Description : thumbnail bar for images - the delegate
*
* Copyright (C) 2010-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
* Copyright (C) 2010-2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2010-2014 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
......
......@@ -7,7 +7,7 @@
* Description : thumbnail bar for images - the delegate
*
* Copyright (C) 2006-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
* Copyright (C) 2010-2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2010-2014 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
......
......@@ -7,7 +7,7 @@
* Description : albums settings interface
*
* Copyright (C) 2003-2004 by Renchi Raju <renchi dot raju at gmail dot com>
* Copyright (C) 2003-2013 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2003-2014 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2007 by Arnd Baecker <arnd dot baecker at web dot de>
* Copyright (C) 2014 by Mohamed Anwer <mohammed dot ahmed dot anwer at gmail dot com>
*
......@@ -84,6 +84,7 @@ public:
iconShowOverlays(false),
iconShowRating(false),
iconShowImageFormat(false),
iconShowCoordinates(false),
iconShowAspectRatio(false),
showToolTips(false),
tooltipShowFileName(false),
......@@ -171,6 +172,7 @@ public:
static const QString configIconShowOverlaysEntry;
static const QString configIconShowRatingEntry;
static const QString configIconShowImageFormatEntry;
static const QString configIconShowCoordinatesEntry;
static const QString configIconShowAspectRatioEntry;
static const QString configIconViewFontEntry;
static const QString configToolTipsFontEntry;
......@@ -242,6 +244,7 @@ public:
bool iconShowOverlays;
bool iconShowRating;
bool iconShowImageFormat;
bool iconShowCoordinates;
bool iconShowAspectRatio;
QFont iconviewFont;
......@@ -369,6 +372,7 @@ const QString AlbumSettings::Private::configIconShowCommentsEntry("Icon Show Com
const QString AlbumSettings::Private::configIconShowTagsEntry("Icon Show Tags");
const QString AlbumSettings::Private::configIconShowRatingEntry("Icon Show Rating");
const QString AlbumSettings::Private::configIconShowImageFormatEntry("Icon Show Image Format");
const QString AlbumSettings::Private::configIconShowCoordinatesEntry("Icon Show Coordinates");
const QString AlbumSettings::Private::configIconShowAspectRatioEntry("Icon Show Aspect Ratio");
const QString AlbumSettings::Private::configIconShowOverlaysEntry("Icon Show Overlays");
const QString AlbumSettings::Private::configIconViewFontEntry("IconView Font");
......@@ -497,6 +501,7 @@ void AlbumSettings::init()
d->iconShowOverlays = true;
d->iconShowRating = true;
d->iconShowImageFormat = false;
d->iconShowCoordinates = false;
d->iconviewFont = KGlobalSettings::generalFont();
d->toolTipsFont = KGlobalSettings::generalFont();
d->showToolTips = false;
......@@ -549,7 +554,7 @@ void AlbumSettings::init()
d->faceDetectionAccuracy = 0.8;
d->stringComparisonType = AlbumSettings::Natural;
d->applicationStyle = kapp->style()->objectName();
d->applicationStyle = kapp->style()->objectName();
connect(this, SIGNAL(nepomukSettingsChanged()),
this, SLOT(applyNepomukSettings()));
......@@ -613,6 +618,7 @@ void AlbumSettings::readSettings()
d->iconShowOverlays = group.readEntry(d->configIconShowOverlaysEntry, true);
d->iconShowRating = group.readEntry(d->configIconShowRatingEntry, true);
d->iconShowImageFormat = group.readEntry(d->configIconShowImageFormatEntry, false);
d->iconShowCoordinates = group.readEntry(d->configIconShowCoordinatesEntry, false);
d->iconviewFont = group.readEntry(d->configIconViewFontEntry, KGlobalSettings::generalFont());
d->toolTipsFont = group.readEntry(d->configToolTipsFontEntry, KGlobalSettings::generalFont());
......@@ -731,6 +737,7 @@ void AlbumSettings::saveSettings()
group.writeEntry(d->configIconShowOverlaysEntry, d->iconShowOverlays);
group.writeEntry(d->configIconShowRatingEntry, d->iconShowRating);
group.writeEntry(d->configIconShowImageFormatEntry, d->iconShowImageFormat);
group.writeEntry(d->configIconShowCoordinatesEntry, d->iconShowCoordinates);
group.writeEntry(d->configIconViewFontEntry, d->iconviewFont);
group.writeEntry(d->configToolTipsFontEntry, d->toolTipsFont);
......@@ -992,18 +999,22 @@ QString AlbumSettings::getAllFileFilter() const
QStringList imageFilter, audioFilter, videoFilter;
DatabaseAccess().db()->getFilterSettings(&imageFilter, &audioFilter, &videoFilter);
QStringList wildcards;
foreach(const QString& suffix, imageFilter)
{
wildcards << "*." + suffix;
}
foreach(const QString& suffix, audioFilter)
{
wildcards << "*." + suffix;
}
foreach(const QString& suffix, videoFilter)
{
wildcards << "*." + suffix;
}
return wildcards.join(" ");
}
......@@ -1172,6 +1183,16 @@ bool AlbumSettings::getIconShowImageFormat() const
return d->iconShowImageFormat;
}
void AlbumSettings::setIconShowCoordinates(bool val)
{
d->iconShowCoordinates = val;
}
bool AlbumSettings::getIconShowCoordinates() const
{
return d->iconShowCoordinates;
}
void AlbumSettings::setIconShowOverlays(bool val)
{
d->iconShowOverlays = val;
......
......@@ -7,7 +7,7 @@
* Description : albums settings interface
*
* Copyright (C) 2003-2004 by Renchi Raju <renchi dot raju at gmail dot com>
* Copyright (C) 2003-2013 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2003-2014 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2007 by Arnd Baecker <arnd dot baecker at web dot de>
* Copyright (C) 2014 by Mohamed Anwer <mohammed dot ahmed dot anwer at gmail dot com>
*
......@@ -195,6 +195,9 @@ public:
void setIconShowImageFormat(bool val);
bool getIconShowImageFormat() const;
void setIconShowCoordinates(bool val);
bool getIconShowCoordinates() const;
/**
* Sets the visibility of the overlay buttons on the image icons.
*/
......
......@@ -1133,6 +1133,11 @@ PhotoInfoContainer DMetadata::getPhotographInformation() const
{
photoInfo.whiteBalance = getXmpTagString("Xmp.exif.WhiteBalance");
}
// -----------------------------------------------------------------------------------
double l, L, a;
photoInfo.hasCoordinates = getGPSInfo(a, l, L);
}
return photoInfo;
......
......@@ -6,7 +6,7 @@
* Date : 2006-04-21
* Description : main photograph information container
*
* Copyright (C) 2006-2012 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2006-2014 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
......@@ -32,6 +32,7 @@ namespace Digikam
PhotoInfoContainer::PhotoInfoContainer()
{
hasCoordinates = false;
}
PhotoInfoContainer::~PhotoInfoContainer()
......@@ -53,8 +54,9 @@ bool PhotoInfoContainer::operator==(const PhotoInfoContainer& t) const
bool b11 = flash == t.flash;
bool b12 = whiteBalance == t.whiteBalance;
bool b13 = dateTime == t.dateTime;
bool b14 = hasCoordinates == t.hasCoordinates;
return b1 && b2 && b3 && b4 && b5 && b6 && b7 && b8 && b9 && b10 && b11 && b12 && b13;
return (b1 && b2 && b3 && b4 && b5 && b6 && b7 && b8 && b9 && b10 && b11 && b12 && b13 && b14);
}
bool PhotoInfoContainer::isEmpty() const
......@@ -71,7 +73,8 @@ bool PhotoInfoContainer::isEmpty() const
sensitivity.isEmpty() &&
flash.isEmpty() &&
whiteBalance.isEmpty() &&
!dateTime.isValid() )
!dateTime.isValid() &&
!hasCoordinates)
{
return true;
}
......@@ -113,6 +116,7 @@ QDataStream& operator<<(QDataStream& ds, const PhotoInfoContainer& info)
ds << info.flash;
ds << info.whiteBalance;
ds << info.dateTime;
ds << info.hasCoordinates;
return ds;
}
......@@ -132,6 +136,7 @@ QDataStream& operator>>(QDataStream& ds, PhotoInfoContainer& info)
ds >> info.flash;
ds >> info.whiteBalance;
ds >> info.dateTime;
ds >> info.hasCoordinates;
return ds;
}
......
......@@ -6,7 +6,7 @@
* Date : 2006-04-21
* Description : main photograph information container
*
* Copyright (C) 2006-2012 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2006-2014 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
......@@ -65,6 +65,8 @@ public:
QString whiteBalance;
QDateTime dateTime;
bool hasCoordinates; // GPS info are present
};
DIGIKAM_EXPORT QDataStream& operator<<(QDataStream& ds, const PhotoInfoContainer& info);
......
......@@ -526,6 +526,18 @@ void ItemViewImageDelegate::drawPanelSideIcon(QPainter* p, bool left, bool right
}
}
void ItemViewImageDelegate::drawGeolocationIndicator(QPainter* p, const QRect& r) const
{
if (!r.isNull())
{
QIcon icon = KIconLoader::global()->loadIcon("applications-internet", KIconLoader::NoGroup, KIconLoader::SizeSmall);
qreal op = p->opacity();
p->setOpacity(0.5);
icon.paint(p, r);
p->setOpacity(op);
}
}
void ItemViewImageDelegate::drawGroupIndicator(QPainter* p, const QRect& r,
int numberOfGroupedImages, bool open) const
{
......
......@@ -7,7 +7,7 @@
* Description : Qt item view for images - the delegate
*
* Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
* Copyright (C) 2011-2013 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2011-2014 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
......@@ -118,6 +118,7 @@ protected:
void drawColorLabelRect(QPainter* p, const QStyleOptionViewItem& option, bool isSelected, int colorId) const;
void drawPickLabelIcon(QPainter* p, const QRect& r, int pickLabel) const;
void drawGroupIndicator(QPainter* p, const QRect& r, int numberOfGroupedImages, bool open) const;
void drawGeolocationIndicator(QPainter* p, const QRect& r) const;
void drawPanelSideIcon(QPainter* p, bool left, bool right) const;
void drawFocusRect(QPainter* p, const QStyleOptionViewItem& option, bool isSelected) const;
void drawMouseOverRect(QPainter* p, const QStyleOptionViewItem& option) const;
......
......@@ -7,6 +7,7 @@
* Description : Settings for Showfoto
*
* Copyright (C) 2013-2014 by Mohamed Anwer <mohammed dot ahmed dot anwer at gmail dot com>
* Copyright (C) 2013-2014 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
......@@ -51,7 +52,8 @@ public:
Private() :
deleteItem2Trash(true),
drawFormatOverThumbnail(false),
showFormatOverThumbnail(false),
showCoordinates(false),
showSplash(true),
reverseSort(false),
showToolTip(true),
......@@ -79,7 +81,8 @@ public:
static const QString configCurrentTheme;
static const QString configRightSideBarStyle;
static const QString configApplicationStyle;
static const QString configDrawFormatOverThumbnail;
static const QString configShowFormatOverThumbnail;
static const QString configShowCoordinates;
static const QString configShowSplash;
static const QString configSortOrder;
static const QString configReverseSort;
......@@ -103,7 +106,8 @@ public:
static const QString configToolTipsFont;
bool deleteItem2Trash;
bool drawFormatOverThumbnail;
bool showFormatOverThumbnail;
bool showCoordinates;
bool showSplash;
bool reverseSort;
......@@ -145,7 +149,8 @@ const QString ShowfotoSettings::Private::configDeleteItem2Trash("DeleteItem2Tras
const QString ShowfotoSettings::Private::configCurrentTheme("Theme");
const QString ShowfotoSettings::Private::configRightSideBarStyle("Sidebar Title Style");
const QString ShowfotoSettings::Private::configApplicationStyle("Application Style");
const QString ShowfotoSettings::Private::configDrawFormatOverThumbnail("ShowMimeOverImage");
const QString ShowfotoSettings::Private::configShowFormatOverThumbnail("ShowMimeOverImage");
const QString ShowfotoSettings::Private::configShowCoordinates("Show Coordinates");
const QString ShowfotoSettings::Private::configShowSplash("ShowSplash");
const QString ShowfotoSettings::Private::configSortOrder("SortOrder");
const QString ShowfotoSettings::Private::configReverseSort("ReverseSort");
......@@ -212,7 +217,8 @@ void ShowfotoSettings::init()
d->showSplash = true;
d->reverseSort = false;
d->drawFormatOverThumbnail = false;
d->showFormatOverThumbnail = false;
d->showCoordinates = false;
d->showToolTip = true;
......@@ -229,7 +235,6 @@ void ShowfotoSettings::init()
d->showPhotoWB = false;
d->showPhotoDate = true;
d->showPhotoMode = true;
}
void ShowfotoSettings::readSettings()
......@@ -244,23 +249,24 @@ void ShowfotoSettings::readSettings()
d->showSplash = group.readEntry(d->configShowSplash, true);
d->sortOrder = group.readEntry(d->configSortOrder, 0);
d->reverseSort = group.readEntry(d->configReverseSort, false);
d->drawFormatOverThumbnail = group.readEntry(d->configDrawFormatOverThumbnail, false);
d->showFormatOverThumbnail = group.readEntry(d->configShowFormatOverThumbnail, false);
d->showCoordinates = group.readEntry(d->configShowCoordinates, false);
d->showToolTip = group.readEntry(d->configShowToolTip, true);
d->showFileName = group.readEntry(d->configShowFileName,true);
d->showFileDate = group.readEntry(d->configShowFileDate,false);
d->showFileSize = group.readEntry(d->configShowFileSize,false);
d->showFileType = group.readEntry(d->configShowFileType,false);
d->showFileDim = group.readEntry(d->configShowFileDim, true);
d->showFileName = group.readEntry(d->configShowFileName, true);
d->showFileDate = group.readEntry(d->configShowFileDate, false);
d->showFileSize = group.readEntry(d->configShowFileSize, false);
d->showFileType = group.readEntry(d->configShowFileType, false);
d->showFileDim = group.readEntry(d->configShowFileDim, true);
d->showPhotoMake = group.readEntry(d->configShowPhotoMake,true);
d->showPhotoFocal = group.readEntry(d->configShowPhotoFocal,true);
d->showPhotoExpo = group.readEntry(d->configShowPhotoExpo,true);
d->showPhotoFlash = group.readEntry(d->configShowPhotoFlash,false);
d->showPhotoWB = group.readEntry(d->configShowPhotoWB,false);
d->showPhotoDate = group.readEntry(d->configShowPhotoDate,true);
d->showPhotoMode = group.readEntry(d->configShowPhotoMode,true);
d->showPhotoMake = group.readEntry(d->configShowPhotoMake, true);
d->showPhotoFocal = group.readEntry(d->configShowPhotoFocal, true);
d->showPhotoExpo = group.readEntry(d->configShowPhotoExpo, true);
d->showPhotoFlash = group.readEntry(d->configShowPhotoFlash, false);
d->showPhotoWB = group.readEntry(d->configShowPhotoWB, false);
d->showPhotoDate = group.readEntry(d->configShowPhotoDate, true);
d->showPhotoMode = group.readEntry(d->configShowPhotoMode, true);
d->toolTipsFont = group.readEntry(d->configToolTipsFont,KGlobalSettings::generalFont());
}
......@@ -287,7 +293,12 @@ int ShowfotoSettings::getRightSideBarStyle() const
bool ShowfotoSettings::getShowFormatOverThumbnail() const
{
return d->drawFormatOverThumbnail;
return d->showFormatOverThumbnail;
}
bool ShowfotoSettings::getShowCoordinates() const
{
return d->showCoordinates;
}
QString ShowfotoSettings::getApplicationStyle() const
......@@ -477,7 +488,12 @@ void ShowfotoSettings::setApplicationStyle(const QString& style)