2017-07-14 21:54:13 +00:00
|
|
|
#ifndef MAPWIDGET_H
|
|
|
|
#define MAPWIDGET_H
|
|
|
|
|
|
|
|
#include <QQuickWidget>
|
|
|
|
|
2017-07-15 21:19:18 +00:00
|
|
|
#undef IGNORE
|
|
|
|
|
2017-07-14 21:54:13 +00:00
|
|
|
class QResizeEvent;
|
|
|
|
class QQuickItem;
|
2017-07-14 22:26:13 +00:00
|
|
|
struct dive_site;
|
2017-07-14 21:54:13 +00:00
|
|
|
|
|
|
|
class MapWidget : public QQuickWidget {
|
|
|
|
|
2017-07-14 22:26:13 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
2017-07-14 21:54:13 +00:00
|
|
|
public:
|
|
|
|
MapWidget(QWidget *parent = NULL);
|
|
|
|
~MapWidget();
|
|
|
|
|
|
|
|
static MapWidget *instance();
|
2017-07-15 19:58:16 +00:00
|
|
|
void reload();
|
2017-07-14 21:54:13 +00:00
|
|
|
|
2017-07-15 20:51:10 +00:00
|
|
|
signals:
|
|
|
|
void coordinatesChanged();
|
|
|
|
|
2017-07-14 22:26:13 +00:00
|
|
|
public slots:
|
|
|
|
void centerOnDiveSite(struct dive_site *);
|
2017-07-15 20:34:44 +00:00
|
|
|
void centerOnIndex(const QModelIndex& idx);
|
2017-07-15 20:13:54 +00:00
|
|
|
void endGetDiveCoordinates();
|
2017-07-15 20:41:31 +00:00
|
|
|
void repopulateLabels();
|
2017-07-15 20:51:51 +00:00
|
|
|
void prepareForGetDiveCoordinates();
|
2017-07-14 22:26:13 +00:00
|
|
|
|
2017-07-14 21:54:13 +00:00
|
|
|
private:
|
|
|
|
static MapWidget *m_instance;
|
|
|
|
QQuickItem *m_rootItem;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MAPWIDGET_H
|