From kde-commits Sun May 31 21:31:40 2015 From: Tobias Leupold Date: Sun, 31 May 2015 21:31:40 +0000 To: kde-commits Subject: [kphotoalbum/gpssearch] /: Further cleanup. Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=143310791001606 Git commit 6e2ce26df41c2d82a2aeb129a443ae7be3d75911 by Tobias Leupold. Committed on 31/05/2015 at 21:31. Pushed by tleupold into branch 'gpssearch'. Further cleanup. M +1 -1 AnnotationDialog/Dialog.cpp M +1 -1 DB/ImageInfo.cpp M +1 -1 DB/ImageInfo.h M +4 -4 DB/ImageSearchInfo.cpp M +2 -2 DB/ImageSearchInfo.h M +16 -14 Map/MapView.cpp M +3 -3 Map/MapView.h http://commits.kde.org/kphotoalbum/6e2ce26df41c2d82a2aeb129a443ae7be3d75911 diff --git a/AnnotationDialog/Dialog.cpp b/AnnotationDialog/Dialog.cpp index efd659c..f70e964 100644 --- a/AnnotationDialog/Dialog.cpp +++ b/AnnotationDialog/Dialog.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2010 Jesper K. Pedersen +/* Copyright (C) 2003-2015 Jesper K. Pedersen = This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public diff --git a/DB/ImageInfo.cpp b/DB/ImageInfo.cpp index a7ef696..db7a6de 100644 --- a/DB/ImageInfo.cpp +++ b/DB/ImageInfo.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2010 Jesper K. Pedersen +/* Copyright (C) 2003-2015 Jesper K. Pedersen = This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public diff --git a/DB/ImageInfo.h b/DB/ImageInfo.h index 39ffe6d..72c60f0 100644 --- a/DB/ImageInfo.h +++ b/DB/ImageInfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2010 Jesper K. Pedersen +/* Copyright (C) 2003-2015 Jesper K. Pedersen = This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public diff --git a/DB/ImageSearchInfo.cpp b/DB/ImageSearchInfo.cpp index f213706..ab9d59e 100644 --- a/DB/ImageSearchInfo.cpp +++ b/DB/ImageSearchInfo.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2010 Jesper K. Pedersen +/* Copyright (C) 2003-2015 Jesper K. Pedersen = This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public @@ -171,7 +171,7 @@ bool ImageSearchInfo::match( ImageInfoPtr info ) const = = #ifdef HAVE_KGEOMAP -// Search for GPS Position + // Search for GPS Position if (ok && m_usingRegionSelection) { ok =3D ok && info->coordinates().hasCoordinates(); if (ok) { @@ -179,9 +179,9 @@ bool ImageSearchInfo::match( ImageInfoPtr info ) const float infoLon =3D info->coordinates().lon(); ok =3D ok && m_regionSelectionMinLat <=3D infoLat - && infoLat <=3D m_regionSelectionMaxLat + && infoLat <=3D m_regionSelectionMaxLat && m_regionSelectionMinLon <=3D infoLon - && infoLon <=3D m_regionSelectionMaxLon; + && infoLon <=3D m_regionSelectionMaxLon; } } #endif diff --git a/DB/ImageSearchInfo.h b/DB/ImageSearchInfo.h index e735e03..935a7d6 100644 --- a/DB/ImageSearchInfo.h +++ b/DB/ImageSearchInfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2010 Jesper K. Pedersen +/* Copyright (C) 2003-2015 Jesper K. Pedersen = This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public @@ -65,7 +65,7 @@ public: void addAnd( const QString& category, const QString& value ); void setRating( short rating); QString toString() const; - = + void setMegaPixel( short megapixel ); void setSearchRAW( bool m_searchRAW ); void setSearchMode( int index ); diff --git a/Map/MapView.cpp b/Map/MapView.cpp index edf1c3b..0b605d2 100644 --- a/Map/MapView.cpp +++ b/Map/MapView.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 Tobias Leupold +/* Copyright (C) 2014-2015 Tobias Leupold = This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public @@ -69,11 +69,11 @@ Map::MapView::MapView(QWidget* parent, UsageType type) = : QWidget(parent) m_mapWidget->addWidgetToControlWidget(m_setLastCenterButton); connect(m_setLastCenterButton, SIGNAL(clicked()), this, SLOT(setLastCe= nter())); = - m_DeleteSearchRegionButton =3D new QPushButton; - m_DeleteSearchRegionButton->setIcon(QPixmap(SmallIcon(QString::fromUtf= 8("edit-delete")))); - m_DeleteSearchRegionButton->setToolTip(i18n("Remove Search Region")); - m_mapWidget->addWidgetToControlWidget(m_DeleteSearchRegionButton); - connect(m_DeleteSearchRegionButton, SIGNAL(clicked()), this, SLOT(dele= teSearchRegion())); + m_deleteSearchRegionButton =3D new QPushButton; + m_deleteSearchRegionButton->setIcon(QPixmap(SmallIcon(QString::fromUtf= 8("edit-delete")))); + m_deleteSearchRegionButton->setToolTip(i18n("Remove Search Region")); + m_mapWidget->addWidgetToControlWidget(m_deleteSearchRegionButton); + connect(m_deleteSearchRegionButton, SIGNAL(clicked()), this, SLOT(dele= teSearchRegion())); = // We first try set the default backend "marble" or the first one avai= lable ... const QString defaultBackend =3D QString::fromUtf8("marble"); @@ -154,7 +154,7 @@ void Map::MapView::displayStatus(MapStatus status) m_statusLabel->setText(i18n("Loading coordinates from the image= s ...")); m_statusLabel->show(); m_mapWidget->hide(); - m_DeleteSearchRegionButton->hide(); + m_deleteSearchRegionButton->hide(); m_mapWidget->clearRegionSelection(); m_setLastCenterButton->setEnabled(false); } else if (status =3D=3D MapStatus::ImageHasCoordinates) { @@ -162,7 +162,7 @@ void Map::MapView::displayStatus(MapStatus status) m_mapWidget->setAvailableMouseModes(KGeoMap::MouseModePan); m_mapWidget->setVisibleMouseModes(KGeoMap::MouseModePan); m_mapWidget->setMouseMode(KGeoMap::MouseModePan); - m_DeleteSearchRegionButton->hide(); + m_deleteSearchRegionButton->hide(); m_mapWidget->clearRegionSelection(); m_mapWidget->show(); m_setLastCenterButton->setEnabled(true); @@ -178,7 +178,7 @@ void Map::MapView::displayStatus(MapStatus status) m_mapWidget->setAvailableMouseModes(KGeoMap::MouseModePan); m_mapWidget->setVisibleMouseModes(KGeoMap::MouseModePan); m_mapWidget->setMouseMode(KGeoMap::MouseModePan); - m_DeleteSearchRegionButton->hide(); + m_deleteSearchRegionButton->hide(); m_mapWidget->clearRegionSelection(); m_mapWidget->show(); m_setLastCenterButton->setEnabled(true); @@ -186,10 +186,12 @@ void Map::MapView::displayStatus(MapStatus status) m_statusLabel->setText(i18n("Search geographic " "coordinates.")); m_statusLabel->show(); - m_mapWidget->setAvailableMouseModes(KGeoMap::MouseModePan|KGeoMap:= :MouseModeRegionSelection); - m_mapWidget->setVisibleMouseModes(KGeoMap::MouseModePan|KGeoMap::M= ouseModeRegionSelection); + m_mapWidget->setAvailableMouseModes(KGeoMap::MouseModePan + | KGeoMap::MouseModeRegionSele= ction); + m_mapWidget->setVisibleMouseModes(KGeoMap::MouseModePan + | KGeoMap::MouseModeRegionSelect= ion); m_mapWidget->setMouseMode(KGeoMap::MouseModePan); - m_DeleteSearchRegionButton->show(); + m_deleteSearchRegionButton->show(); m_mapWidget->show(); m_setLastCenterButton->setEnabled(true); } else if (status =3D=3D MapStatus::NoImagesHaveNoCoordinates) { @@ -197,7 +199,7 @@ void Map::MapView::displayStatus(MapStatus status) "coordinates.")); m_statusLabel->show(); m_mapWidget->hide(); - m_DeleteSearchRegionButton->hide(); + m_deleteSearchRegionButton->hide(); m_setLastCenterButton->setEnabled(false); } } @@ -212,7 +214,7 @@ void Map::MapView::deleteSearchRegion() m_mapWidget->clearRegionSelection(); } = -KGeoMap::KGeoMapWidget* Map::MapView::mapWidget() +KGeoMap::KGeoMapWidget* Map::MapView::mapWidget() const { return m_mapWidget; } diff --git a/Map/MapView.h b/Map/MapView.h index a762a7d..44cecd6 100644 --- a/Map/MapView.h +++ b/Map/MapView.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 Tobias Leupold +/* Copyright (C) 2014-2015 Tobias Leupold = This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public @@ -99,7 +99,7 @@ public: */ void displayStatus(MapStatus status); = - KGeoMap::KGeoMapWidget* mapWidget(); + KGeoMap::KGeoMapWidget* mapWidget() const; = public slots: /** @@ -119,7 +119,7 @@ private: // Variables MapMarkerModelHelper* m_modelHelper; QLabel* m_statusLabel; QPushButton* m_setLastCenterButton; - QPushButton* m_DeleteSearchRegionButton; + QPushButton* m_deleteSearchRegionButton; KGeoMap::GeoCoordinates m_lastCenter; }; =20