subsurface/core
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
..
settings
subsurface-qt
android.cpp
applicationstate.cpp Turn application state into enum 2019-05-12 12:33:55 -07:00
applicationstate.h Turn application state into enum 2019-05-12 12:33:55 -07:00
btdiscovery.cpp
btdiscovery.h
checkcloudconnection.cpp
checkcloudconnection.h
cloudstorage.cpp
cloudstorage.h
CMakeLists.txt
cochran.c
cochran.h
color.cpp
color.h
compressibility.r
configuredivecomputer.cpp
configuredivecomputer.h
configuredivecomputerthreads.cpp
configuredivecomputerthreads.h
connectionlistmodel.cpp
connectionlistmodel.h
datatrak.c
datatrak.h
deco.c
deco.h
device.c
device.h
devicedetails.cpp Implement OSTC4 specific settings 2017-05-04 10:50:15 -07:00
devicedetails.h
display.h
dive.c
dive.h
divecomputer.cpp
divecomputer.h
divefilter.cpp
divefilter.h
divelist.c
divelist.h
divelogexportlogic.cpp
divelogexportlogic.h avoid duplicate and inconsistent applying of QDir::separator() 2019-03-27 07:36:33 -07:00
divemode.h
divesite-helper.cpp
divesite.c
divesite.h
divesitehelpers.cpp cleanup: split uiLanguage() in two functions 2020-03-22 12:01:09 -07:00
divesitehelpers.h Geo lookup: don't pass arguments / result via global object 2018-10-11 16:25:02 -07:00
downloadfromdcthread.cpp
downloadfromdcthread.h
equipment.c
equipment.h
errorhelper.c
errorhelper.h
exif.cpp
exif.h
file.c
file.h
format.cpp
format.h
fulltext.cpp
fulltext.h
gas-model.c
gas.c
gas.h
gaspressures.c
gaspressures.h
gettext.h
gettextfromc.cpp
gettextfromc.h
git-access.c
git-access.h
gpslocation.cpp
gpslocation.h
imagedownloader.cpp code cleanup: consistently initialize zero duration_t 2020-01-10 02:37:03 +09:00
imagedownloader.h Profile: add "synchronous" mode for picture plotting 2019-02-07 16:06:43 +01:00
import-cobalt.c
import-csv.c
import-csv.h
import-divinglog.c
import-shearwater.c
import-suunto.c
ios.cpp
libdivecomputer.c cleanup: move declaration of utc_mk* functions to new subsurface-time.h header 2020-05-01 09:42:31 -07:00
libdivecomputer.h android/usb: pass in the UsbDevice when downloading 2020-03-16 07:58:20 -07:00
liquivision.c
load-git.c
macos.c
membuffer.c
membuffer.h
metadata.cpp
metadata.h
metrics.cpp
metrics.h
ostctools.c
parse-gpx.cpp
parse-gpx.h
parse-xml.c
parse.c
parse.h
picture.c
picture.h
pictureobj.cpp
pictureobj.h
planner.c
planner.h
plannernotes.c
pref.h
profile.c
profile.h
qt-ble.cpp
qt-ble.h
qt-gui.h
qt-init.cpp
qthelper.cpp
qthelper.h
qtserialbluetooth.cpp
save-git.c
save-html.c
save-html.h
save-profiledata.c
save-profiledata.h
save-xml.c
selection.cpp
selection.h
serial_ftdi.c
serial_usb_android.cpp
serial_usb_android.h
sha1.c
sha1.h
ssrf.h
statistics.c
statistics.h
strndup.h
strtod.c
structured_list.h
subsurface-string.h
subsurface-time.h
subsurfacestartup.c
subsurfacestartup.h
subsurfacesysinfo.cpp
subsurfacesysinfo.h
table.h
tag.c
tag.h
taxonomy.c
taxonomy.h
time.c
timer.c
timer.h
trip.c
trip.h
uemis-downloader.c
uemis.c
uemis.h
units.c
units.h
unix.c
uploadDiveLogsDE.cpp
uploadDiveLogsDE.h Cleanup: remove const bool parameters and return types 2020-02-09 12:13:18 -08:00
uploadDiveShare.cpp core: divehare avoid race problem. 2019-12-12 10:10:01 -05:00
uploadDiveShare.h core: divehare change slot names 2019-12-12 10:10:01 -05:00
version.c
version.h
videoframeextractor.cpp
videoframeextractor.h
webservice.h
windows.c
windowtitleupdate.cpp
windowtitleupdate.h
worldmap-options.h
worldmap-save.c
worldmap-save.h
xmp_parser.cpp
xmp_parser.h