aboutsummaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-05-13 15:34:25 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-09-29 16:13:03 -0700
commit634152ae43f37a62a67de5a5d5fc4e6b02829ce0 (patch)
tree2fa04e8a9a00196bb2a1bbfff47c08330e28963c /packaging
parent0b7ba197751ea6ba57db1f9ec116dd791c3b53b7 (diff)
downloadsubsurface-634152ae43f37a62a67de5a5d5fc4e6b02829ce0.tar.gz
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>
Diffstat (limited to 'packaging')
-rw-r--r--packaging/ios/Subsurface-mobile.pro2
1 files changed, 2 insertions, 0 deletions
diff --git a/packaging/ios/Subsurface-mobile.pro b/packaging/ios/Subsurface-mobile.pro
index 322e2b9a2..68fc0ac4c 100644
--- a/packaging/ios/Subsurface-mobile.pro
+++ b/packaging/ios/Subsurface-mobile.pro
@@ -54,6 +54,7 @@ SOURCES += ../../subsurface-mobile-main.cpp \
../../core/device.cpp \
../../core/dive.c \
../../core/divefilter.cpp \
+ ../../core/filterconstraint.cpp \
../../core/divelist.c \
../../core/gas-model.c \
../../core/gaspressures.c \
@@ -217,6 +218,7 @@ HEADERS += \
../../core/deco.h \
../../core/display.h \
../../core/divefilter.h \
+ ../../core/filterconstraint.h \
../../core/divelist.h \
../../core/divelogexportlogic.h \
../../core/divesitehelpers.h \