2015-09-02 23:52:34 +00:00
|
|
|
set(PLATFORM_SRC unknown_platform.c)
|
2015-11-05 15:57:47 +00:00
|
|
|
message(STATUS "system name ${CMAKE_SYSTEM_NAME}")
|
2015-09-02 23:52:34 +00:00
|
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
2015-11-05 15:57:47 +00:00
|
|
|
if(ANDROID)
|
2020-03-05 21:38:33 +00:00
|
|
|
set(PLATFORM_SRC android.cpp serial_usb_android.cpp)
|
2015-11-05 15:57:47 +00:00
|
|
|
else()
|
2023-04-29 09:43:17 +00:00
|
|
|
set(PLATFORM_SRC unix.cpp)
|
2015-11-05 15:57:47 +00:00
|
|
|
endif()
|
2015-11-07 00:51:31 +00:00
|
|
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
2020-03-05 21:38:33 +00:00
|
|
|
set(PLATFORM_SRC android.cpp serial_usb_android.cpp)
|
2015-09-02 23:52:34 +00:00
|
|
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
2023-04-29 09:43:17 +00:00
|
|
|
set(PLATFORM_SRC macos.cpp)
|
2015-09-02 23:52:34 +00:00
|
|
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
2023-04-29 09:43:17 +00:00
|
|
|
set(PLATFORM_SRC windows.cpp)
|
2018-07-18 09:04:35 +00:00
|
|
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
|
2023-04-29 09:43:17 +00:00
|
|
|
set(PLATFORM_SRC unix.cpp)
|
2015-09-02 23:52:34 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(FTDISUPPORT)
|
2024-05-02 20:36:34 +00:00
|
|
|
set(SERIAL_FTDI serial_ftdi.cpp)
|
2015-09-02 23:52:34 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(BTSUPPORT)
|
|
|
|
add_definitions(-DBT_SUPPORT)
|
2015-11-16 09:49:58 +00:00
|
|
|
set(BT_SRC_FILES desktop-widgets/btdeviceselectiondialog.cpp)
|
2019-03-25 21:47:44 +00:00
|
|
|
set(BT_CORE_SRC_FILES
|
|
|
|
btdiscovery.cpp
|
|
|
|
btdiscovery.h
|
|
|
|
qtserialbluetooth.cpp
|
|
|
|
)
|
2015-09-02 23:52:34 +00:00
|
|
|
endif()
|
|
|
|
|
2017-06-13 02:47:50 +00:00
|
|
|
if(BLESUPPORT)
|
|
|
|
add_definitions(-DBLE_SUPPORT)
|
2019-03-25 21:47:44 +00:00
|
|
|
list(APPEND BT_CORE_SRC_FILES qt-ble.cpp qt-ble.h)
|
2017-06-13 02:47:50 +00:00
|
|
|
endif()
|
|
|
|
|
2018-06-16 07:52:01 +00:00
|
|
|
# compile the core library part in C, part in C++
|
2015-09-02 23:52:34 +00:00
|
|
|
set(SUBSURFACE_CORE_LIB_SRCS
|
2018-06-16 07:52:01 +00:00
|
|
|
checkcloudconnection.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
checkcloudconnection.h
|
2018-06-16 07:52:01 +00:00
|
|
|
cloudstorage.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
cloudstorage.h
|
2024-03-01 12:09:20 +00:00
|
|
|
cochran.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
cochran.h
|
2018-06-16 07:52:01 +00:00
|
|
|
color.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
color.h
|
2018-06-16 07:52:01 +00:00
|
|
|
configuredivecomputer.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
configuredivecomputer.h
|
2018-06-16 07:52:01 +00:00
|
|
|
configuredivecomputerthreads.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
configuredivecomputerthreads.h
|
2018-06-16 07:52:01 +00:00
|
|
|
connectionlistmodel.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
connectionlistmodel.h
|
2024-03-01 12:09:20 +00:00
|
|
|
datatrak.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
datatrak.h
|
2024-03-07 10:09:40 +00:00
|
|
|
deco.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
deco.h
|
2020-09-13 17:08:41 +00:00
|
|
|
device.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
device.h
|
2018-06-16 07:52:01 +00:00
|
|
|
devicedetails.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
devicedetails.h
|
2024-02-27 11:02:20 +00:00
|
|
|
dive.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
dive.h
|
2024-05-01 16:21:06 +00:00
|
|
|
divecomputer.cpp
|
2020-10-25 12:28:55 +00:00
|
|
|
divecomputer.h
|
|
|
|
dive.h
|
2019-11-17 17:13:55 +00:00
|
|
|
divefilter.cpp
|
|
|
|
divefilter.h
|
2024-05-01 16:11:35 +00:00
|
|
|
divelist.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
divelist.h
|
core: introduce divelog structure
The parser API was very annoying, as a number of tables
to-be-filled were passed in as pointers. The goal of this
commit is to collect all these tables in a single struct.
This should make it (more or less) clear what is actually
written into the divelog files.
Moreover, it should now be rather easy to search for
instances, where the global logfile is accessed (and it
turns out that there are many!).
The divelog struct does not contain the tables as substructs,
but only collects pointers. The idea is that the "divelog.h"
file can be included without all the other files describing
the numerous tables.
To make it easier to use from C++ parts of the code, the
struct implements a constructor and a destructor. Sadly,
we can't use smart pointers, since the pointers are accessed
from C code. Therfore the constructor and destructor are
quite complex.
The whole commit is large, but was mostly an automatic
conversion.
One oddity of note: the divelog structure also contains
the "autogroup" flag, since that is saved in the divelog.
This actually fixes a bug: Before, when importing dives
from a different log, the autogroup flag was overwritten.
This was probably not intended and does not happen anymore.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2022-11-08 20:31:08 +00:00
|
|
|
divelog.cpp
|
|
|
|
divelog.h
|
2018-06-16 07:52:01 +00:00
|
|
|
divelogexportlogic.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
divelogexportlogic.h
|
2024-04-23 07:42:19 +00:00
|
|
|
divesite.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
divesite.h
|
2024-06-07 08:25:09 +00:00
|
|
|
divesitetable.h
|
2018-06-16 07:52:01 +00:00
|
|
|
divesitehelpers.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
divesitehelpers.h
|
2024-11-11 02:41:31 +00:00
|
|
|
divesoft.cpp
|
2018-06-16 07:52:01 +00:00
|
|
|
downloadfromdcthread.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
downloadfromdcthread.h
|
2024-05-03 19:38:11 +00:00
|
|
|
event.cpp
|
2020-10-25 08:14:16 +00:00
|
|
|
event.h
|
2024-02-14 09:59:13 +00:00
|
|
|
eventtype.cpp
|
|
|
|
eventtype.h
|
2024-04-05 15:15:04 +00:00
|
|
|
equipment.cpp
|
2019-05-30 18:51:30 +00:00
|
|
|
equipment.h
|
2024-03-24 18:21:00 +00:00
|
|
|
errorhelper.cpp
|
2018-06-16 07:52:01 +00:00
|
|
|
exif.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
exif.h
|
2020-10-25 12:28:55 +00:00
|
|
|
extradata.h
|
2024-02-28 06:50:11 +00:00
|
|
|
file.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
file.h
|
filter: add filter constraint object to the core
Adds a filter constraint object to the core, which represents one
constraint the user can filter dives with. The plan is to write these
constraints to the XML and git logs. Therefore, this code is written
in C-style except when it comes to handling strings and dates, which
is just too painful in plain C.
There is one pointer to QStringList in the class, though when compiled
with C, this is simply transformed into a pointer to void. Granted,
that smells of an ugly hack. However it's more pragmatic than
self-flaggelation with C string and list handling.
A filter constraint is supposed to be a very general thing, which can
filter for strings, multiple-choice lists, numerical ranges and date
ranges.
Range constraints have a range mode: less-or-equal, greater-or-equal
or in-range. Text constraints have a string mode: startswith, substring
or exact.
All the data are accessed via setter and getter functions for
at least basic levels of isolation, despite being written with
a C-interface in mind.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-05-13 13:34:25 +00:00
|
|
|
filterconstraint.cpp
|
|
|
|
filterconstraint.h
|
2020-05-26 16:32:52 +00:00
|
|
|
filterpreset.cpp
|
|
|
|
filterpreset.h
|
2024-06-08 16:54:23 +00:00
|
|
|
filterpresettable.cpp
|
|
|
|
filterpresettable.h
|
2018-06-16 07:52:01 +00:00
|
|
|
format.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
format.h
|
2020-02-16 21:19:44 +00:00
|
|
|
fulltext.cpp
|
|
|
|
fulltext.h
|
2024-05-03 16:51:03 +00:00
|
|
|
gas.cpp
|
2019-06-04 11:52:48 +00:00
|
|
|
gas.h
|
2024-05-02 20:42:09 +00:00
|
|
|
gas-model.cpp
|
2024-05-03 04:50:23 +00:00
|
|
|
gaspressures.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
gaspressures.h
|
|
|
|
gettext.h
|
2018-06-16 07:52:01 +00:00
|
|
|
gettextfromc.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
gettextfromc.h
|
2024-02-27 22:22:49 +00:00
|
|
|
git-access.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
git-access.h
|
2022-03-12 17:30:23 +00:00
|
|
|
globals.cpp
|
|
|
|
globals.h
|
2018-06-16 07:52:01 +00:00
|
|
|
imagedownloader.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
imagedownloader.h
|
2024-02-29 06:29:11 +00:00
|
|
|
import-cobalt.cpp
|
|
|
|
import-csv.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
import-csv.h
|
2024-02-29 06:29:11 +00:00
|
|
|
import-divinglog.cpp
|
|
|
|
import-shearwater.cpp
|
|
|
|
import-suunto.cpp
|
|
|
|
import-seac.cpp
|
2020-10-25 17:14:23 +00:00
|
|
|
interpolate.h
|
2024-03-01 12:09:20 +00:00
|
|
|
libdivecomputer.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
libdivecomputer.h
|
2024-03-01 12:09:20 +00:00
|
|
|
liquivision.cpp
|
2024-02-28 07:42:23 +00:00
|
|
|
load-git.cpp
|
2021-07-20 05:24:07 +00:00
|
|
|
membuffer.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
membuffer.h
|
2018-06-16 07:52:01 +00:00
|
|
|
metadata.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
metadata.h
|
2018-06-16 07:52:01 +00:00
|
|
|
metrics.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
metrics.h
|
2024-05-02 07:36:00 +00:00
|
|
|
ostctools.cpp
|
2020-01-22 21:25:58 +00:00
|
|
|
parse-gpx.cpp
|
2024-02-28 21:01:51 +00:00
|
|
|
parse-xml.cpp
|
|
|
|
parse.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
parse.h
|
2024-05-04 15:31:04 +00:00
|
|
|
picture.cpp
|
2020-04-10 07:42:14 +00:00
|
|
|
picture.h
|
2024-03-07 10:09:40 +00:00
|
|
|
planner.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
planner.h
|
2024-03-07 10:09:40 +00:00
|
|
|
plannernotes.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
pref.h
|
2024-05-02 05:56:47 +00:00
|
|
|
pref.cpp
|
2024-03-07 10:09:40 +00:00
|
|
|
profile.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
profile.h
|
|
|
|
qt-gui.h
|
2018-06-16 07:52:01 +00:00
|
|
|
qt-init.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
qthelper.cpp
|
|
|
|
qthelper.h
|
2022-09-24 12:06:56 +00:00
|
|
|
range.h
|
2024-02-27 15:31:44 +00:00
|
|
|
sample.cpp
|
2020-10-25 12:28:55 +00:00
|
|
|
sample.h
|
2024-02-27 17:40:45 +00:00
|
|
|
save-git.cpp
|
2024-03-10 15:35:53 +00:00
|
|
|
save-html.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
save-html.h
|
2024-05-03 05:48:17 +00:00
|
|
|
save-profiledata.cpp
|
2024-02-28 05:36:48 +00:00
|
|
|
save-xml.cpp
|
2019-11-24 12:26:29 +00:00
|
|
|
selection.cpp
|
|
|
|
selection.h
|
2024-04-23 13:30:40 +00:00
|
|
|
sha1.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
sha1.h
|
2024-05-01 21:16:00 +00:00
|
|
|
statistics.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
statistics.h
|
2020-12-14 21:42:07 +00:00
|
|
|
string-format.h
|
|
|
|
string-format.cpp
|
2024-04-23 07:11:29 +00:00
|
|
|
strtod.cpp
|
2022-08-30 16:13:13 +00:00
|
|
|
subsurface-float.h
|
2024-03-25 09:58:27 +00:00
|
|
|
subsurface-string.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
subsurface-string.h
|
2024-02-28 05:33:44 +00:00
|
|
|
subsurfacestartup.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
subsurfacestartup.h
|
2018-06-16 07:52:01 +00:00
|
|
|
subsurfacesysinfo.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
subsurfacesysinfo.h
|
2024-03-10 16:20:59 +00:00
|
|
|
tag.cpp
|
2019-05-30 16:29:36 +00:00
|
|
|
tag.h
|
2024-05-04 11:39:04 +00:00
|
|
|
taxonomy.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
taxonomy.h
|
2024-02-29 10:31:46 +00:00
|
|
|
time.cpp
|
2024-05-04 13:55:40 +00:00
|
|
|
trip.cpp
|
2019-05-31 14:09:14 +00:00
|
|
|
trip.h
|
2024-06-08 13:28:16 +00:00
|
|
|
triptable.cpp
|
2024-06-07 08:25:09 +00:00
|
|
|
triptable.h
|
2024-03-02 08:12:21 +00:00
|
|
|
uemis-downloader.cpp
|
2024-04-23 14:09:52 +00:00
|
|
|
uemis.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
uemis.h
|
|
|
|
units.h
|
2024-05-02 05:56:47 +00:00
|
|
|
units.cpp
|
2019-12-08 10:45:55 +00:00
|
|
|
uploadDiveShare.cpp
|
|
|
|
uploadDiveShare.h
|
2019-11-27 08:48:58 +00:00
|
|
|
uploadDiveLogsDE.cpp
|
|
|
|
uploadDiveLogsDE.h
|
2024-04-23 07:13:56 +00:00
|
|
|
version.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
version.h
|
2018-07-10 13:04:35 +00:00
|
|
|
videoframeextractor.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
videoframeextractor.h
|
|
|
|
webservice.h
|
2015-09-02 23:52:34 +00:00
|
|
|
windowtitleupdate.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
windowtitleupdate.h
|
|
|
|
worldmap-options.h
|
2024-03-08 16:09:02 +00:00
|
|
|
worldmap-save.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
worldmap-save.h
|
2020-10-17 14:29:32 +00:00
|
|
|
xmlparams.cpp
|
|
|
|
xmlparams.h
|
2019-03-25 21:47:44 +00:00
|
|
|
xmp_parser.cpp
|
|
|
|
xmp_parser.h
|
2016-01-07 18:01:24 +00:00
|
|
|
|
2018-06-16 14:03:31 +00:00
|
|
|
# classes to manage struct preferences for QWidget and QML
|
|
|
|
settings/qPref.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
settings/qPref.h
|
2018-07-12 19:01:31 +00:00
|
|
|
settings/qPrefCloudStorage.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
settings/qPrefCloudStorage.h
|
2018-06-15 08:53:42 +00:00
|
|
|
settings/qPrefDisplay.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
settings/qPrefDisplay.h
|
2018-07-15 16:15:40 +00:00
|
|
|
settings/qPrefDiveComputer.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
settings/qPrefDiveComputer.h
|
2018-08-01 15:14:04 +00:00
|
|
|
settings/qPrefDivePlanner.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
settings/qPrefDivePlanner.h
|
2019-12-09 18:58:20 +00:00
|
|
|
settings/qPrefEquipment.cpp
|
|
|
|
settings/qPrefEquipment.h
|
2018-08-12 15:57:45 +00:00
|
|
|
settings/qPrefGeneral.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
settings/qPrefGeneral.h
|
2018-08-06 17:25:06 +00:00
|
|
|
settings/qPrefGeocoding.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
settings/qPrefGeocoding.h
|
2018-08-06 17:39:35 +00:00
|
|
|
settings/qPrefLanguage.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
settings/qPrefLanguage.h
|
2019-12-09 18:58:20 +00:00
|
|
|
settings/qPrefLog.cpp
|
|
|
|
settings/qPrefLog.h
|
|
|
|
settings/qPrefMedia.cpp
|
|
|
|
settings/qPrefMedia.h
|
2018-08-10 19:18:40 +00:00
|
|
|
settings/qPrefPartialPressureGas.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
settings/qPrefPartialPressureGas.h
|
2018-07-17 13:22:51 +00:00
|
|
|
settings/qPrefPrivate.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
settings/qPrefPrivate.h
|
2018-07-27 08:25:43 +00:00
|
|
|
settings/qPrefProxy.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
settings/qPrefProxy.h
|
2018-08-04 10:02:29 +00:00
|
|
|
settings/qPrefTechnicalDetails.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
settings/qPrefTechnicalDetails.h
|
2018-07-31 13:04:12 +00:00
|
|
|
settings/qPrefUnit.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
settings/qPrefUnit.h
|
2018-08-03 17:24:53 +00:00
|
|
|
settings/qPrefUpdateManager.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
settings/qPrefUpdateManager.h
|
2018-06-16 14:03:31 +00:00
|
|
|
|
2016-01-07 18:01:24 +00:00
|
|
|
#Subsurface Qt have the Subsurface structs QObjectified for easy access via QML.
|
2020-02-03 18:33:06 +00:00
|
|
|
subsurface-qt/divelistnotifier.cpp
|
|
|
|
subsurface-qt/divelistnotifier.h
|
2017-04-18 17:14:03 +00:00
|
|
|
|
2015-09-02 23:52:34 +00:00
|
|
|
${SERIAL_FTDI}
|
|
|
|
${PLATFORM_SRC}
|
|
|
|
${BT_CORE_SRC_FILES}
|
|
|
|
)
|
|
|
|
source_group("Subsurface Core" FILES ${SUBSURFACE_CORE_LIB_SRCS})
|
|
|
|
|
|
|
|
add_library(subsurface_corelib STATIC ${SUBSURFACE_CORE_LIB_SRCS} )
|
|
|
|
target_link_libraries(subsurface_corelib ${QT_LIBRARIES})
|