Crossfire Server, Trunk
ScriptFileManager Class Reference

#include <ScriptFileManager.h>

+ Inheritance diagram for ScriptFileManager:
+ Collaboration diagram for ScriptFileManager:

Public Slots

void addHook (const QString &file, HookInformation *hook)
 
- Public Slots inherited from AssetWrapper
virtual void removeChild (AssetWrapper *)
 

Public Member Functions

virtual AssetWrapperchild (int child)
 
virtual int childIndex (AssetWrapper *child)
 
virtual int childrenCount () const
 
virtual QString displayName () const override
 
ScriptFilegetFile (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
 
AssetWrapperdisplayParent () const
 
virtual void drag (QMimeData *) const
 
virtual void drop (const QMimeData *, int)
 
virtual void fillMenu (QMenu *)
 
void markModified (ChangeType change, int extra=0)
 
AssetWrapperself ()
 
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
 
AssetWrappermyParent
 
- Properties inherited from AssetWrapper
QString displayName
 
AssetWrapper self
 

Detailed Description

Manage scripts for items.

Definition at line 26 of file ScriptFileManager.h.

Constructor & Destructor Documentation

◆ ScriptFileManager()

ScriptFileManager::ScriptFileManager ( AssetWrapper parent)

Definition at line 17 of file ScriptFileManager.cpp.

References AssetWrapper::tipProperty.

◆ ~ScriptFileManager()

ScriptFileManager::~ScriptFileManager ( )
virtual

Definition at line 21 of file ScriptFileManager.cpp.

References myScripts.

Member Function Documentation

◆ addHook

void ScriptFileManager::addHook ( const QString &  file,
HookInformation hook 
)
slot

Definition at line 73 of file ScriptFileManager.cpp.

References ScriptFile::addHook(), mad_mage_user::file, and getFile().

+ Here is the call graph for this function:

◆ child()

virtual AssetWrapper* ScriptFileManager::child ( int  child)
inlinevirtual

Reimplemented from AssetWrapper.

Definition at line 35 of file ScriptFileManager.h.

References child(), and myScripts.

Referenced by child(), and childIndex().

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

◆ childIndex()

virtual int ScriptFileManager::childIndex ( AssetWrapper child)
inlinevirtual

Reimplemented from AssetWrapper.

Definition at line 36 of file ScriptFileManager.h.

References child(), and myScripts.

+ Here is the call graph for this function:

◆ childrenCount()

virtual int ScriptFileManager::childrenCount ( ) const
inlinevirtual

Reimplemented from AssetWrapper.

Definition at line 34 of file ScriptFileManager.h.

References myScripts.

◆ displayName()

virtual QString ScriptFileManager::displayName ( ) const
inlineoverridevirtual

Implements AssetWrapper.

Definition at line 33 of file ScriptFileManager.h.

◆ getFile()

ScriptFile * ScriptFileManager::getFile ( const QString &  path)

Get information about a script path.

Parameters
pathfull script path.
Returns
information about the script, never NULL.

Definition at line 39 of file ScriptFileManager.cpp.

References AssetWrapper::AfterChildAdd, AssetWrapper::BeforeChildAdd, AssetWrapper::markModified(), myScripts, and python_init::path.

Referenced by addHook().

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

◆ removeMap()

void ScriptFileManager::removeMap ( CREMapInformation map)

Remove scripts linked to a map.

Parameters
mapmap to remove scripts of.

Definition at line 50 of file ScriptFileManager.cpp.

References disinfect::map, and myScripts.

Referenced by CREMapInformationManager::process().

+ Here is the caller graph for this function:

◆ scripts()

QList< ScriptFile * > ScriptFileManager::scripts ( ) const

Definition at line 68 of file ScriptFileManager.cpp.

References myScripts.

◆ scriptsForMap()

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().

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

Field Documentation

◆ myScripts

QHash<QString, ScriptFile*> ScriptFileManager::myScripts
private

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