Crossfire Server, Trunk
|
#include <MessageManager.h>
Public Member Functions | |
virtual AssetWrapper * | child (int child) override |
virtual int | childIndex (AssetWrapper *child) override |
virtual int | childrenCount () const override |
virtual QString | displayName () const override |
MessageFile * | findMessage (const QString &path) |
void | loadMessages () |
MessageManager (AssetWrapper *parent) | |
QList< MessageFile * > & | messages () |
const QList< MessageFile * > & | messages () const |
QList< QuestConditionScript * > | postConditions () const |
QList< QuestConditionScript * > | preConditions () const |
void | saveMessages () |
virtual PossibleUse | uses (const AssetWrapper *asset, std::string &) const override |
virtual | ~MessageManager () |
Public Member Functions inherited from AssetWrapper | |
AssetWrapper (AssetWrapper *parent, const QString &panelName="empty") | |
virtual bool | canDrag () const |
virtual bool | canDrop (const QMimeData *, int) const |
virtual QIcon | displayIcon () const |
virtual QString | displayPanelName () const |
AssetWrapper * | displayParent () const |
virtual void | drag (QMimeData *) const |
virtual void | drop (const QMimeData *, int) |
virtual void | fillMenu (QMenu *) |
void | markModified (ChangeType change, int extra=0) |
AssetWrapper * | self () |
void | setDisplayParent (AssetWrapper *parent) |
virtual | ~AssetWrapper () override |
Private Member Functions | |
void | findPrePost (const QString directory, QList< QuestConditionScript * > &list) |
void | loadDirectory (const QString &directory) |
QString | loadScriptComment (const QString &path) const |
Private Attributes | |
QList< MessageFile * > | myMessages |
QList< QuestConditionScript * > | myPostConditions |
QList< QuestConditionScript * > | myPreConditions |
Additional Inherited Members | |
Public Types inherited from AssetWrapper | |
enum | ChangeType { AssetUpdated, BeforeChildAdd, AfterChildAdd, BeforeChildRemove, AfterChildRemove, BeforeLayoutChange, AfterLayoutChange } |
enum | PossibleUse { Uses, ChildrenMayUse, DoesntUse } |
Public Slots inherited from AssetWrapper | |
virtual void | removeChild (AssetWrapper *) |
Signals inherited from AssetWrapper | |
void | dataModified (AssetWrapper *asset, AssetWrapper::ChangeType type, int extra) |
void | modified () |
Static Public Member Functions inherited from AssetWrapper | |
static bool | compareByDisplayName (const AssetWrapper *left, const AssetWrapper *right) |
Static Public Attributes inherited from AssetWrapper | |
static const char * | tipProperty = "_cre_internal" |
Protected Member Functions inherited from AssetWrapper | |
virtual void | wasModified (AssetWrapper *asset, ChangeType type, int extra) |
Protected Attributes inherited from AssetWrapper | |
QString | myPanelName |
AssetWrapper * | myParent |
Properties inherited from AssetWrapper | |
QString | displayName |
AssetWrapper | self |
Manage NPC dialogs.
Definition at line 25 of file MessageManager.h.
MessageManager::MessageManager | ( | AssetWrapper * | parent | ) |
Definition at line 23 of file MessageManager.cpp.
References AssetWrapper::tipProperty.
|
virtual |
Definition at line 27 of file MessageManager.cpp.
References myMessages, myPostConditions, and myPreConditions.
|
inlineoverridevirtual |
Reimplemented from AssetWrapper.
Definition at line 34 of file MessageManager.h.
References child(), and myMessages.
Referenced by child(), and childIndex().
|
inlineoverridevirtual |
Reimplemented from AssetWrapper.
Definition at line 35 of file MessageManager.h.
References child(), and myMessages.
|
inlineoverridevirtual |
Reimplemented from AssetWrapper.
Definition at line 33 of file MessageManager.h.
References myMessages.
|
inlineoverridevirtual |
Implements AssetWrapper.
Definition at line 31 of file MessageManager.h.
MessageFile * MessageManager::findMessage | ( | const QString & | path | ) |
Get the dialog from a file path.
path | path to get the dialog from. |
Definition at line 61 of file MessageManager.cpp.
References mad_mage_user::file, myMessages, and python_init::path.
Referenced by CREMapInformationManager::checkEvent(), and CREMapInformationManager::loadCache().
|
private |
Definition at line 134 of file MessageManager.cpp.
References Settings::datadir, mad_mage_user::file, guildoracle::list, loadScriptComment(), Settings::mapdir, and settings.
Referenced by loadMessages().
|
private |
Definition at line 72 of file MessageManager.cpp.
References Settings::datadir, mad_mage_user::file, Settings::mapdir, diamondslots::message, messages(), myMessages, python_init::path, and settings.
Referenced by loadMessages().
void MessageManager::loadMessages | ( | ) |
Load all messages from the 'maps' directory.
Definition at line 34 of file MessageManager.cpp.
References findPrePost(), loadDirectory(), myPostConditions, and myPreConditions.
Referenced by CREMainWindow::CREMainWindow().
|
private |
Definition at line 111 of file MessageManager.cpp.
References mad_mage_user::file, is_valid_types_gen::line, and python_init::path.
Referenced by findPrePost().
const QList< MessageFile * > & MessageManager::messages | ( | ) |
Get all known NPC dialogs.
Definition at line 51 of file MessageManager.cpp.
References myMessages.
Referenced by CREResourcesWindow::addMessage(), loadDirectory(), and CREMessagePanel::updateItem().
const QList<MessageFile*>& MessageManager::messages | ( | ) | const |
Get all known NPC dialogs.
QList< QuestConditionScript * > MessageManager::postConditions | ( | ) | const |
Get all dialog post-conditions.
Definition at line 106 of file MessageManager.cpp.
References myPostConditions.
Referenced by CREPrePostSingleConditionDelegate::createEditor().
QList< QuestConditionScript * > MessageManager::preConditions | ( | ) | const |
Get all dialog pre-conditions.
Definition at line 101 of file MessageManager.cpp.
References myPreConditions.
Referenced by CREPrePostSingleConditionDelegate::createEditor().
void MessageManager::saveMessages | ( | ) |
Save all messages.
Definition at line 43 of file MessageManager.cpp.
References mad_mage_user::file, and myMessages.
Referenced by CREMainWindow::onSaveMessages().
|
overridevirtual |
Reimplemented from AssetWrapper.
Definition at line 144 of file MessageManager.cpp.
References AssetWrapper::ChildrenMayUse, and AssetWrapper::DoesntUse.
|
private |
Definition at line 73 of file MessageManager.h.
Referenced by child(), childIndex(), childrenCount(), findMessage(), loadDirectory(), messages(), saveMessages(), and ~MessageManager().
|
private |
Definition at line 75 of file MessageManager.h.
Referenced by loadMessages(), postConditions(), and ~MessageManager().
|
private |
Definition at line 74 of file MessageManager.h.
Referenced by loadMessages(), preConditions(), and ~MessageManager().