filter: add primitive filter presets

Add a rudimentary list of filter presets to the core. The list
is sorted by name. Access is provided via a C interface so that
the presets can be written to the git and XML logs. Internally,
the list is realized by a C++ vector for convenience (euphemism for
laziness).

Morover, a C++ interface is provided for the UI. Currently names of
the presets cannot be edited, since this would mean that the order
of the list changes. This may be implemented later if required.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-05-26 18:32:52 +02:00 committed by Dirk Hohndel
parent 634e26cbce
commit 937fdb500b
5 changed files with 223 additions and 0 deletions

View file

@ -7,6 +7,7 @@
#include "device.h"
#include "divesite.h"
#include "dive.h"
#include "filterpreset.h"
#include "fulltext.h"
#include "planner.h"
#include "qthelper.h"
@ -1376,6 +1377,7 @@ void clear_dive_file_data()
clear_dive(&displayed_dive);
clear_device_nodes();
clear_events();
clear_filter_presets();
reset_min_datafile_version();
clear_git_id();