File indexing completed on 2025-01-12 06:47:24
0001 // 0002 // C++ Interface: calias 0003 // 0004 // Description: 0005 // 0006 /* 0007 Copyright 2002-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 CALIAS_H 0024 #define CALIAS_H 0025 0026 #include <clistobject.h> 0027 #include <kmuddy_export.h> 0028 0029 /** 0030 This class represents one alias. 0031 *@author Tomas Mecir 0032 */ 0033 0034 class KMUDDY_EXPORT cAlias : public cListObject { 0035 public: 0036 ~cAlias () override; 0037 0038 protected: 0039 friend class cAliasList; 0040 cAlias (cList *list); 0041 0042 void updateVisibleName () override; 0043 0044 /** React on an attribute change by updating the pattern object. */ 0045 void attribChanged (const QString &name) override; 0046 0047 #define ALIAS_MATCH 1 0048 0049 cList::TraverseAction traverse (int traversalType) override; 0050 0051 /** Perform alias matching. */ 0052 cList::TraverseAction doMatch (); 0053 0054 bool testCondition (); 0055 0056 /** Execute the alias. */ 0057 void executeAlias (); 0058 0059 struct Private; 0060 Private *d; 0061 }; 0062 0063 #endif