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
 
virtual void fillMenu (QMenu *menu) override
 
QObject * head () const
 
QObject * more () const
 
QString name () const
 
QString raw () const
 
void setRaw (const QString &raw)
 
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)
 
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)
 
void markModified (ChangeType change, int extra=0)
 
AssetWrapperself ()
 
void setDisplayParent (AssetWrapper *parent)
 
virtual ~AssetWrapper () override
 

Protected Member Functions

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

Protected Attributes

std::string myRaw
 
- Protected Attributes inherited from AssetWithArtifacts< archetype >
std::vector< ArtifactWrapper * > myArtifacts
 
ResourcesManagermyResources
 
const objectmySpecificItem
 
- Protected Attributes inherited from AssetTWrapper< archetype >
archetypemyWrappedItem
 
- Protected Attributes inherited from AssetWrapper
QString myPanelName
 
AssetWrappermyParent
 

Properties

QObject clone
 
QObject head
 
QObject more
 
QString name
 
QString raw
 
- Properties inherited from AssetWrapper
QString displayName
 
AssetWrapper self
 

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"
 

Detailed Description

Definition at line 25 of file ArchetypeWrapper.h.

Constructor & Destructor Documentation

◆ ArchetypeWrapper()

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

Member Function Documentation

◆ appearsOnTreasureList()

bool ArchetypeWrapper::appearsOnTreasureList ( ) const
protected

Definition at line 207 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
inlineoverridevirtual

Reimplemented from AssetWrapper.

Definition at line 46 of file ArchetypeWrapper.h.

◆ child()

AssetWrapper * ArchetypeWrapper::child ( int  index)
overridevirtual

Reimplemented from AssetWithArtifacts< archetype >.

Definition at line 81 of file ArchetypeWrapper.cpp.

References AssetWithArtifacts< T >::child(), npc_dialog::index, archetype::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)
overridevirtual

◆ childrenCount()

int ArchetypeWrapper::childrenCount ( ) const
overridevirtual

◆ clone()

QObject* ArchetypeWrapper::clone ( )

◆ displayIcon()

virtual QIcon ArchetypeWrapper::displayIcon ( ) const
inlineoverridevirtual

Reimplemented from AssetWrapper.

Definition at line 38 of file ArchetypeWrapper.h.

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

+ Here is the call graph for this function:

◆ displayName()

virtual QString ArchetypeWrapper::displayName ( ) const
inlineoverridevirtual

Implements AssetWrapper.

Definition at line 37 of file ArchetypeWrapper.h.

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

◆ drag()

void ArchetypeWrapper::drag ( QMimeData *  data) const
overridevirtual

Reimplemented from AssetWrapper.

Definition at line 203 of file ArchetypeWrapper.cpp.

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

+ Here is the call graph for this function:

◆ fillMenu()

void ArchetypeWrapper::fillMenu ( QMenu *  menu)
overridevirtual

Reimplemented from AssetWrapper.

Definition at line 245 of file ArchetypeWrapper.cpp.

References AssetWrapper::fillMenu(), and AssetWrapper::myParent.

+ Here is the call graph for this function:

◆ head()

QObject* ArchetypeWrapper::head ( ) const

◆ more()

QObject* ArchetypeWrapper::more ( ) const

◆ name()

QString ArchetypeWrapper::name ( ) const

◆ raw()

QString ArchetypeWrapper::raw ( ) const

◆ setRaw()

◆ uses()

◆ wasModified()

void ArchetypeWrapper::wasModified ( AssetWrapper asset,
ChangeType  type,
int  extra 
)
overrideprotectedvirtual

Field Documentation

◆ myRaw

std::string ArchetypeWrapper::myRaw
protected

Definition at line 60 of file ArchetypeWrapper.h.

Referenced by ArchetypeWrapper(), and setRaw().

Property Documentation

◆ clone

QObject * ArchetypeWrapper::clone
read

Definition at line 29 of file ArchetypeWrapper.h.

◆ head

QObject * ArchetypeWrapper::head
read

Definition at line 30 of file ArchetypeWrapper.h.

◆ more

QObject * ArchetypeWrapper::more
read

Definition at line 31 of file ArchetypeWrapper.h.

Referenced by ArchetypeWrapper().

◆ name

QString ArchetypeWrapper::name
read

Definition at line 28 of file ArchetypeWrapper.h.

◆ raw

QString ArchetypeWrapper::raw
readwrite

Definition at line 32 of file ArchetypeWrapper.h.

Referenced by setRaw().


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