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

AssetWrapper self
 

Detailed Description

Definition at line 22 of file AssetWrapper.h.

Member Enumeration Documentation

◆ ChangeType

Enumerator
AssetUpdated 
BeforeChildAdd 
AfterChildAdd 
BeforeChildRemove 
AfterChildRemove 
BeforeLayoutChange 
AfterLayoutChange 

Definition at line 29 of file AssetWrapper.h.

◆ PossibleUse

Enumerator
Uses 
ChildrenMayUse 
DoesntUse 

Definition at line 28 of file AssetWrapper.h.

Constructor & Destructor Documentation

◆ AssetWrapper()

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

Definition at line 32 of file AssetWrapper.h.

◆ ~AssetWrapper()

virtual AssetWrapper::~AssetWrapper ( )
inlineoverridevirtual

Definition at line 35 of file AssetWrapper.h.

Member Function Documentation

◆ canDrag()

virtual bool AssetWrapper::canDrag ( ) const
inlinevirtual

Reimplemented in TreasureListWrapper, ArchetypeWrapper, and QuestStepWrapper.

Definition at line 56 of file AssetWrapper.h.

◆ canDrop()

virtual bool AssetWrapper::canDrop ( const QMimeData *  ,
int   
) const
inlinevirtual

◆ child()

◆ childIndex()

◆ childrenCount()

◆ compareByDisplayName()

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

Definition at line 62 of file AssetWrapper.h.

References displayName().

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

+ Here is the call graph for this function:
+ 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, RecipeWrapper, TreasureWrapper, GeneralMessageWrapper, TreasureListWrapper, ArchetypeWrapper, ArtifactWrapper, FaceWrapper, and AnimationWrapper.

Definition at line 40 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 41 of file AssetWrapper.h.

References myPanelName.

◆ displayParent()

AssetWrapper* AssetWrapper::displayParent ( ) const
inline

Definition at line 42 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 57 of file AssetWrapper.h.

◆ drop()

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

Reimplemented in TreasureWrapper, TreasureListWrapper, QuestWrapper, and QuestStepWrapper.

Definition at line 59 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, and QuestStepWrapper.

Definition at line 60 of file AssetWrapper.h.

◆ markModified()

◆ 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 67 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 37 of file AssetWrapper.h.

◆ setDisplayParent()

void AssetWrapper::setDisplayParent ( AssetWrapper parent)
inline

Definition at line 43 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 83 of file AssetWrapper.h.

Referenced by displayPanelName().

◆ myParent

◆ tipProperty

Property Documentation

◆ self

AssetWrapper AssetWrapper::self
read

Definition at line 25 of file AssetWrapper.h.


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