subsurface/desktop-widgets/mapwidget.h
Berthold Stoeger b5d4d88fe5 Dive site: remove edit mode from dive location widget
Since no dive site field editing enters edit mode anymore,
the whole edit mode state and code can be removed from the
widget.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-04-12 18:19:07 +03:00

45 lines
985 B
C++

// SPDX-License-Identifier: GPL-2.0
#ifndef MAPWIDGET_H
#define MAPWIDGET_H
#include "core/units.h"
#include <QQuickWidget>
#include <QList>
#undef IGNORE
class QResizeEvent;
class QQuickItem;
class MapWidgetHelper;
struct dive_site;
class MapWidget : public QQuickWidget {
Q_OBJECT
public:
MapWidget(QWidget *parent = NULL);
~MapWidget();
static MapWidget *instance();
void reload();
public slots:
void centerOnSelectedDiveSite();
void centerOnDiveSite(struct dive_site *);
void centerOnIndex(const QModelIndex& idx);
void endGetDiveCoordinates();
void repopulateLabels();
void prepareForGetDiveCoordinates(struct dive_site *ds);
void selectedDivesChanged(QList<int>);
void coordinatesChanged(struct dive_site *ds, const location_t &);
void doneLoading(QQuickWidget::Status status);
void diveSiteChanged(struct dive_site *ds, int field);
private:
static MapWidget *m_instance;
QQuickItem *m_rootItem;
MapWidgetHelper *m_mapHelper;
};
#endif // MAPWIDGET_H