Fixes Setting the dive-location via the map.

This patch adds a context menu to set the dive location
via the globe, being the dive with a coordinate or not.

It also fixes setting the dive location on edit mode.

Fixes: #315

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2013-12-02 15:06:19 -02:00 committed by Dirk Hohndel
parent bbc022ba18
commit d26f109fba
3 changed files with 31 additions and 36 deletions

View file

@ -19,23 +19,24 @@ public:
void reload();
void repopulateLabels();
void centerOn(struct dive* dive);
void diveEditMode();
bool eventFilter(QObject*, QEvent*);
protected:
/* reimp */ void resizeEvent(QResizeEvent *event);
/* reimp */ void mousePressEvent(QMouseEvent* event);
/* reimp */ void contextMenuEvent(QContextMenuEvent*);
private:
void prepareForGetDiveCoordinates(struct dive* dive);
GeoDataDocument *loadedDives;
struct dive* editingDiveCoords;
KMessageWidget* messageWidget;
QTimer *fixZoomTimer;
int currentZoomLevel;
bool editingDiveLocation;
public slots:
void changeDiveGeoPosition(qreal lon,qreal lat,GeoDataCoordinates::Unit);
void mouseClicked(qreal lon, qreal lat, GeoDataCoordinates::Unit);
void fixZoom();
void prepareForGetDiveCoordinates();
};
#endif