File indexing completed on 2024-11-24 03:46:28

0001 /*
0002     SPDX-FileCopyrightText: 1998 Anders Widell <awl@hem.passagen.se>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef BOOKMARK_H
0008 #define BOOKMARK_H
0009 
0010 #include <QString>
0011 
0012 class History;
0013 class LevelMap;
0014 
0015 class Bookmark
0016 {
0017 public:
0018     explicit Bookmark(int _num);
0019 
0020 public:
0021     int collection() const
0022     {
0023         return collection_;
0024     }
0025     int level() const
0026     {
0027         return level_;
0028     }
0029     int moves() const
0030     {
0031         return moves_;
0032     }
0033     // int pushes() { return pushes_; }
0034 
0035     void set(int _collection, int _level, int _moves, History *_h);
0036     bool goTo(LevelMap *_map, History *_h);
0037 
0038 private:
0039     void fileName(QString &p) const;
0040 
0041 private:
0042     int number_;
0043     int collection_ = -1;
0044     int level_ = -1;
0045     int moves_ = 0;
0046     // int     pushes_;
0047     QString data_;
0048 };
0049 
0050 #endif /* BOOKMARK_H */