File indexing completed on 2025-03-09 03:49:42
0001 /* 0002 SPDX-FileCopyrightText: 1998-2000 Anders Widell <awl@hem.passagen.se> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef INTERNALCOLLECTIONS_H 0008 #define INTERNALCOLLECTIONS_H 0009 0010 #include "LevelCollection.h" 0011 0012 #include <QString> 0013 #include <QByteArray> 0014 #include <QVector> 0015 0016 #include <cassert> 0017 0018 class InternalCollections 0019 { 0020 public: 0021 InternalCollections(); 0022 ~InternalCollections(); 0023 0024 public: 0025 static int toInternalId(int _id) 0026 { 0027 if (_id < 10 || _id > 14) 0028 return 1000; 0029 return _id - 10; 0030 } 0031 0032 int collections() const; 0033 LevelCollection *operator[](int n) const; 0034 0035 private: 0036 void add(LevelCollection *c); 0037 0038 static int configCollection2Real(int collection); 0039 static int realCollection2Config(int collection); 0040 static QString collectionName(int _level); 0041 0042 private: 0043 QVector<LevelCollection *> collections_; 0044 QByteArray m_data; 0045 }; 0046 0047 #endif /* INTERNALCOLLECTIONS_H */