Crossfire Server, Trunk  R21226
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  virtual ~CREMapInformation();
25 
26  CREMapInformation* clone() const;
27 
28  const QString& displayName() const;
29 
30  const QString& path() const;
31  void setPath(const QString& path);
32 
33  const QString& name() const;
34  void setName(const QString& name);
35 
36  const QString& backgroundMusic();
37  void setBackgroundMusic(const QString& music);
38 
39  QStringList archetypes() const;
40  void addArchetype(const QString& archetype);
41 
42  const QDateTime& mapTime() const;
43  void setMapTime(const QDateTime& date);
44 
45  QStringList exitsTo() const;
46  void addExitTo(const QString& path);
47 
48  QStringList accessedFrom() const;
49  void addAccessedFrom(const QString& path);
50 
51  int level() const;
52  void setLevel(int level);
53 
54  qint64 experience() const;
55  void setExperience(qint64 experience);
56 
57  const QString& region() const;
58  void setRegion(const QString& region);
59 
60  QStringList messages() const;
61  void addMessage(const QString& message);
62 
63  QStringList quests() const;
64  void addQuest(const QString& quest);
65 
66  QHash<QString, int>& shopItems();
67  const QHash<QString, int>& shopItems() const;
68 
69  double shopGreed() const;
70  void setShopGreed(double greed);
71  const QString& shopRace() const;
72  void setShopRace(const QString& race);
73  quint64 shopMin() const;
74  void setShopMin(quint64 min);
75  quint64 shopMax() const;
76  void setShopMax(quint64 max);
77 
78  QList<CRERandomMap*> randomMaps() const;
79  void addRandomMap(CRERandomMap* map);
80 
81  protected:
82  QString myPath;
83  QString myName;
84  QStringList myArchetypes;
85  QDateTime myMapTime;
86  QStringList myExitsTo;
87  QStringList myAccessedFrom;
88  int myLevel;
89  qint64 myExperience;
90  QString myRegion;
91  QStringList myMessages;
92  QStringList myQuests;
93  QHash<QString, int> myShopItems;
94  double myShopGreed;
95  QString myShopRace;
96  quint64 myShopMin, myShopMax;
99 
100  void copy(const CREMapInformation& other);
101 };
102 
103 #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()