File indexing completed on 2024-12-01 06:51:38
0001 /*************************************************************************** 0002 calias.h - One alias 0003 This file is a part of KMuddy distribution. 0004 ------------------- 0005 begin : Út sep 10 2002 0006 copyright : (C) 2002 by Tomas Mecir 0007 email : kmuddy@kmuddy.com 0008 ***************************************************************************/ 0009 0010 /*************************************************************************** 0011 * * 0012 * This program is free software; you can redistribute it and/or modify * 0013 * it under the terms of the GNU General Public License as published by * 0014 * the Free Software Foundation; either version 2 of the License, or * 0015 * (at your option) any later version. * 0016 * * 0017 ***************************************************************************/ 0018 0019 #ifndef CALIAS_H 0020 #define CALIAS_H 0021 0022 #include "csaveablefield.h" 0023 0024 /** 0025 This class represents one alias. It is derived from cSaveableField, and thus 0026 it knows how to load/save itself and how to perform alias matching (all sorts). 0027 *@author Tomas Mecir 0028 */ 0029 0030 class cAlias : public cSaveableField { 0031 public: 0032 cAlias (int _sess); 0033 ~cAlias () override; 0034 0035 /** creates a new instance of the class */ 0036 cSaveableField *newInstance () override; 0037 0038 /** load data from a config file*/ 0039 void load (KConfig *config, const QString &group) override; 0040 0041 /** returns type of item (light-weight RTTI) */ 0042 int itemType () override { return TYPE_ALIAS; }; 0043 0044 bool sendOriginal () { return sendoriginal; }; 0045 void setSendOriginal (bool what) { sendoriginal = what; }; 0046 bool wholeWords () { return wholewords; }; 0047 void setWholeWords (bool what) { wholewords = what; }; 0048 bool includePrefixSuffix () { return includeprefixsuffix; }; 0049 void setIncludePrefixSuffix (bool what) { includeprefixsuffix = what; }; 0050 protected: 0051 bool sendoriginal; 0052 bool wholewords; 0053 bool includeprefixsuffix; 0054 0055 int sess; 0056 }; 0057 0058 #endif