1 /* 2 Actiona 3 Copyright (C) 2005 Jonathan Mercier-Ganady 4 5 Actiona is free software: you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation, either version 3 of the License, or 8 (at your option) any later version. 9 10 Actiona is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program. If not, see <http://www.gnu.org/licenses/>. 17 18 Contact : jmgr@jmgr.info 19 */ 20 21 #pragma once 22 23 #include "parameterdefinition.h" 24 #include "actiontools_global.h" 25 26 namespace ActionTools 27 { 28 class KeyEdit; 29 30 class ACTIONTOOLSSHARED_EXPORT KeyParameterDefinition : public ParameterDefinition 31 { 32 Q_OBJECT 33 34 public: 35 KeyParameterDefinition(const Name &name, QObject *parent); 36 37 void buildEditors(Script *script, QWidget *parent) override; 38 void load(const ActionInstance *actionInstance) override; 39 void save(ActionInstance *actionInstance) override; 40 void setDefaultValues(ActionInstance *actionInstance) override; 41 42 private: 43 QString defaultValue(QString defaultValue = {}) const override { Q_UNUSED(defaultValue); return {}; } setDefaultValue(const QString & defaultValue)44 void setDefaultValue(const QString &defaultValue) override { Q_UNUSED(defaultValue); } 45 46 KeyEdit *mKeyEdit; 47 48 Q_DISABLE_COPY(KeyParameterDefinition) 49 }; 50 } 51 52