Crossfire Server, Trunk
|
#include <ScriptFileManager.h>
Public Slots | |
void | addHook (const QString &file, HookInformation *hook) |
Public Slots inherited from AssetWrapper | |
virtual void | removeChild (AssetWrapper *) |
Public Member Functions | |
virtual AssetWrapper * | child (int child) |
virtual int | childIndex (AssetWrapper *child) |
virtual int | childrenCount () const |
virtual QString | displayName () const override |
ScriptFile * | getFile (const QString &path) |
void | removeMap (CREMapInformation *map) |
ScriptFileManager (AssetWrapper *parent) | |
QList< ScriptFile * > | scripts () const |
QList< ScriptFile * > | scriptsForMap (CREMapInformation *map) |
virtual | ~ScriptFileManager () |
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 PossibleUse | uses (const AssetWrapper *, std::string &) const |
virtual | ~AssetWrapper () override |
Private Attributes | |
QHash< QString, ScriptFile * > | myScripts |
Additional Inherited Members | |
Public Types inherited from AssetWrapper | |
enum | ChangeType { AssetUpdated, BeforeChildAdd, AfterChildAdd, BeforeChildRemove, AfterChildRemove, BeforeLayoutChange, AfterLayoutChange } |
enum | PossibleUse { Uses, ChildrenMayUse, DoesntUse } |
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 scripts for items.
Definition at line 26 of file ScriptFileManager.h.
ScriptFileManager::ScriptFileManager | ( | AssetWrapper * | parent | ) |
Definition at line 17 of file ScriptFileManager.cpp.
References AssetWrapper::tipProperty.
|
virtual |
Definition at line 21 of file ScriptFileManager.cpp.
References myScripts.
|
slot |
Definition at line 73 of file ScriptFileManager.cpp.
References ScriptFile::addHook(), mad_mage_user::file, and getFile().
|
inlinevirtual |
Reimplemented from AssetWrapper.
Definition at line 35 of file ScriptFileManager.h.
References child(), and myScripts.
Referenced by child(), and childIndex().
|
inlinevirtual |
Reimplemented from AssetWrapper.
Definition at line 36 of file ScriptFileManager.h.
References child(), and myScripts.
|
inlinevirtual |
Reimplemented from AssetWrapper.
Definition at line 34 of file ScriptFileManager.h.
References myScripts.
|
inlineoverridevirtual |
Implements AssetWrapper.
Definition at line 33 of file ScriptFileManager.h.
ScriptFile * ScriptFileManager::getFile | ( | const QString & | path | ) |
Get information about a script path.
path | full script path. |
Definition at line 39 of file ScriptFileManager.cpp.
References AssetWrapper::AfterChildAdd, AssetWrapper::BeforeChildAdd, AssetWrapper::markModified(), myScripts, and python_init::path.
Referenced by addHook().
void ScriptFileManager::removeMap | ( | CREMapInformation * | map | ) |
Remove scripts linked to a map.
map | map to remove scripts of. |
Definition at line 50 of file ScriptFileManager.cpp.
References disinfect::map, and myScripts.
Referenced by CREMapInformationManager::process().
QList< ScriptFile * > ScriptFileManager::scripts | ( | ) | const |
Definition at line 68 of file ScriptFileManager.cpp.
References myScripts.
QList< ScriptFile * > ScriptFileManager::scriptsForMap | ( | CREMapInformation * | map | ) |
Definition at line 26 of file ScriptFileManager.cpp.
References ScriptFile::forMap(), guildoracle::list, disinfect::map, and myScripts.
Referenced by CREMapInformationManager::storeCache(), and CREMapPanel::updateItem().
|
private |
Definition at line 59 of file ScriptFileManager.h.
Referenced by child(), childIndex(), childrenCount(), getFile(), removeMap(), scripts(), scriptsForMap(), and ~ScriptFileManager().