Crossfire Server, Trunk  R21120
CREMapInformation.h
Go to the documentation of this file.
1 #ifndef CLASS_CRE_MAP_INFORMATION_H
2 #define CLASS_CRE_MAP_INFORMATION_H
3 
4 #include <QObject>
5 #include <QString>
6 #include <QStringList>
7 #include <QDateTime>
8 #include <QHash>
9 
10 class CRERandomMap;
11 
12 class CREMapInformation : public QObject
13 {
14  Q_OBJECT
15 
16  Q_PROPERTY(QString path READ path)
17  Q_PROPERTY(QString name READ name)
18  Q_PROPERTY(int level READ level)
19  Q_PROPERTY(qint64 experience READ experience)
20 
21  public:
23  CREMapInformation(const QString& path);
24 
25  CREMapInformation* clone() const;
26 
27  const QString& displayName() const;
28 
29  const QString& path() const;
30  void setPath(const QString& path);
31 
32  const QString& name() const;
33  void setName(const QString& name);
34 
35  const QString& backgroundMusic();
36  void setBackgroundMusic(const QString& music);
37 
38  QStringList archetypes() const;
39  void addArchetype(const QString& archetype);
40 
41  const QDateTime& mapTime() const;
42  void setMapTime(const QDateTime& date);
43 
44  QStringList exitsTo() const;
45  void addExitTo(const QString& path);
46 
47  QStringList accessedFrom() const;
48  void addAccessedFrom(const QString& path);
49 
50  int level() const;
51  void setLevel(int level);
52 
53  qint64 experience() const;
54  void setExperience(qint64 experience);
55 
56  const QString& region() const;
57  void setRegion(const QString& region);
58 
59  QStringList messages() const;
60  void addMessage(const QString& message);
61 
62  QStringList quests() const;
63  void addQuest(const QString& quest);
64 
65  QHash<QString, int>& shopItems();
66  const QHash<QString, int>& shopItems() const;
67 
68  double shopGreed() const;
69  void setShopGreed(double greed);
70  const QString& shopRace() const;
71  void setShopRace(const QString& race);
72  quint64 shopMin() const;
73  void setShopMin(quint64 min);
74  quint64 shopMax() const;
75  void setShopMax(quint64 max);
76 
77  QList<CRERandomMap*> randomMaps() const;
78  void addRandomMap(CRERandomMap* map);
79 
80  protected:
81  QString myPath;
82  QString myName;
83  QStringList myArchetypes;
84  QDateTime myMapTime;
85  QStringList myExitsTo;
86  QStringList myAccessedFrom;
87  int myLevel;
88  qint64 myExperience;
89  QString myRegion;
90  QStringList myMessages;
91  QStringList myQuests;
92  QHash<QString, int> myShopItems;
93  double myShopGreed;
94  QString myShopRace;
95  quint64 myShopMin, myShopMax;
98 
99  void copy(const CREMapInformation& other);
100 };
101 
102 #endif // CLASS_CRE_MAP_INFORMATION_H
QStringList myMessages
quint64 shopMax() const
QStringList myAccessedFrom
QList< CRERandomMap * > randomMaps() const
const QString & name() const
int level() const
double shopGreed() const
const QString & backgroundMusic()
QStringList exitsTo() const
QStringList myArchetypes
CREMapInformation * clone() const
const QString & shopRace() const
QStringList archetypes() const
QHash< QString, int > myShopItems
qint64 experience() const
void setPath(const QString &path)
Definition: object.h:465
void copy(const CREMapInformation &other)
quint64 shopMin() const
void addMessage(const QString &message)
void setShopRace(const QString &race)
void addQuest(const QString &quest)
void setShopMin(quint64 min)
QStringList quests() const
const QString & path() const
Definition: map.h:276
QStringList messages() const
void setRegion(const QString &region)
void addRandomMap(CRERandomMap *map)
const QDateTime & mapTime() const
QStringList accessedFrom() const
void setName(const QString &name)
void setShopMax(quint64 max)
void addAccessedFrom(const QString &path)
void setMapTime(const QDateTime &date)
void addExitTo(const QString &path)
const QString & displayName() const
void setBackgroundMusic(const QString &music)
void setExperience(qint64 experience)
void addArchetype(const QString &archetype)
void setLevel(int level)
QList< CRERandomMap * > myRandomMaps
void setShopGreed(double greed)
QHash< QString, int > & shopItems()