Mercurial > hg > touchkeys
comparison Source/Mappings/MultiFingerTrigger/TouchkeyMultiFingerTriggerMappingFactory.cpp @ 36:0deac2806a7b
Preset support for the rest of the mappings.
author | Andrew McPherson <andrewm@eecs.qmul.ac.uk> |
---|---|
date | Fri, 21 Mar 2014 12:53:50 +0000 |
parents | 3580ffe87dc8 |
children | 1526d2fbe01e |
comparison
equal
deleted
inserted
replaced
35:3f948746885a | 36:0deac2806a7b |
---|---|
21 finger trigger mapping, which performs actions when two or more fingers | 21 finger trigger mapping, which performs actions when two or more fingers |
22 are added or removed from the key. | 22 are added or removed from the key. |
23 */ | 23 */ |
24 | 24 |
25 #include "TouchkeyMultiFingerTriggerMappingFactory.h" | 25 #include "TouchkeyMultiFingerTriggerMappingFactory.h" |
26 | |
27 // ****** Preset Save/Load ****** | |
28 XmlElement* TouchkeyMultiFingerTriggerMappingFactory::getPreset() { | |
29 PropertySet properties; | |
30 | |
31 storeCommonProperties(properties); | |
32 | |
33 // No properties for now | |
34 | |
35 XmlElement* preset = properties.createXml("MappingFactory"); | |
36 preset->setAttribute("type", "MultiFingerTrigger"); | |
37 | |
38 return preset; | |
39 } | |
40 | |
41 bool TouchkeyMultiFingerTriggerMappingFactory::loadPreset(XmlElement const* preset) { | |
42 if(preset == 0) | |
43 return false; | |
44 | |
45 PropertySet properties; | |
46 properties.restoreFromXml(*preset); | |
47 | |
48 if(!loadCommonProperties(properties)) | |
49 return false; | |
50 | |
51 // Nothing specific to do for now | |
52 | |
53 return true; | |
54 } |