Added the possibility to change the coordinates of a dive.

Added the possibility to change the coordinates of a dive.
it's too intrusive in the moment, but it was a proof
of concept. so I'll commit as is and try to find a better
way to warn the user what's going on in the future, using
something less terrible than a popup exploding in his face.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-05-17 16:12:55 -03:00
parent b89265c7f0
commit 56dbb7c2ff
2 changed files with 68 additions and 11 deletions

View file

@ -2,23 +2,33 @@
#define GLOBE_H
#include <marble/MarbleWidget.h>
#include <marble/GeoDataCoordinates.h>
#include <QHash>
namespace Marble{
class GeoDataDocument;
}
class GlobeGPS : public Marble::MarbleWidget{
using namespace Marble;
struct dive;
class GlobeGPS : public MarbleWidget{
Q_OBJECT
void prepareForGetDiveCoordinates(struct dive* dive);
public:
using Marble::MarbleWidget::centerOn;
using MarbleWidget::centerOn;
GlobeGPS(QWidget *parent);
void reload();
void centerOn(struct dive* dive);
protected:
virtual void mousePressEvent(QMouseEvent* event);
private:
Marble::GeoDataDocument *loadedDives;
GeoDataDocument *loadedDives;
QStringList diveLocations;
struct dive* editingDiveCoords;
public Q_SLOTS:
void changeDiveGeoPosition(qreal lon,qreal lat,GeoDataCoordinates::Unit);
};
#endif