mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
634152ae43
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> |
||
---|---|---|
.. | ||
android | ||
headless | ||
ios | ||
macosx | ||
OBS | ||
ubuntu | ||
windows |