mapwidgethelper: emit a selectedDivesChanged() signal
The signal emits a QList<int> filled with dive idexes from the main backend dive table. The MapWidgetHelper QML instance handles that in onSelectedDivesChanged(). This will only be needed for the mobile version, as the desktop version should connect it's own slot in MapWidget.cpp. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
e79eac3335
commit
c078e350e0
@ -13,6 +13,10 @@ Item {
|
||||
MapWidgetHelper {
|
||||
id: mapHelper
|
||||
map: map
|
||||
onSelectedDivesChanged: {
|
||||
// 'list' contains a list of dive list indexes
|
||||
console.log("onSelectedDivesChanged: " + list.length);
|
||||
}
|
||||
}
|
||||
|
||||
Map {
|
||||
|
||||
@ -73,8 +73,7 @@ void MapWidgetHelper::selectedLocationChanged(MapLocation *location)
|
||||
if (locationCoord.distanceTo(dsCoord) < m_smallCircleRadius)
|
||||
m_selectedDiveIds.append(idx);
|
||||
}
|
||||
|
||||
qDebug() << "selectedDiveIds:" << m_selectedDiveIds;
|
||||
emit selectedDivesChanged(m_selectedDiveIds);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@ -34,6 +34,7 @@ private slots:
|
||||
|
||||
signals:
|
||||
void modelChanged();
|
||||
void selectedDivesChanged(QList<int> list);
|
||||
};
|
||||
|
||||
extern "C" const char *printGPSCoords(int lat, int lon);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user