Commit graph

17 commits

Author SHA1 Message Date
Dirk Hohndel
7c92c7dc0a Map: try to wait for Map to load
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-28 22:06:34 -07:00
Dirk Hohndel
c59cdd6efd Switch new files to unix line endings
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>
2017-07-28 22:01:36 -07:00
Lubomir I. Ivanov
69f8fc3c5b map: whitespace cleanup in QML and C++ files
- remove ";"s
- remove {} where not needed or move them to the same line

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28 07:31:11 -07:00
Lubomir I. Ivanov
4a004f37ea mapwidget: add a method to set update editMode in MapWidgetHelper
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>
2017-07-28 07:31:11 -07:00
Lubomir I. Ivanov
64697375cf mapwidget: connect the helper selectedDivesChanged() signal
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>
2017-07-28 07:31:11 -07:00
Lubomir I. Ivanov
2cb8fee827 add the SPDX-License-Identifier to new source files
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28 07:31:11 -07:00
Lubomir I. Ivanov
99c2bf6290 mapwidget.cpp: obtain a reference of the MapWidgetHelper from QML
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>
2017-07-28 07:31:11 -07:00
Lubomir I. Ivanov
ab7d6a73d4 mapwidget.h: force-undefine the IGNORE macro from winbase.h
By including <QQuickWidget>, <winbase.h> is included from <windows.h>.
<winabase.h> has the IGNORE macro defined.

Undefine it localy in mapwidget.h to prevent a conflict with maintah.h's
EditMode::IGNORE enum.

NOTE: possibly similar case to the undefine in
btdeviceselectiondialog.h:22.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28 07:31:11 -07:00
Lubomir I. Ivanov
c2e172a874 mapwidget.h: remove redundant "core/divesite.h" include
The header should be included only in the .cpp file

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28 07:31:11 -07:00
Lubomir I. Ivanov
df519be01e mapwidget: add the placeholder prepareForGetDiveCoordinates() slot
Port from GlobeGPS.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28 07:31:11 -07:00
Lubomir I. Ivanov
97a3051089 mapwidget: add the coordinatesChanged() signal
Port from GlobeGPS.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28 07:31:11 -07:00
Lubomir I. Ivanov
8f52b129af mapwidget: add the placeholder repopulateLabels() method
Another placeholder for the Marble port.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28 07:31:11 -07:00
Lubomir I. Ivanov
4334d33413 mapwidget: add the method centerOnIndex()
Again for the port from Marble, later can be removed / renamed.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28 07:31:11 -07:00
Lubomir I. Ivanov
0d3d9c01eb mapwidget: add public slot endGetDiveCoordinates()
Later this has to be replaced / renamed if needed.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28 07:31:11 -07:00
Lubomir I. Ivanov
39af5bb05b mapwidget: add an empty reload() method
Call same method in MainWindow if the NO_MARBLE macro is defined.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28 07:31:11 -07:00
Lubomir I. Ivanov
a1fbffc96c mapwidget: add placeholder centerOnDiveSite() public slot
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>
2017-07-28 07:31:11 -07:00
Lubomir I. Ivanov
b083795233 map: add placeholder .cpp and .h files for the new map widget
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>
2017-07-28 07:31:11 -07:00