2013-05-17 08:14:10 -03:00
|
|
|
#ifndef GLOBE_H
|
|
|
|
#define GLOBE_H
|
|
|
|
|
|
|
|
#include <marble/MarbleWidget.h>
|
2013-05-17 16:12:55 -03:00
|
|
|
#include <marble/GeoDataCoordinates.h>
|
2013-05-30 09:52:31 +09:00
|
|
|
#include <marble/GeoDataDocument.h>
|
2013-05-17 16:12:55 -03:00
|
|
|
|
2013-05-17 14:09:10 -03:00
|
|
|
#include <QHash>
|
2013-05-17 08:14:10 -03:00
|
|
|
|
2013-05-17 21:58:49 -03:00
|
|
|
class KMessageWidget;
|
2013-05-17 16:12:55 -03:00
|
|
|
using namespace Marble;
|
|
|
|
struct dive;
|
|
|
|
|
|
|
|
class GlobeGPS : public MarbleWidget{
|
2013-05-17 08:14:10 -03:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2013-05-17 16:12:55 -03:00
|
|
|
using MarbleWidget::centerOn;
|
2013-05-17 08:14:10 -03:00
|
|
|
GlobeGPS(QWidget *parent);
|
2013-05-17 13:28:02 -03:00
|
|
|
void reload();
|
2013-11-19 04:23:59 -08:00
|
|
|
void repopulateLabels();
|
2013-05-17 13:28:02 -03:00
|
|
|
void centerOn(struct dive* dive);
|
2013-11-22 00:22:57 -02:00
|
|
|
bool eventFilter(QObject*, QEvent*);
|
2013-05-17 16:12:55 -03:00
|
|
|
protected:
|
2013-10-17 14:53:12 -07:00
|
|
|
/* reimp */ void resizeEvent(QResizeEvent *event);
|
|
|
|
/* reimp */ void mousePressEvent(QMouseEvent* event);
|
2013-12-02 15:06:19 -02:00
|
|
|
/* reimp */ void contextMenuEvent(QContextMenuEvent*);
|
2013-05-17 13:28:02 -03:00
|
|
|
private:
|
2013-05-17 16:12:55 -03:00
|
|
|
GeoDataDocument *loadedDives;
|
2013-05-17 21:58:49 -03:00
|
|
|
KMessageWidget* messageWidget;
|
2013-10-17 14:53:12 -07:00
|
|
|
QTimer *fixZoomTimer;
|
|
|
|
int currentZoomLevel;
|
2013-12-02 15:06:19 -02:00
|
|
|
bool editingDiveLocation;
|
2013-05-17 16:12:55 -03:00
|
|
|
|
2013-06-19 10:20:16 -07:00
|
|
|
public slots:
|
2013-05-17 16:12:55 -03:00
|
|
|
void changeDiveGeoPosition(qreal lon,qreal lat,GeoDataCoordinates::Unit);
|
2013-06-05 14:44:12 +09:00
|
|
|
void mouseClicked(qreal lon, qreal lat, GeoDataCoordinates::Unit);
|
2013-10-17 14:53:12 -07:00
|
|
|
void fixZoom();
|
2013-12-02 15:06:19 -02:00
|
|
|
void prepareForGetDiveCoordinates();
|
|
|
|
|
2013-05-17 08:14:10 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|