File indexing completed on 2024-10-06 12:28:03
0001 // 0002 // C++ Interface: cgenericlist 0003 // 0004 // Description: A generic list that can only store data. 0005 // 0006 /* 0007 Copyright 2008-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 CGENERICLIST_H 0024 #define CGENERICLIST_H 0025 0026 #include <clist.h> 0027 0028 class cGenericList : public cList { 0029 public: 0030 cGenericList (); 0031 ~cGenericList () override; 0032 0033 static cList *newList () { return new cGenericList; }; 0034 cListObject *newObject () override; 0035 QString objName () override { return QString(); } 0036 cListEditor *editor (QWidget *) override { return nullptr; }; 0037 0038 void init (); 0039 /** Save the generic list into a file - we cannot use cListManager here. */ 0040 bool saveList (const QString &file); 0041 0042 void intProperty (const QString &name, int defaultValue = 0); 0043 void stringProperty (const QString &name, QString defaultValue = QString()); 0044 void boolProperty (const QString &name, bool defaultValue = false); 0045 }; 0046 0047 #endif // CGENERICLIST_H