Crossfire Server, Trunk
AssetWithArtifacts< T > Class Template Reference

#include <AssetWithArtifacts.h>

+ Inheritance diagram for AssetWithArtifacts< T >:
+ Collaboration diagram for AssetWithArtifacts< T >:

Public Member Functions

 AssetWithArtifacts (AssetWrapper *parent, const QString &panelName, T *item, ResourcesManager *resources)
 
virtual AssetWrapperchild (int child) override
 
virtual int childIndex (AssetWrapper *child) override
 
virtual int childrenCount () const override
 
virtual ~AssetWithArtifacts ()
 
- Public Member Functions inherited from AssetTWrapper< T >
 AssetTWrapper (AssetWrapper *parent, const QString &panelName, T *wrappedItem)
 
T * wrappedItem () const
 
- 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 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
 

Protected Member Functions

void setSpecificItem (const object *item, bool notify)
 
void updateArtifacts (bool notify)
 
- Protected Member Functions inherited from AssetWrapper
virtual void wasModified (AssetWrapper *asset, ChangeType type, int extra)
 

Protected Attributes

std::vector< ArtifactWrapper * > myArtifacts
 
ResourcesManagermyResources
 
const objectmySpecificItem
 
- Protected Attributes inherited from AssetTWrapper< T >
T * myWrappedItem
 
- Protected Attributes inherited from AssetWrapper
QString myPanelName
 
AssetWrappermyParent
 

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"
 
- Properties inherited from AssetWrapper
QString displayName
 
AssetWrapper self
 

Detailed Description

template<class T>
class AssetWithArtifacts< T >

Represents an asset to which artifacts may be applied.

Definition at line 26 of file AssetWithArtifacts.h.

Constructor & Destructor Documentation

◆ AssetWithArtifacts()

template<class T >
AssetWithArtifacts< T >::AssetWithArtifacts ( AssetWrapper parent,
const QString &  panelName,
T *  item,
ResourcesManager resources 
)
inline

Definition at line 28 of file AssetWithArtifacts.h.

◆ ~AssetWithArtifacts()

template<class T >
virtual AssetWithArtifacts< T >::~AssetWithArtifacts ( )
inlinevirtual

Definition at line 32 of file AssetWithArtifacts.h.

Member Function Documentation

◆ child()

template<class T >
virtual AssetWrapper* AssetWithArtifacts< T >::child ( int  child)
inlineoverridevirtual

Reimplemented from AssetWrapper.

Reimplemented in ArchetypeWrapper, and TreasureWrapper.

Definition at line 42 of file AssetWithArtifacts.h.

Referenced by ArchetypeWrapper::child(), AssetWithArtifacts< archetype >::child(), TreasureWrapper::child(), and AssetWithArtifacts< archetype >::childIndex().

+ Here is the caller graph for this function:

◆ childIndex()

template<class T >
virtual int AssetWithArtifacts< T >::childIndex ( AssetWrapper child)
inlineoverridevirtual

Reimplemented from AssetWrapper.

Reimplemented in TreasureWrapper, and ArchetypeWrapper.

Definition at line 48 of file AssetWithArtifacts.h.

Referenced by ArchetypeWrapper::childIndex(), and TreasureWrapper::childIndex().

+ Here is the caller graph for this function:

◆ childrenCount()

template<class T >
virtual int AssetWithArtifacts< T >::childrenCount ( ) const
inlineoverridevirtual

Reimplemented from AssetWrapper.

Definition at line 38 of file AssetWithArtifacts.h.

Referenced by TreasureWrapper::childrenCount().

+ Here is the caller graph for this function:

◆ setSpecificItem()

template<class T >
void AssetWithArtifacts< T >::setSpecificItem ( const object item,
bool  notify 
)
inlineprotected

Definition at line 61 of file AssetWithArtifacts.h.

◆ updateArtifacts()

template<class T >
void AssetWithArtifacts< T >::updateArtifacts ( bool  notify)
inlineprotected

Definition at line 66 of file AssetWithArtifacts.h.

Referenced by AssetWithArtifacts< archetype >::setSpecificItem().

+ Here is the caller graph for this function:

Field Documentation

◆ myArtifacts

◆ myResources

template<class T >
ResourcesManager* AssetWithArtifacts< T >::myResources
protected

◆ mySpecificItem

template<class T >
const object* AssetWithArtifacts< T >::mySpecificItem
protected

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