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