File indexing completed on 2021-12-21 12:50:20

0001 /*
0002  *  ksokoban - a Sokoban game by KDE
0003  *  Copyright (C) 1998  Anders Widell  <awl@hem.passagen.se>
0004  *
0005  *  This program is free software; you can redistribute it and/or modify
0006  *  it under the terms of the GNU General Public License as published by
0007  *  the Free Software Foundation; either version 2 of the License, or
0008  *  (at your option) any later version.
0009  *
0010  *  This program is distributed in the hope that it will be useful,
0011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
0012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0013  *  GNU General Public License for more details.
0014  *
0015  *  You should have received a copy of the GNU General Public License
0016  *  along with this program; if not, write to the Free Software
0017  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
0018  */
0019 
0020 #ifndef BOOKMARK_H
0021 #define BOOKMARK_H
0022 
0023 class History;
0024 class LevelMap;
0025 
0026 #include <QString>
0027 
0028 class Bookmark {
0029 public:
0030   Bookmark(int _num);
0031 
0032   int collection() const { return collection_; }
0033   int level() const { return level_; }
0034   int moves() const { return moves_; }
0035   //int pushes() { return pushes_; }
0036 
0037   void set(int _collection, int _level, int _moves, History *_h);
0038   bool goTo(LevelMap *_map, History *_h);
0039 
0040 private:
0041   void fileName(QString &p);
0042 
0043   int     number_;
0044   int     collection_;
0045   int     level_;
0046   int     moves_;
0047   //int     pushes_;
0048   QString data_;
0049 };
0050 
0051 #endif  /* BOOKMARK_H */