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