andrewm@0: /* andrewm@0: TouchKeys: multi-touch musical keyboard control software andrewm@0: Copyright (c) 2013 Andrew McPherson andrewm@0: andrewm@0: This program is free software: you can redistribute it and/or modify andrewm@0: it under the terms of the GNU General Public License as published by andrewm@0: the Free Software Foundation, either version 3 of the License, or andrewm@0: (at your option) any later version. andrewm@0: andrewm@0: This program is distributed in the hope that it will be useful, andrewm@0: but WITHOUT ANY WARRANTY; without even the implied warranty of andrewm@0: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the andrewm@0: GNU General Public License for more details. andrewm@0: andrewm@0: You should have received a copy of the GNU General Public License andrewm@0: along with this program. If not, see . andrewm@0: andrewm@0: ===================================================================== andrewm@0: andrewm@0: TouchkeyMultiFingerTriggerMappingFactory.cpp: factory for the multiple- andrewm@0: finger trigger mapping, which performs actions when two or more fingers andrewm@0: are added or removed from the key. andrewm@0: */ andrewm@0: andrewm@0: #include "TouchkeyMultiFingerTriggerMappingFactory.h" andrewm@36: andrewm@36: // ****** Preset Save/Load ****** andrewm@36: XmlElement* TouchkeyMultiFingerTriggerMappingFactory::getPreset() { andrewm@36: PropertySet properties; andrewm@36: andrewm@36: storeCommonProperties(properties); andrewm@36: andrewm@36: // No properties for now andrewm@36: andrewm@36: XmlElement* preset = properties.createXml("MappingFactory"); andrewm@36: preset->setAttribute("type", "MultiFingerTrigger"); andrewm@36: andrewm@36: return preset; andrewm@36: } andrewm@36: andrewm@36: bool TouchkeyMultiFingerTriggerMappingFactory::loadPreset(XmlElement const* preset) { andrewm@36: if(preset == 0) andrewm@36: return false; andrewm@36: andrewm@36: PropertySet properties; andrewm@36: properties.restoreFromXml(*preset); andrewm@36: andrewm@36: if(!loadCommonProperties(properties)) andrewm@36: return false; andrewm@36: andrewm@36: // Nothing specific to do for now andrewm@36: andrewm@36: return true; andrewm@36: }