<feed xmlns='http://www.w3.org/2005/Atom'>
<title>subsurface.git/map-widget/qml, branch v5.0.2</title>
<subtitle>forked from https://github.com/subsurface/subsurface</subtitle>
<id>https://git.tsegers.com/subsurface.git/atom?h=v5.0.2</id>
<link rel='self' href='https://git.tsegers.com/subsurface.git/atom?h=v5.0.2'/>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/'/>
<updated>2020-04-27T12:48:37Z</updated>
<entry>
<title>Revert "map: remove selectedDivesChanged"</title>
<updated>2020-04-27T12:48:37Z</updated>
<author>
<name>Jan Mulder</name>
<email>jan@jlmulder.nl</email>
</author>
<published>2020-04-27T12:07:03Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=906762027b8ca2b1cd0c33d28fea2e6e54743085'/>
<id>urn:sha1:906762027b8ca2b1cd0c33d28fea2e6e54743085</id>
<content type='text'>
This reverts commit cd474996948b7592ab2973b7f936320a663a914e.

The signal removed in the reverted commit was used in Subsurface-mobile.
So removing it, caused a not running app.

Signed-off-by: Jan Mulder &lt;jan@jlmulder.nl&gt;
</content>
</entry>
<entry>
<title>maps: disable link to Google maps on iOS and Android</title>
<updated>2020-04-25T20:18:41Z</updated>
<author>
<name>Dirk Hohndel</name>
<email>dirk@hohndel.org</email>
</author>
<published>2020-04-20T18:34:18Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=212da3d92fccc8c694ef069288dd833d2bef0259'/>
<id>urn:sha1:212da3d92fccc8c694ef069288dd833d2bef0259</id>
<content type='text'>
It appears that on those two platforms you now need a paid API key in order
to have this feature work. Certainly not something I'm going to do.

Signed-off-by: Dirk Hohndel &lt;dirk@hohndel.org&gt;
</content>
</entry>
<entry>
<title>map: remove selectedDivesChanged</title>
<updated>2020-04-25T20:05:31Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-04-25T11:53:01Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=cd474996948b7592ab2973b7f936320a663a914e'/>
<id>urn:sha1:cd474996948b7592ab2973b7f936320a663a914e</id>
<content type='text'>
The qml-widget seems to catch selectedDivesChanged signals of the
MapWidgetHelper and reemit them. However, there seems to be nobody
listening to this signal?

Let's remove this for now to make debugging of the signals easier.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>maps: show the dive site when opening Google map</title>
<updated>2020-04-20T01:52:15Z</updated>
<author>
<name>Dirk Hohndel</name>
<email>dirk@hohndel.org</email>
</author>
<published>2020-04-20T01:46:40Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=b0dfc0d0ffe72d188cac75561fd178fde7d875a1'/>
<id>urn:sha1:b0dfc0d0ffe72d188cac75561fd178fde7d875a1</id>
<content type='text'>
I'm not sure if Google used to show the POI marker at the center location in
the past or if this is actually a new feature. Either way this appears to do
the right thing in my testing.

Note that we need a 'plus' to connect the point of interest cooridnates,
but a 'comma' to connect the map center coordinates.

Reported-by: Chirana Gheorghita Eugeniu Theodor &lt;office@adaptcom.ro&gt;
Signed-off-by: Dirk Hohndel &lt;dirk@hohndel.org&gt;
</content>
</entry>
<entry>
<title>Map: export isSelected as attribute from MapLocationModel</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-31T21:24:21Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=1d01fff0061bde6260259a9a2b46f80a31ad1218'/>
<id>urn:sha1:1d01fff0061bde6260259a9a2b46f80a31ad1218</id>
<content type='text'>
Recently we changed the MapLocationModel-items to store whether
they are selected. Thus, we can directly export an isSelected
flag instead of calling a function taking a dive-site argument.

1) This makes the QML easier to read.
2) This avoids passing pointers through QML which has caused
   us lots of pain.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Map: calculate the z value in the model</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-30T16:09:37Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=652b78657ebe18ff101d3f6cd2ac9f3458db1881'/>
<id>urn:sha1:652b78657ebe18ff101d3f6cd2ac9f3458db1881</id>
<content type='text'>
Since not fully reloading the map on selection change,
the selected sites were not moved to the top. Not calculating
the z-value in QML, but making it a simple model property
helps.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Desktop: show all selected dive sites on click</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-30T15:38:54Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=488eb1542336088245841d79549e26938e2d3fd9'/>
<id>urn:sha1:488eb1542336088245841d79549e26938e2d3fd9</id>
<content type='text'>
When clicking a dive site on the map, the QML code would set
the selected dive site, but then all dives of dive sites in
the vicinity were set. But still only the clicked-on dive site
was shown.

Therefore, don't set the list of selected dive sites in QML,
but later in DiveListView::selectDives(), where we know all
the dives that were selected.

This, again, gives nasty entanglement of diverse widgets and
models.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Map: generate pixmap name in model</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-30T13:25:59Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=bce31ab8621537441b42389801e20de56861438c'/>
<id>urn:sha1:bce31ab8621537441b42389801e20de56861438c</id>
<content type='text'>
Experimentation has shown that the image of a flag will
only be changed after dataChanged() if it is a simple
property. The old code had a complex QML expression and
then - for some reason - it didn't work.

To give us better control over the flags and avoid full
reloads of the map therefore introduce a model-property
pixmap name. The name depends on whether the site is
selected and if not, whether we are in divesite-edit mode.
This makes the code rather convoluted. Firstly, we have
to save whether the site is selected in the map-item.
Secondly we have to access the global map-widget, which
in turn has to go to the map-widget helper (layering
violation!).

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Map: explicitly reload selected map on click</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-30T10:38:25Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=28cb75b73d3d0fa4cd8dcf3aa5884e93cb13a5d2'/>
<id>urn:sha1:28cb75b73d3d0fa4cd8dcf3aa5884e93cb13a5d2</id>
<content type='text'>
When clicking on a flag
 1) The QML would call MapLocationModel::setSelected() with
    fromClick = true
 2) MapLocationModel::setSelected() would emit a signal
    selectedLocationChanged()
 3) MapWidgetHelper would catch that signal and do the actual
    processing.
Other functions would call MapLocationModel::setSelected() with
fromClick = false, which would not emit the selectedLocationChanged()
signal.

Detangle this a bit by calling the selectedLocationChanged() function
directly from QML and remove the fromClick parameter.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Map: catch null divesites in map widget selection code</title>
<updated>2019-08-28T14:12:01Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-25T10:21:37Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=b3fd824d189056b845452d57fb967a2b50550921'/>
<id>urn:sha1:b3fd824d189056b845452d57fb967a2b50550921</id>
<content type='text'>
Just to be sure, refuse to add null divesites to the selection.

Moreover, refuse to call the setSelected function on a null-divesite.
I got an unfriendly Qt-Warning there:

"Passing incompatible arguments to C++ functions from JavaScript is
dangerous and deprecated."
"This will throw a JavaScript TypeError in future releases of Qt!"

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
</feed>
