<feed xmlns='http://www.w3.org/2005/Atom'>
<title>subsurface.git/desktop-widgets/tab-widgets, branch v5.0.1</title>
<subtitle>forked from https://github.com/subsurface/subsurface</subtitle>
<id>https://git.tsegers.com/subsurface.git/atom?h=v5.0.1</id>
<link rel='self' href='https://git.tsegers.com/subsurface.git/atom?h=v5.0.1'/>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/'/>
<updated>2021-02-06T18:00:39Z</updated>
<entry>
<title>profile: detect dive-mode change in profile</title>
<updated>2021-02-06T18:00:39Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2021-01-27T22:41:51Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=0b0e6672d5622238c2fb583dad6b51813b9338b3'/>
<id>urn:sha1:0b0e6672d5622238c2fb583dad6b51813b9338b3</id>
<content type='text'>
The profile must be replotted when the dive mode changes.
Weirdly, this was routed via the dive-information tab
(making it inherently non-mobile compatible). Detect
such a change directly in the profile.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>desktop: don't access profile directly to redraw it</title>
<updated>2021-02-06T18:00:39Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2021-01-27T17:08:23Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=c584e28f2e0cc97cb2573d66697fdb0c0f160b66'/>
<id>urn:sha1:c584e28f2e0cc97cb2573d66697fdb0c0f160b66</id>
<content type='text'>
The MainWindow has a function to replot the profile. Use that
instead of accessing the profile directly.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>profile: remove ProfileWidget2::dateTimeChanged()</title>
<updated>2021-01-10T23:57:39Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-12-20T11:00:57Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=78196839903398434638073d26ee9b47da0a0e55'/>
<id>urn:sha1:78196839903398434638073d26ee9b47da0a0e55</id>
<content type='text'>
This function sent a signal and the only listener was removed
in the previous commit.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>desktop: rename Statistics tab to Summary</title>
<updated>2021-01-03T21:56:25Z</updated>
<author>
<name>Dirk Hohndel</name>
<email>dirk@hohndel.org</email>
</author>
<published>2021-01-03T21:53:52Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=77bc0c7c9396f82a4dccac0661adb05814909bb6'/>
<id>urn:sha1:77bc0c7c9396f82a4dccac0661adb05814909bb6</id>
<content type='text'>
We now have three different things that are kinda like statistics:
- the summary tab (reasonably useful when looking at selected dives)
- the yearly statistics (Ctrl/CMD-Y)
- the full statistics (Ctrl/CMD-T)

I'd argue that's at least one too many. But I'm sure some people will disagree.

Signed-off-by: Dirk Hohndel &lt;dirk@hohndel.org&gt;
</content>
</entry>
<entry>
<title>preferences: create global settingsChanged signal</title>
<updated>2020-12-12T23:52:40Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-11-24T11:50:52Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=2d7be7a0e366b562fdff914e92219ab1852cd3c8'/>
<id>urn:sha1:2d7be7a0e366b562fdff914e92219ab1852cd3c8</id>
<content type='text'>
So far, the PreferencesDialog emitted a settingsChanged signal.
This meant that models that listened to that signal had to
conditionally compile out the code for mobile or the connection
had to be made in MainWindow.

Instead, introduce a global signal that does this and move
the connects to the listeners to remove inter-dependencies.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>cleanup: remove empty function MainTab::reload()</title>
<updated>2020-11-14T18:01:50Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-11-14T17:05:21Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=71389cfa928b22216dc4753f86827f6bc05a1bd2'/>
<id>urn:sha1:71389cfa928b22216dc4753f86827f6bc05a1bd2</id>
<content type='text'>
This used to reload the completion models. Moreover, remove two
obsolete member-function declarations.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>desktop: automatically reload completion-models</title>
<updated>2020-11-14T18:01:50Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-11-14T16:42:59Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=38a784f5af3e19936df29e93b70a66e3741f8ea8'/>
<id>urn:sha1:38a784f5af3e19936df29e93b70a66e3741f8ea8</id>
<content type='text'>
Instead of programatically reload the completion models, listen
to the relevant signals in the models. To that goal, derive all
the models from a base class.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>desktop: update completion models if dive was edited</title>
<updated>2020-11-12T19:22:12Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-11-12T16:13:48Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=b390fb368dabfeeb9bc1b800bc7a56b5963c9b94'/>
<id>urn:sha1:b390fb368dabfeeb9bc1b800bc7a56b5963c9b94</id>
<content type='text'>
In the main-tab, when changing tag, buddy or divemaster,
update the corresponding completion model.
This is a quick-fix and the wrong thing to do. It works only
if the currently shown dive is changed, which is not a given.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>desktop: fix saving of column-widths of device and site tables</title>
<updated>2020-11-07T19:37:51Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-11-07T12:20:46Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=396598430ba19416795edc5e1b960efdcafed5c6'/>
<id>urn:sha1:396598430ba19416795edc5e1b960efdcafed5c6</id>
<content type='text'>
Qt's memory management scheme is completely broken and messes
with common expectations.

QObjects are organized as a tree. The children are destroyed
in the destructor of QObject. This means that they are destructed
after the destructor of the parent object has run and its
sub-object were destructed. Obviously, this makes no sense as
the child objects should be able to access their parent at
any time.

To restore the commonly expected deterministic order of
construction and destruction, one might simply do away with
Qt's silly object tree and organise things using classical
subobjects. However, that breaks with the Qt-generated UI
classes: The objects generated by these classes are *not*
destructed with the UI class. Instead, they are attached
to the widget's QObject tree. Thus these are again destructed
*after* the widget! Who comes up with such a scheme?

In our case this means that we cannot have models used for
TableViews as subobjects, because the TableView needs the
model to save the column widths in the destructor. Which,
as detailed above is called *after* the desctructor of the
widget! Thus, turn these models into heap-allocated objects
and add them to the QObject tree.

Funilly, this exposes another insanity of Qt's QObject tree:
Children are destructed in order of construction! One would
expect that if objects are constructed in the sequence
A, B, C one can expect that C can, at any time, access B and A.
Not so in Qt: The destruction order is likewise A, B, C!

Thus, take care to init the widgets before the model. Jeez.

Finally, print a warning in the column-saving code of
TableWidget, so that these kind of subtleties are caught
in the future.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>desktop: rename table widget in DiveComputerTab to "devices"</title>
<updated>2020-11-07T19:37:51Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-11-07T11:58:27Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=291768b63cd3443372d47ccc67858c398287d867'/>
<id>urn:sha1:291768b63cd3443372d47ccc67858c398287d867</id>
<content type='text'>
The custom TableView widget saves the table width on destruction.
For that, it uses the "objectName()". Since the table of the
DiveComputerTab was simply called "table" in the UI file, the
widths were saved in that generic section. To avoid future
name-conflicts, rename the widget to "devices".

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