summaryrefslogtreecommitdiffstats
path: root/map-widget/qmlmapwidgethelper.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-10-08 15:00:12 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-11 16:25:32 -0700
commit8091497745c385666e38a7911881189dbd0d73e0 (patch)
tree51f9bb916002da67075803d3b39a7d2a64ca4c45 /map-widget/qmlmapwidgethelper.h
parent754160d625d374cc2b98df53511371b0ab286c7a (diff)
downloadsubsurface-8091497745c385666e38a7911881189dbd0d73e0.tar.gz
Map: split void MapWidget::setEditMode()
The setEditMode(bool) function behaves very differently, when entering and exiting edit mode. Therefore, split it in two versions. This will allow to pass arguments that make sense only when entering the edit mode. Since setEditMode() doesn't exist anymore, turn the editMode Q_PROPERTY line to the MEMBER version. Accordingly, remove the reader function. If QML wants to enter edit mode, it should invoke the appropriate function and not simply set the flag. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'map-widget/qmlmapwidgethelper.h')
-rw-r--r--map-widget/qmlmapwidgethelper.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/map-widget/qmlmapwidgethelper.h b/map-widget/qmlmapwidgethelper.h
index 466e8944d..132e15310 100644
--- a/map-widget/qmlmapwidgethelper.h
+++ b/map-widget/qmlmapwidgethelper.h
@@ -21,7 +21,7 @@ class MapWidgetHelper : public QObject {
Q_OBJECT
Q_PROPERTY(QObject *map MEMBER m_map)
Q_PROPERTY(MapLocationModel *model MEMBER m_mapLocationModel NOTIFY modelChanged)
- Q_PROPERTY(bool editMode READ editMode WRITE setEditMode NOTIFY editModeChanged)
+ Q_PROPERTY(bool editMode MEMBER m_editMode NOTIFY editModeChanged)
Q_PROPERTY(QString pluginObject READ pluginObject NOTIFY pluginObjectChanged)
public:
@@ -37,8 +37,8 @@ public:
Q_INVOKABLE void updateCurrentDiveSiteCoordinatesFromMap(quint32 uuid, QGeoCoordinate coord);
Q_INVOKABLE void selectVisibleLocations();
void updateDiveSiteCoordinates(uint32_t uuid, degrees_t latitude, degrees_t longitude);
- bool editMode();
- void setEditMode(bool editMode);
+ void enterEditMode();
+ void exitEditMode();
QString pluginObject();
private: