<feed xmlns='http://www.w3.org/2005/Atom'>
<title>subsurface.git/map-widget/qml, branch v4.9.3</title>
<subtitle>forked from https://github.com/subsurface/subsurface</subtitle>
<id>https://git.tsegers.com/subsurface.git/atom?h=v4.9.3</id>
<link rel='self' href='https://git.tsegers.com/subsurface.git/atom?h=v4.9.3'/>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/'/>
<updated>2019-09-06T18:48:47Z</updated>
<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>
<entry>
<title>Map: show multiple selected dive sites</title>
<updated>2019-05-11T19:06:19Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-05-01T22:09:59Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=a35d1bd0e79e83b5ef49b76087e7cfe5a38d829c'/>
<id>urn:sha1:a35d1bd0e79e83b5ef49b76087e7cfe5a38d829c</id>
<content type='text'>
If multiple dives are selected, highlight all corresponding sites.
For that, replace the MapLocationModel::m_selectedDs pointer by
a QVector&lt;&gt;. Fill the vector in MapLocationModel::reload() and
add a isSelected() member function.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Dive site: replace dive-&gt;dive_site_uuid by dive_site</title>
<updated>2018-10-29T00:09:31Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2018-10-26T15:03:54Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=724055f0af4fb7cdb9f1570967fe4b34797f3419'/>
<id>urn:sha1:724055f0af4fb7cdb9f1570967fe4b34797f3419</id>
<content type='text'>
Replace the UUID reference of struct dive by a pointer to dive_site.
This commit is rather large in lines, but nevertheless quite simple
since most of the UUID-&gt;pointer work was done in previous commits.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>map-widget: add qrc file for widget</title>
<updated>2018-06-22T03:27:58Z</updated>
<author>
<name>jan Iversen</name>
<email>jani@apache.org</email>
</author>
<published>2018-06-20T13:52:12Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=2b7b7ad8f5fab046403e8e12f9adf203a8d1abaf'/>
<id>urn:sha1:2b7b7ad8f5fab046403e8e12f9adf203a8d1abaf</id>
<content type='text'>
Make map-widget self contained, with its own qrc file.

Signed-off-by: Jan Iversen &lt;jani@apache.org&gt;
</content>
</entry>
<entry>
<title>MapWidgetContextMenu.qml: improve the action text</title>
<updated>2018-03-15T21:27:18Z</updated>
<author>
<name>Lubomir I. Ivanov</name>
<email>neolit123@gmail.com</email>
</author>
<published>2018-03-14T17:02:36Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=e1c81560b9a6c1208ba60621340ab02f0c3cc690'/>
<id>urn:sha1:e1c81560b9a6c1208ba60621340ab02f0c3cc690</id>
<content type='text'>
The first 3 actions in the map widget context menu
are about the current map widget center and not about the
selected dive site / marker.

Avoid using the word "location" for these, use "coordinates"
for the second and third entry.

Suggested-by: Willem Ferguson &lt;willemferguson@zoology.up.ac.za&gt;
Signed-off-by: Lubomir I. Ivanov &lt;neolit123@gmail.com&gt;
</content>
</entry>
</feed>
