I thought we had this automated, but Lubomirs commits introduced a few
files with dos line endings. This is purely a change of line endings, no
other changes.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The local slot coordinatesChangedLocal() tracks the MapWidgetHelper
coordinatesChanged() signal and emit a coordinatesChanged() signal
to any listeners (e.g. MainWindow).
Also add a small change in centerOnDiveSite(), to not be called if
we are skipping the reload (skipReload is updated by
selectedDivesChanged()).
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This guard is to prevent a meaningless reload on the map marker list,
when the user selects a new dive and nearby dives. The flag is updated
in selectedDivesChanged() which on it's now cannot possibly trigger
changes in the markers, only the selection. The selection of active flags
is already handled by the model and automatically updated in the QML.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
The selectedDivesChanged() signal from MapWidgetHelper is connected
to a local slot. One problem here is that this crashes with the calls to
DiveListView().
The dive list widget triggers events that call reload() on the MapWidget
(same happens for Marble's Globe class) and that crashes somewhere in
the QML shared library. TODO: investigate.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Apparently, if it's required to import a QML component inside any QML
file from resource, the compoment QRC alias has to have the same name
as the component - e.g. add QRC alias MapWidgetContextMenu.qml allows
creating a MapWidgetContextMenu compoment inside MapWidget.qml.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
MapWidgetHelper::reloadMapLocations() is now called from MapWidget::reload()
and MapWidget::repopulateLabels().
The mobile version should do similar.
NOTE: These MapWidget methods names are from the Marble "port".
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Apparently the "safe way" is to register C++ types is before the QML
code has loaded. The idea here is that the QML code should know about
these type definitions and be able to operate with them.
TODO: do the same for the mobile version.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
MapWidget sould not handle any of the map backend.
Instead it should just pass calls to MapWidgetHelper.
Do that for centerOnDiveSite().
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Use findChild() to obtain the only MapWidgetHelper object created
in the MapWidget.qml. Store the reference as a member variable -
m_mapHelper.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This is WIP and would be developed futher, so that the new
map widget can center on a divesite location.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
The files are WIP and located in desktop-widgets, as these
would only be used by the desktop version.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>