Crossfire Server, Trunk
AssetWrapper Class Referenceabstract

#include <AssetWrapper.h>

+ Inheritance diagram for AssetWrapper:
+ Collaboration diagram for AssetWrapper:

Public Types

enum  ChangeType {
  AssetUpdated, BeforeChildAdd, AfterChildAdd, BeforeChildRemove,
  AfterChildRemove, BeforeLayoutChange, AfterLayoutChange
}
 
enum  PossibleUse { Uses, ChildrenMayUse, DoesntUse }
 

Public Slots

virtual void removeChild (AssetWrapper *)
 

Signals

void dataModified (AssetWrapper *asset, AssetWrapper::ChangeType type, int extra)
 
void modified ()
 

Public Member Functions

 AssetWrapper (AssetWrapper *parent, const QString &panelName="empty")
 
virtual bool canDrag () const
 
virtual bool canDrop (const QMimeData *, int) const
 
virtual AssetWrapperchild (int)
 
virtual int childIndex (AssetWrapper *)
 
virtual int childrenCount () const
 
virtual QIcon displayIcon () const
 
virtual QString displayName () const =0
 
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
 

Static Public Member Functions

static bool compareByDisplayName (const AssetWrapper *left, const AssetWrapper *right)
 

Static Public Attributes

static const char * tipProperty = "_cre_internal"
 

Protected Member Functions

virtual void wasModified (AssetWrapper *asset, ChangeType type, int extra)
 

Protected Attributes

QString myPanelName
 
AssetWrappermyParent
 

Properties

QString displayName
 
AssetWrapper self
 

Detailed Description

Base class for all assets that can be displayed or edited by CRE.

Definition at line 25 of file AssetWrapper.h.

Member Enumeration Documentation

◆ ChangeType

Enumerator
AssetUpdated 
BeforeChildAdd 
AfterChildAdd 
BeforeChildRemove 
AfterChildRemove 
BeforeLayoutChange 
AfterLayoutChange 

Definition at line 33 of file AssetWrapper.h.

◆ PossibleUse

Enumerator
Uses 
ChildrenMayUse 
DoesntUse 

Definition at line 32 of file AssetWrapper.h.

Constructor & Destructor Documentation

◆ AssetWrapper()

AssetWrapper::AssetWrapper ( AssetWrapper parent,
const QString &  panelName = "empty" 
)
inline

Definition at line 36 of file AssetWrapper.h.

◆ ~AssetWrapper()

virtual AssetWrapper::~AssetWrapper ( )
inlineoverridevirtual

Definition at line 39 of file AssetWrapper.h.

Member Function Documentation

◆ canDrag()

virtual bool AssetWrapper::canDrag ( ) const
inlinevirtual

Reimplemented in ArchetypeWrapper, TreasureListWrapper, and QuestStepWrapper.

Definition at line 60 of file AssetWrapper.h.

◆ canDrop()

◆ child()

◆ childIndex()

◆ childrenCount()

◆ compareByDisplayName()

static bool AssetWrapper::compareByDisplayName ( const AssetWrapper left,
const AssetWrapper right 
)
inlinestatic

Definition at line 66 of file AssetWrapper.h.

References displayName.

Referenced by AssetsCollectionWrapper< Animations >::AssetsCollectionWrapper(), and RegionsWrapper::RegionsWrapper().

+ Here is the caller graph for this function:

◆ dataModified

void AssetWrapper::dataModified ( AssetWrapper asset,
AssetWrapper::ChangeType  type,
int  extra 
)
signal

Referenced by wasModified().

+ Here is the caller graph for this function:

◆ displayIcon()

virtual QIcon AssetWrapper::displayIcon ( ) const
inlinevirtual

Reimplemented in TreasureYesNo, QuestWrapper, TreasureWrapper, RecipeWrapper, GeneralMessageWrapper, TreasureListWrapper, ArchetypeWrapper, ArtifactWrapper, FaceWrapper, and AnimationWrapper.

Definition at line 44 of file AssetWrapper.h.

Referenced by AssetModel::data().

+ Here is the caller graph for this function:

◆ displayName()

◆ displayPanelName()

virtual QString AssetWrapper::displayPanelName ( ) const
inlinevirtual

Definition at line 45 of file AssetWrapper.h.

References myPanelName.

◆ displayParent()

AssetWrapper* AssetWrapper::displayParent ( ) const
inline

Definition at line 46 of file AssetWrapper.h.

References myParent.

Referenced by AssetModel::assetModified(), and TreasureWrapper::displayName().

+ Here is the caller graph for this function:

◆ drag()

virtual void AssetWrapper::drag ( QMimeData *  ) const
inlinevirtual

Reimplemented in TreasureListWrapper, ArchetypeWrapper, and QuestStepWrapper.

Definition at line 61 of file AssetWrapper.h.

◆ drop()

virtual void AssetWrapper::drop ( const QMimeData *  ,
int   
)
inlinevirtual

Reimplemented in TreasureWrapper, TreasureListWrapper, QuestWrapper, and QuestStepWrapper.

Definition at line 63 of file AssetWrapper.h.

Referenced by QuestStepWrapper::drop(), and AssetModel::dropMimeData().

+ Here is the caller graph for this function:

◆ fillMenu()

virtual void AssetWrapper::fillMenu ( QMenu *  )
inlinevirtual

Reimplemented in TreasureYesNo, QuestWrapper, TreasureWrapper, ArchetypeWrapper, QuestStepWrapper, ArchetypesWrapper, and QuestsWrapper.

Definition at line 64 of file AssetWrapper.h.

Referenced by ArchetypeWrapper::fillMenu(), and QuestWrapper::fillMenu().

+ Here is the caller graph for this function:

◆ markModified()

void AssetWrapper::markModified ( ChangeType  change,
int  extra = 0 
)
inline

Definition at line 55 of file AssetWrapper.h.

References modified(), and wasModified().

Referenced by ArchetypesWrapper::addArchetype(), QuestsWrapper::addQuest(), QuestWrapper::addStep(), TreasureWrapper::doAddChild(), TreasureWrapper::doRemoveChild(), TreasureListWrapper::drop(), QuestWrapper::drop(), ScriptFileManager::getFile(), RegionWrapper::mapAdded(), SoundFiles::refreshSounds(), TreasureListWrapper::removeChild(), QuestWrapper::removeChild(), TreasureWrapper::setArch(), TreasureWrapper::setArtifact(), ArtifactWrapper::setChance(), GeneralMessageWrapper::setChance(), TreasureWrapper::setChance(), QuestWrapper::setComment(), QuestStepWrapper::setConditions(), QuestStepWrapper::setDescription(), QuestWrapper::setDescription(), QuestStepWrapper::setEnd(), GeneralMessageWrapper::setFace(), QuestWrapper::setFace(), TreasureWrapper::setList(), TreasureWrapper::setListMagicAdjustment(), TreasureWrapper::setListMagicValue(), TreasureWrapper::setMagic(), GeneralMessageWrapper::setMessage(), TreasureWrapper::setNrof(), GeneralMessageWrapper::setQuest(), QuestWrapper::setQuestParent(), ArchetypeWrapper::setRaw(), QuestWrapper::setRestart(), TreasureListWrapper::setSingleItem(), QuestStepWrapper::setStep(), QuestWrapper::setSystem(), GeneralMessageWrapper::setTitle(), QuestWrapper::setTitle(), TreasureWrapper::swapYesNo(), AssetWithArtifacts< archetype >::updateArtifacts(), ArtifactListWrapper::wasModified(), and TreasureListWrapper::wasModified().

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

◆ modified

void AssetWrapper::modified ( )
signal

Referenced by TreasureListWrapper::drop(), markModified(), MessageFile::setModified(), and ResourcesManager::wrap().

+ Here is the caller graph for this function:

◆ removeChild

virtual void AssetWrapper::removeChild ( AssetWrapper )
inlinevirtualslot

Reimplemented in QuestWrapper, TreasureWrapper, TreasureListWrapper, and TreasureYesNo.

Definition at line 71 of file AssetWrapper.h.

Referenced by QuestStepWrapper::fillMenu(), TreasureWrapper::fillMenu(), TreasureYesNo::fillMenu(), and TreasureYesNo::removeChild().

+ Here is the caller graph for this function:

◆ self()

AssetWrapper* AssetWrapper::self ( )
inline

Definition at line 41 of file AssetWrapper.h.

◆ setDisplayParent()

void AssetWrapper::setDisplayParent ( AssetWrapper parent)
inline

Definition at line 47 of file AssetWrapper.h.

References myParent.

Referenced by CREMainWindow::CREMainWindow().

+ Here is the caller graph for this function:

◆ uses()

◆ wasModified()

virtual void AssetWrapper::wasModified ( AssetWrapper asset,
ChangeType  type,
int  extra 
)
inlineprotectedvirtual

Field Documentation

◆ myPanelName

QString AssetWrapper::myPanelName
protected

Definition at line 87 of file AssetWrapper.h.

Referenced by displayPanelName().

◆ myParent

◆ tipProperty

Property Documentation

◆ displayName

QString AssetWrapper::displayName
read

Definition at line 29 of file AssetWrapper.h.

Referenced by compareByDisplayName(), and CREMainWindow::createMenus().

◆ self

AssetWrapper AssetWrapper::self
read

Definition at line 28 of file AssetWrapper.h.


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