subsurface/mobile-widgets
Berthold Stoeger fb6210a99a cleanup: invert control-flow when resetting the core structures
To reset the core data structures, the mobile and desktop UIs
were calling into the dive-list models, which then reset the
core data structures, themselves and the unrelated
locationinformation model. The UI code then reset various other
things, such as the TankInformation model or the map. . This was
unsatisfying from a control-flow perspective, as the models should
display the core data, not act on it. Moreover, this meant lots
of intricate intermodule-dependencies.

Thus, straighten up the control flow: give the C core the
possibility to send a "all data reset" event. And do that
in those functions that reset the core data structures.
Let each module react to this event by itself. This removes
inter-module dependencies. For example, the MainWindow now
doesn't have to reset the TankInfoModel or the MapWidget.

Then, to reset the core data structures, let the UI code
simply directly call the respective core functions.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-05-07 08:43:27 -07:00
..
qml mobile UI: indicate status of verbose flag 2020-04-18 09:00:21 -07:00
CMakeLists.txt mobile-widgets: add themeInterface 2020-01-26 16:42:35 -08:00
qmlinterface.cpp mobile/summary: remove dive summary calculation 2020-02-08 10:29:36 -08:00
qmlinterface.h mobile/summary: remove dive summary calculation 2020-02-08 10:29:36 -08:00
qmlmanager.cpp cleanup: invert control-flow when resetting the core structures 2020-05-07 08:43:27 -07:00
qmlmanager.h mobile/cleanup: create helper function to hide verbose casts 2020-04-04 16:10:50 -07:00
themeinterface.cpp cleanup: use setPointSizeF() in themeInterface::set_currentScale() 2020-03-30 13:58:10 -07:00
themeinterface.h cleanup: fold ThemeInterface::setup() into constructor 2020-03-30 13:54:12 -07:00