Crossfire Server, Trunk
QuestManager Class Reference

#include <QuestManager.h>

+ Collaboration diagram for QuestManager:

Public Member Functions

QuestfindByCode (const QString &code)
 
QuestgetByCode (const QString &code)
 
QStringList getFiles () const
 
QString getQuestFile (Quest *quest) const
 
void loadQuests ()
 
 QuestManager ()
 
QList< Quest * > & quests ()
 
QList< const Quest * > quests () const
 
void saveQuests ()
 
void setQuestFile (Quest *quest, const QString &file)
 
virtual ~QuestManager ()
 

Private Member Functions

void addQuest (const QString &filename, Quest *quest)
 
void loadQuestFile (const QString &filename)
 
void saveQuestFile (const QString &filename)
 

Private Attributes

QHash< QString, QList< Quest * > * > myFiles
 
QHash< QString, QStringList > myIncludes
 
QList< Quest * > myQuests
 

Detailed Description

Definition at line 8 of file QuestManager.h.

Constructor & Destructor Documentation

◆ QuestManager()

QuestManager::QuestManager ( )

Definition at line 12 of file QuestManager.cpp.

◆ ~QuestManager()

QuestManager::~QuestManager ( )
virtual

Definition at line 16 of file QuestManager.cpp.

References myFiles, and myQuests.

Member Function Documentation

◆ addQuest()

void QuestManager::addQuest ( const QString &  filename,
Quest quest 
)
private

Definition at line 245 of file QuestManager.cpp.

References npc_dialog::filename, and myFiles.

Referenced by loadQuestFile(), and setQuestFile().

+ Here is the caller graph for this function:

◆ findByCode()

Quest * QuestManager::findByCode ( const QString &  code)

◆ getByCode()

Quest * QuestManager::getByCode ( const QString &  code)

Definition at line 222 of file QuestManager.cpp.

References myQuests.

Referenced by CREResourcesWindow::fillQuests(), and loadQuestFile().

+ Here is the caller graph for this function:

◆ getFiles()

QStringList QuestManager::getFiles ( ) const

Definition at line 356 of file QuestManager.cpp.

References myFiles.

Referenced by CREQuestPanel::CREQuestPanel().

+ Here is the caller graph for this function:

◆ getQuestFile()

QString QuestManager::getQuestFile ( Quest quest) const

Definition at line 361 of file QuestManager.cpp.

References mad_mage_user::file, and myFiles.

Referenced by CREQuestPanel::commitData(), CREQuestPanel::setItem(), and setQuestFile().

+ Here is the caller graph for this function:

◆ loadQuestFile()

◆ loadQuests()

void QuestManager::loadQuests ( )

Definition at line 22 of file QuestManager.cpp.

References loadQuestFile(), and myQuests.

Referenced by CREMainWindow::CREMainWindow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quests() [1/2]

QList<Quest*>& QuestManager::quests ( )

◆ quests() [2/2]

QList< Quest * > & QuestManager::quests ( ) const

Definition at line 232 of file QuestManager.cpp.

References myQuests.

Referenced by CREResourcesWindow::addQuest(), CREResourcesWindow::fillQuests(), CREMainWindow::onReportQuests(), and CRESubItemQuest::selectedQuestChanged().

+ Here is the caller graph for this function:

◆ saveQuestFile()

void QuestManager::saveQuestFile ( const QString &  filename)
private
Todo:
be smarter

Definition at line 258 of file QuestManager.cpp.

References c, Settings::datadir, QuestStep::description(), mad_mage_user::file, npc_dialog::filename, QuestStep::isCompletion(), guildoracle::list, Settings::mapdir, myFiles, myIncludes, python_event::path, settings, QuestStep::setWhen(), and QuestStep::step().

Referenced by saveQuests().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveQuests()

void QuestManager::saveQuests ( )

Definition at line 252 of file QuestManager.cpp.

References npc_dialog::filename, myFiles, and saveQuestFile().

Referenced by CREMainWindow::onSaveQuests().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setQuestFile()

void QuestManager::setQuestFile ( Quest quest,
const QString &  file 
)

Definition at line 371 of file QuestManager.cpp.

References addQuest(), mad_mage_user::file, and getQuestFile().

Referenced by CREQuestPanel::commitData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ myFiles

QHash<QString, QList<Quest*>*> QuestManager::myFiles
private

◆ myIncludes

QHash<QString, QStringList> QuestManager::myIncludes
private

Definition at line 27 of file QuestManager.h.

Referenced by loadQuestFile(), and saveQuestFile().

◆ myQuests

QList<Quest*> QuestManager::myQuests
private

Definition at line 25 of file QuestManager.h.

Referenced by findByCode(), getByCode(), loadQuestFile(), loadQuests(), quests(), and ~QuestManager().


The documentation for this class was generated from the following files: