aboutsummaryrefslogtreecommitdiffstats
path: root/subsurface-mobile-main.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-06-08 23:07:46 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-09-29 16:13:03 -0700
commit448bc5600bb2d0dccac39559e865df412d8e1363 (patch)
tree64168d94656a7b6189b7aa12d092efae5546b87b /subsurface-mobile-main.cpp
parent142f76374c72499358154f239f1c4726995e427e (diff)
downloadsubsurface-448bc5600bb2d0dccac39559e865df412d8e1363.tar.gz
filter: implement saving of presets to XML file
Users might want to move their presets with there log-file. Therefore, save the presets to the log. The alternative would be to save them to the preferences. However, on the mailinglist it was decided that moving the presets to a mobile device is a wanted feature. The XML saving code has a rather reasonable interface, therefore this turned out to be pretty easy to implement. The filter presets are saved into a <filterpresets> ... </filterpresets> block Each individual preset is saved into a <filterpreset name='...'> ... </filterpreset> Block with a unique name attribute. Each preset contains zero or one fulltext and zero or more constraint entries. The type and mode(s) are controlled by attributes, the "payload" is saved in the block. Note that all the formatting is done by functions in core/filterconstraint.c and not the parser itself. A preset in the XML file might look like this: <filterpreset name='test1'> <fulltext mode='startswith'>Train</fulltext> <constraint type='planned'>0,0</constraint> <constraint type='sac' range_mode='range' negate='1'>5000,10000</constraint> </filterpreset> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'subsurface-mobile-main.cpp')
0 files changed, 0 insertions, 0 deletions