Crossfire Server, Trunk
ArchetypeWrapper Class Reference

#include <ArchetypeWrapper.h>

+ Inheritance diagram for ArchetypeWrapper:
+ Collaboration diagram for ArchetypeWrapper:

Public Member Functions

 ArchetypeWrapper (AssetWrapper *parent, archetype *arch, ResourcesManager *resourcesManager)
virtual bool canDrag () const override
virtual AssetWrapperchild (int index) override
virtual int childIndex (AssetWrapper *child) override
virtual int childrenCount () const override
QObject * clone ()
virtual QIcon displayIcon () const override
virtual QString displayName () const override
virtual void drag (QMimeData *) const override
QObject * head () const
QObject * more () const
QString name () const
virtual PossibleUse uses (const AssetWrapper *asset, std::string &) const override
- Public Member Functions inherited from AssetWithArtifacts< archetype >
 AssetWithArtifacts (AssetWrapper *parent, const QString &panelName, archetype *item, ResourcesManager *resources)
virtual int childrenCount () const override
virtual ~AssetWithArtifacts ()
- Public Member Functions inherited from AssetTWrapper< archetype >
 AssetTWrapper (AssetWrapper *parent, const QString &panelName, archetype *wrappedItem)
virtual void displayFillPanel (QWidget *panel) override
archetypewrappedItem () const
- Public Member Functions inherited from AssetWrapper
 AssetWrapper (AssetWrapper *parent, const QString &panelName="empty")
virtual bool canDrop (const QMimeData *, int) const
virtual QString displayPanelName () const
AssetWrapperdisplayParent () const
virtual void drop (const QMimeData *, int)
virtual void fillMenu (QMenu *)
void markModified (ChangeType change, int extra=0)
void setDisplayParent (AssetWrapper *parent)
virtual ~AssetWrapper () override

Protected Member Functions

bool appearsOnTreasureList () const
- Protected Member Functions inherited from AssetWithArtifacts< archetype >
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)


QObject clone
QObject head
QObject more
QString name

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"
- Protected Attributes inherited from AssetWithArtifacts< archetype >
std::vector< ArtifactWrapper * > myArtifacts
const objectmySpecificItem
- Protected Attributes inherited from AssetTWrapper< archetype >
- Protected Attributes inherited from AssetWrapper
QString myPanelName

Detailed Description

Definition at line 16 of file ArchetypeWrapper.h.

Constructor & Destructor Documentation

◆ ArchetypeWrapper()

ArchetypeWrapper::ArchetypeWrapper ( AssetWrapper parent,
archetype arch,
ResourcesManager resourcesManager 

Definition at line 11 of file ArchetypeWrapper.cpp.

References appearsOnTreasureList(), archininventory::arch, and AssetWithArtifacts< archetype >::setSpecificItem().

+ Here is the call graph for this function:

Member Function Documentation

◆ appearsOnTreasureList()

bool ArchetypeWrapper::appearsOnTreasureList ( ) const

Definition at line 147 of file ArchetypeWrapper.cpp.

References AssetsCollection< T, Key >::first(), getManager(), say::item, AssetTWrapper< archetype >::myWrappedItem, and AssetsManager::treasures().

Referenced by ArchetypeWrapper().

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

◆ canDrag()

virtual bool ArchetypeWrapper::canDrag ( ) const

Reimplemented from AssetWrapper.

Definition at line 35 of file ArchetypeWrapper.h.

◆ child()

AssetWrapper * ArchetypeWrapper::child ( int  index)

Reimplemented from AssetWithArtifacts< archetype >.

Definition at line 47 of file ArchetypeWrapper.cpp.

References AssetWithArtifacts< T >::child(), npc_dialog::index, archt::more, AssetWithArtifacts< archetype >::myResources, AssetTWrapper< archetype >::myWrappedItem, and ResourcesManager::wrap().

Referenced by childIndex().

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

◆ childIndex()

int ArchetypeWrapper::childIndex ( AssetWrapper child)

◆ childrenCount()

int ArchetypeWrapper::childrenCount ( ) const

◆ clone()

QObject* ArchetypeWrapper::clone ( )

◆ displayIcon()

virtual QIcon ArchetypeWrapper::displayIcon ( ) const

Reimplemented from AssetWrapper.

Definition at line 28 of file ArchetypeWrapper.h.

References archt::clone, obj::face, CREPixmap::getIcon(), and AssetTWrapper< archetype >::myWrappedItem.

+ Here is the call graph for this function:

◆ displayName()

virtual QString ArchetypeWrapper::displayName ( ) const

Implements AssetWrapper.

Definition at line 27 of file ArchetypeWrapper.h.

References AssetTWrapper< archetype >::myWrappedItem, and archt::name.

◆ drag()

void ArchetypeWrapper::drag ( QMimeData *  data) const

Reimplemented from AssetWrapper.

Definition at line 143 of file ArchetypeWrapper.cpp.

References MimeUtils::addMime(), MimeUtils::Archetype, navar-midane_time::data, AssetTWrapper< archetype >::myWrappedItem, and archt::name.

+ Here is the call graph for this function:

◆ head()

QObject* ArchetypeWrapper::head ( ) const

◆ more()

QObject* ArchetypeWrapper::more ( ) const

◆ name()

QString ArchetypeWrapper::name ( ) const

◆ uses()

Property Documentation

◆ clone

QObject * ArchetypeWrapper::clone

Definition at line 20 of file ArchetypeWrapper.h.

◆ head

QObject * ArchetypeWrapper::head

Definition at line 21 of file ArchetypeWrapper.h.

◆ more

QObject * ArchetypeWrapper::more

Definition at line 22 of file ArchetypeWrapper.h.

◆ name

QString ArchetypeWrapper::name

Definition at line 19 of file ArchetypeWrapper.h.

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