File indexing completed on 2024-09-01 03:52:47
0001 // 0002 // C++ Interface: cvartrigger 0003 // 0004 // Description: One variable trigger. 0005 // 0006 /* 0007 Copyright 2004-2011 Tomas Mecir <kmuddy@kmuddy.com> 0008 0009 This program is free software; you can redistribute it and/or 0010 modify it under the terms of the GNU General Public License as 0011 published by the Free Software Foundation; either version 2 of 0012 the License, or (at your option) any later version. 0013 0014 This program is distributed in the hope that it will be useful, 0015 but WITHOUT ANY WARRANTY; without even the implied warranty of 0016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0017 GNU General Public License for more details. 0018 0019 You should have received a copy of the GNU General Public License 0020 along with this program. If not, see <http://www.gnu.org/licenses/>. 0021 */ 0022 0023 #ifndef CVARTRIGGER_H 0024 #define CVARTRIGGER_H 0025 0026 #include "csaveablefield.h" 0027 0028 /** 0029 This class represents one variable trigger. 0030 0031 0032 @author Tomas Mecir 0033 */ 0034 class cVarTrigger : public cSaveableField 0035 { 0036 public: 0037 /** constructor */ 0038 cVarTrigger (int _sess); 0039 /** destructor */ 0040 ~cVarTrigger () override; 0041 0042 /** creates a new instance of the class */ 0043 cSaveableField *newInstance () override; 0044 0045 /** load data from a config file */ 0046 void load (KConfig *config, const QString &group) override; 0047 0048 /** abstract; returns type of item (light-weight RTTI) */ 0049 int itemType () override { return TYPE_VARTRIG; }; 0050 0051 void setVarName (const QString &varname); 0052 QString varName () { return var; }; 0053 0054 //commands are implemented via newText/setNewText 0055 0056 protected: 0057 QString var; 0058 0059 int sess; 0060 }; 0061 0062 #endif