mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
a920d683a1
When MapLocationModel updates the selected marker, MapWidgetHelper now receives a signal. The slot is named selectedLocationChanged(). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
34 lines
689 B
C++
34 lines
689 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
#ifndef QMLMAPWIDGETHELPER_H
|
|
#define QMLMAPWIDGETHELPER_H
|
|
|
|
#include <QObject>
|
|
|
|
class MapLocationModel;
|
|
class MapLocation;
|
|
struct dive_site;
|
|
|
|
class MapWidgetHelper : public QObject {
|
|
|
|
Q_OBJECT
|
|
Q_PROPERTY(QObject *map MEMBER m_map)
|
|
Q_PROPERTY(MapLocationModel *model MEMBER m_mapLocationModel NOTIFY modelChanged)
|
|
|
|
public:
|
|
explicit MapWidgetHelper(QObject *parent = NULL);
|
|
|
|
void centerOnDiveSite(struct dive_site *);
|
|
void reloadMapLocations();
|
|
|
|
private:
|
|
QObject *m_map;
|
|
MapLocationModel *m_mapLocationModel;
|
|
|
|
private slots:
|
|
void selectedLocationChanged(MapLocation *);
|
|
|
|
signals:
|
|
void modelChanged();
|
|
};
|
|
|
|
#endif
|