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)
|
|
|
|
set(SERIAL_FTDI serial_ftdi.c)
|
|
|
|
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
|
2015-09-02 23:52:34 +00:00
|
|
|
cochran.c
|
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
|
2015-09-02 23:52:34 +00:00
|
|
|
datatrak.c
|
2019-03-25 21:47:44 +00:00
|
|
|
datatrak.h
|
2015-09-02 23:52:34 +00:00
|
|
|
deco.c
|
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
|
2020-10-25 12:28:55 +00:00
|
|
|
divecomputer.c
|
|
|
|
divecomputer.h
|
|
|
|
dive.h
|
2019-11-17 17:13:55 +00:00
|
|
|
divefilter.cpp
|
|
|
|
divefilter.h
|
2019-03-25 21:47:44 +00:00
|
|
|
divelist.c
|
|
|
|
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
|
|
|
|
divesite-helper.cpp
|
2015-09-02 23:52:34 +00:00
|
|
|
divesite.c
|
2019-03-25 21:47:44 +00:00
|
|
|
divesite.h
|
2018-06-16 07:52:01 +00:00
|
|
|
divesitehelpers.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
divesitehelpers.h
|
2018-06-16 07:52:01 +00:00
|
|
|
downloadfromdcthread.cpp
|
2019-03-25 21:47:44 +00:00
|
|
|
downloadfromdcthread.h
|
2020-10-25 08:14:16 +00:00
|
|
|
event.c
|
|
|
|
event.h
|
2024-02-14 09:59:13 +00:00
|
|
|
eventtype.cpp
|
|
|
|
eventtype.h
|
2015-09-02 23:52:34 +00:00
|
|
|
equipment.c
|
2019-05-30 18:51:30 +00:00
|
|
|
equipment.h
|
2017-10-26 12:33:02 +00:00
|
|
|
errorhelper.c
|
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
|
2015-09-02 23:52:34 +00:00
|
|
|
file.c
|
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
|
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
|
2019-06-04 11:52:48 +00:00
|
|
|
gas.c
|
|
|
|
gas.h
|
2016-03-02 21:49:59 +00:00
|
|
|
gas-model.c
|
2019-03-25 21:47:44 +00:00
|
|
|
gaspressures.c
|
|
|
|
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
|
|
|
|
import-cobalt.c
|
|
|
|
import-csv.c
|
|
|
|
import-csv.h
|
|
|
|
import-divinglog.c
|
|
|
|
import-shearwater.c
|
|
|
|
import-suunto.c
|
2020-07-17 01:40:46 +00:00
|
|
|
import-seac.c
|
2020-10-25 17:14:23 +00:00
|
|
|
interpolate.h
|
2015-09-02 23:52:34 +00:00
|
|
|
libdivecomputer.c
|
2019-03-25 21:47:44 +00:00
|
|
|
libdivecomputer.h
|
2015-09-02 23:52:34 +00:00
|
|
|
liquivision.c
|
|
|
|
load-git.c
|
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
|
2015-09-02 23:52:34 +00:00
|
|
|
ostctools.c
|
2022-11-06 11:18:27 +00:00
|
|
|
owning_ptrs.h
|
2020-01-22 21:25:58 +00:00
|
|
|
parse-gpx.cpp
|
2015-09-02 23:52:34 +00:00
|
|
|
parse-xml.c
|
2017-11-27 17:41:10 +00:00
|
|
|
parse.c
|
2019-03-25 21:47:44 +00:00
|
|
|
parse.h
|
2020-04-10 07:42:14 +00:00
|
|
|
picture.c
|
|
|
|
picture.h
|
2020-04-17 14:49:15 +00:00
|
|
|
pictureobj.cpp
|
|
|
|
pictureobj.h
|
2015-09-02 23:52:34 +00:00
|
|
|
planner.c
|
2019-03-25 21:47:44 +00:00
|
|
|
planner.h
|
2017-05-25 10:57:06 +00:00
|
|
|
plannernotes.c
|
2019-03-25 21:47:44 +00:00
|
|
|
pref.h
|
2021-01-02 13:03:25 +00:00
|
|
|
pref.c
|
2015-09-02 23:52:34 +00:00
|
|
|
profile.c
|
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
|
2015-09-02 23:52:34 +00:00
|
|
|
save-html.c
|
2019-03-25 21:47:44 +00:00
|
|
|
save-html.h
|
2019-03-30 19:59:28 +00:00
|
|
|
save-profiledata.c
|
2019-03-25 21:47:44 +00:00
|
|
|
save-xml.c
|
2019-11-24 12:26:29 +00:00
|
|
|
selection.cpp
|
|
|
|
selection.h
|
2015-09-02 23:52:34 +00:00
|
|
|
sha1.c
|
2019-03-25 21:47:44 +00:00
|
|
|
sha1.h
|
|
|
|
ssrf.h
|
2015-09-02 23:52:34 +00:00
|
|
|
statistics.c
|
2019-03-25 21:47:44 +00:00
|
|
|
statistics.h
|
|
|
|
strndup.h
|
2020-12-14 21:42:07 +00:00
|
|
|
string-format.h
|
|
|
|
string-format.cpp
|
2015-09-02 23:52:34 +00:00
|
|
|
strtod.c
|
2022-08-30 16:13:13 +00:00
|
|
|
subsurface-float.h
|
2019-03-25 21:47:44 +00:00
|
|
|
subsurface-string.h
|
2015-09-02 23:52:34 +00:00
|
|
|
subsurfacestartup.c
|
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
|
2019-05-30 16:29:36 +00:00
|
|
|
tag.c
|
|
|
|
tag.h
|
2018-06-16 07:52:01 +00:00
|
|
|
taxonomy.c
|
2019-03-25 21:47:44 +00:00
|
|
|
taxonomy.h
|
2015-09-02 23:52:34 +00:00
|
|
|
time.c
|
2020-03-10 21:58:24 +00:00
|
|
|
timer.c
|
|
|
|
timer.h
|
2019-05-31 14:09:14 +00:00
|
|
|
trip.c
|
|
|
|
trip.h
|
2015-09-02 23:52:34 +00:00
|
|
|
uemis-downloader.c
|
2019-03-25 21:47:44 +00:00
|
|
|
uemis.c
|
|
|
|
uemis.h
|
|
|
|
units.h
|
2019-06-04 07:05:17 +00:00
|
|
|
units.c
|
2019-12-08 10:45:55 +00:00
|
|
|
uploadDiveShare.cpp
|
|
|
|
uploadDiveShare.h
|
2019-11-27 08:48:58 +00:00
|
|
|
uploadDiveLogsDE.cpp
|
|
|
|
uploadDiveLogsDE.h
|
2015-09-02 23:52:34 +00:00
|
|
|
version.c
|
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
|
2018-06-16 07:52:01 +00:00
|
|
|
worldmap-save.c
|
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})
|