![]() |
Crossfire Resources Editor
|
One NPC dialog file, mostly a collection of MessageRule. More...
#include <MessageFile.h>
Inheritance diagram for MessageFile:
Collaboration diagram for MessageFile:Public Member Functions | |
| void | copy (const MessageFile *other) |
| virtual QString | displayName () const override |
| MessageFile * | duplicate () const |
| bool | isModified () const |
| const QString & | location () const |
| QList< CREMapInformation * > & | maps () |
| MessageFile (AssetWrapper *parent, const QString &path) | |
| Standard constructor. More... | |
| bool | parseFile () |
| Parse the message file. More... | |
| const QString & | path () const |
| QList< MessageRule * > & | rules () |
| void | save () |
| void | setLocation (const QString &location) |
| void | setModified (bool modified=true) |
| void | setPath (const QString &path) |
| virtual PossibleUse | uses (const AssetWrapper *asset, std::string &) const override |
| virtual | ~MessageFile () |
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 bool | canExportAsCsv () const |
| virtual AssetWrapper * | child (int) |
| virtual int | childIndex (AssetWrapper *) |
| virtual int | childrenCount () 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 | exportAsCSV (const AssetWrapper *, QString &) const |
| virtual void | fillCsvHeader (QString &) const |
| virtual void | fillMenu (QMenu *) |
| void | markModified (ChangeType change, int extra=0) |
| AssetWrapper * | self () |
| void | setDisplayParent (AssetWrapper *parent) |
| virtual QString | tooltip () const |
| virtual | ~AssetWrapper () override |
Properties | |
| QString | location |
| QString | path |
Properties inherited from AssetWrapper | |
| QString | displayName |
| AssetWrapper | self |
Private Attributes | |
| bool | myIsModified |
| QString | myLocation |
| QList< CREMapInformation * > | myMaps |
| QString | myPath |
| QList< MessageRule * > | myRules |
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 |
One NPC dialog file, mostly a collection of MessageRule.
Once a MessageFile is created, parseFile() must be called.
Definition at line 68 of file MessageFile.h.
| MessageFile::MessageFile | ( | AssetWrapper * | parent, |
| const QString & | path | ||
| ) |
Standard constructor.
| parent | parent of this item. |
| path | NPC dialog path. |
Definition at line 127 of file MessageFile.cpp.
References myIsModified, myPath, and path.
Referenced by duplicate().
Here is the caller graph for this function:
|
virtual |
Definition at line 132 of file MessageFile.cpp.
References myRules.
| void MessageFile::copy | ( | const MessageFile * | other | ) |
Definition at line 147 of file MessageFile.cpp.
References myLocation, myMaps, myPath, and myRules.
Referenced by duplicate(), and CREMessagePanel::onReset().
Here is the caller graph for this function:
|
inlineoverridevirtual |
| MessageFile * MessageFile::duplicate | ( | ) | const |
Definition at line 137 of file MessageFile.cpp.
References copy(), MessageFile(), myLocation, myMaps, myPath, and myRules.
Referenced by CREMessagePanel::updateItem().
Here is the call graph for this function:
Here is the caller graph for this function:| bool MessageFile::isModified | ( | ) | const |
Definition at line 389 of file MessageFile.cpp.
References myIsModified.
| const QString& MessageFile::location | ( | ) | const |
| QList< CREMapInformation * > & MessageFile::maps | ( | ) |
Definition at line 271 of file MessageFile.cpp.
References myMaps.
Referenced by CREMapInformationManager::checkEvent(), CREMapInformationManager::loadCache(), and CREMessagePanel::updateItem().
Here is the caller graph for this function:| bool MessageFile::parseFile | ( | ) |
Parse the message file.
Definition at line 203 of file MessageFile.cpp.
References convert(), myLocation, myPath, myRules, rules(), MessageRule::setComment(), MessageRule::setInclude(), MessageRule::setMatch(), MessageRule::setMessages(), MessageRule::setPostconditions(), MessageRule::setPreconditions(), and MessageRule::setReplies().
Referenced by MessageManager::loadDirectory().
Here is the call graph for this function:
Here is the caller graph for this function:| const QString& MessageFile::path | ( | ) | const |
| QList< MessageRule * > & MessageFile::rules | ( | ) |
Definition at line 266 of file MessageFile.cpp.
References myRules.
Referenced by CREMessageItemModel::data(), CREMessageItemModel::duplicateRow(), CREMessageItemModel::insertRows(), CREMessageItemModel::moveUpDown(), CREMessagePanel::onDuplicate(), CREMessagePanel::onMoveDown(), CREMessagePanel::onMoveUp(), parseFile(), CREMessageItemModel::removeRows(), CREMessageItemModel::rowCount(), save(), CREMessageItemModel::setData(), CREMessageItemModel::setSelectedRule(), and CREMessagePanel::updateItem().
Here is the caller graph for this function:| void MessageFile::save | ( | ) |
Definition at line 349 of file MessageFile.cpp.
References convert(), MessageRule::isModified(), myIsModified, myLocation, myPath, myRules, rules(), MessageRule::setModified(), and setModified().
Referenced by MessageManager::saveMessages().
Here is the call graph for this function:
Here is the caller graph for this function:| void MessageFile::setLocation | ( | const QString & | location | ) |
Definition at line 177 of file MessageFile.cpp.
References location, myLocation, and setModified().
Here is the call graph for this function:| void MessageFile::setModified | ( | bool | modified = true | ) |
Definition at line 394 of file MessageFile.cpp.
References AssetWrapper::modified(), and myIsModified.
Referenced by CREMessageItemModel::duplicateRow(), CREMessageItemModel::insertRows(), CREMessageItemModel::moveUpDown(), CREMessageItemModel::removeRows(), save(), CREMessageItemModel::setData(), setLocation(), and setPath().
Here is the caller graph for this function:| void MessageFile::setPath | ( | const QString & | path | ) |
Definition at line 168 of file MessageFile.cpp.
References myPath, path, and setModified().
Here is the call graph for this function:
|
overridevirtual |
Reimplemented from AssetWrapper.
Definition at line 399 of file MessageFile.cpp.
References AssetWrapper::DoesntUse, myRules, MessageRule::postconditions(), MessageRule::preconditions(), and AssetWrapper::Uses.
Here is the call graph for this function:
|
private |
Definition at line 110 of file MessageFile.h.
Referenced by isModified(), MessageFile(), save(), and setModified().
|
private |
Definition at line 112 of file MessageFile.h.
Referenced by copy(), duplicate(), parseFile(), save(), and setLocation().
|
private |
Definition at line 114 of file MessageFile.h.
Referenced by copy(), duplicate(), and maps().
|
private |
Definition at line 111 of file MessageFile.h.
Referenced by copy(), displayName(), duplicate(), MessageFile(), parseFile(), save(), and setPath().
|
private |
Definition at line 113 of file MessageFile.h.
Referenced by copy(), duplicate(), parseFile(), rules(), save(), uses(), and ~MessageFile().
|
readwrite |
Definition at line 72 of file MessageFile.h.
Referenced by setLocation().
|
readwrite |
Definition at line 71 of file MessageFile.h.
Referenced by MessageManager::findMessage(), MessageFile(), setPath(), and CREMessagePanel::updateItem().