Crossfire Server, Trunk  R20513
QuestManager.h
Go to the documentation of this file.
1 #ifndef _QUESTMANAGER_H
2 #define _QUESTMANAGER_H
3 
4 #include <QList>
5 #include <QHash>
6 class Quest;
7 
9 {
10  public:
11  QuestManager();
12  virtual ~QuestManager();
13 
14  void loadQuests();
15  void saveQuests();
16  QList<const Quest*> quests() const;
17  QList<Quest*>& quests();
18  Quest* getByCode(const QString& code);
19  QStringList getFiles() const;
20  QString getQuestFile(Quest* quest) const;
21  void setQuestFile(Quest* quest, const QString& file);
22  Quest* findByCode(const QString& code);
23 
24  private:
25  QList<Quest*> myQuests;
26  QHash<QString, QList<Quest*>*> myFiles;
27  QHash<QString, QStringList> myIncludes;
28 
29  void loadQuestFile(const QString& filename);
30  void saveQuestFile(const QString& filename);
31  void addQuest(const QString& filename, Quest* quest);
32 };
33 
34 #endif /* _QUESTMANAGER_H */
Definition: Quest.h:32
QString getQuestFile(Quest *quest) const
void loadQuestFile(const QString &filename)
void loadQuests()
Quest * findByCode(const QString &code)
QHash< QString, QList< Quest * > * > myFiles
Definition: QuestManager.h:26
void setQuestFile(Quest *quest, const QString &file)
QHash< QString, QStringList > myIncludes
Definition: QuestManager.h:27
virtual ~QuestManager()
void saveQuestFile(const QString &filename)
void addQuest(const QString &filename, Quest *quest)
QList< Quest * > myQuests
Definition: QuestManager.h:25
QList< const Quest * > quests() const
QStringList getFiles() const
Quest * getByCode(const QString &code)