Crossfire Server, Trunk
|
#include <ArchetypeWrapper.h>
Public Member Functions | |
ArchetypeWrapper (AssetWrapper *parent, archetype *arch, ResourcesManager *resourcesManager) | |
virtual bool | canDrag () const override |
virtual AssetWrapper * | child (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) | |
archetype * | wrappedItem () 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 |
AssetWrapper * | displayParent () const |
virtual void | drop (const QMimeData *, int) |
void | markModified (ChangeType change, int extra=0) |
AssetWrapper * | self () |
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 |
ResourcesManager * | myResources |
const object * | mySpecificItem |
Protected Attributes inherited from AssetTWrapper< archetype > | |
archetype * | myWrappedItem |
Protected Attributes inherited from AssetWrapper | |
QString | myPanelName |
AssetWrapper * | myParent |
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" |
Definition at line 25 of file ArchetypeWrapper.h.
ArchetypeWrapper::ArchetypeWrapper | ( | AssetWrapper * | parent, |
archetype * | arch, | ||
ResourcesManager * | resourcesManager | ||
) |
Definition at line 27 of file ArchetypeWrapper.cpp.
References appearsOnTreasureList(), archininventory::arch, archetype::clone, more, myRaw, AssetTWrapper< archetype >::myWrappedItem, object_dump(), AssetWithArtifacts< archetype >::setSpecificItem(), stringbuffer_finish(), and stringbuffer_new().
|
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().
|
inlineoverridevirtual |
Reimplemented from AssetWrapper.
Definition at line 46 of file ArchetypeWrapper.h.
|
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().
|
overridevirtual |
Reimplemented from AssetWithArtifacts< archetype >.
Definition at line 93 of file ArchetypeWrapper.cpp.
References child(), AssetWithArtifacts< T >::childIndex(), archetype::head, npc_dialog::index, archetype::more, AssetWithArtifacts< archetype >::myResources, AssetTWrapper< archetype >::myWrappedItem, and ResourcesManager::wrap().
|
overridevirtual |
Reimplemented from AssetWrapper.
Definition at line 68 of file ArchetypeWrapper.cpp.
References disinfect::count, archetype::head, AssetWithArtifacts< archetype >::myArtifacts, and AssetTWrapper< archetype >::myWrappedItem.
QObject* ArchetypeWrapper::clone | ( | ) |
|
inlineoverridevirtual |
Reimplemented from AssetWrapper.
Definition at line 38 of file ArchetypeWrapper.h.
References archetype::clone, object::face, CREPixmap::getIcon(), and AssetTWrapper< archetype >::myWrappedItem.
|
inlineoverridevirtual |
Implements AssetWrapper.
Definition at line 37 of file ArchetypeWrapper.h.
References AssetTWrapper< archetype >::myWrappedItem, and archetype::name.
|
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.
|
overridevirtual |
Reimplemented from AssetWrapper.
Definition at line 245 of file ArchetypeWrapper.cpp.
References AssetWrapper::fillMenu(), and AssetWrapper::myParent.
QObject* ArchetypeWrapper::head | ( | ) | const |
QObject* ArchetypeWrapper::more | ( | ) | const |
QString ArchetypeWrapper::name | ( | ) | const |
QString ArchetypeWrapper::raw | ( | ) | const |
void ArchetypeWrapper::setRaw | ( | const QString & | raw | ) |
Definition at line 231 of file ArchetypeWrapper.cpp.
References AssetWrapper::AssetUpdated, bufferreader_destroy(), bufferreader_init_from_memory(), getManager(), ArchetypeLoader::load(), AssetWrapper::markModified(), myRaw, AssetWithArtifacts< archetype >::myResources, AssetTWrapper< archetype >::myWrappedItem, ResourcesManager::originOf(), and raw.
|
overridevirtual |
Reimplemented from AssetWrapper.
Definition at line 147 of file ArchetypeWrapper.cpp.
References animate::anim, object::animation, archininventory::arch, AssetWrapper::ChildrenMayUse, archetype::clone, AssetWrapper::DoesntUse, animate::event, object::face, AssetsManager::faces(), AssetsCollection< T, Key >::find(), getManager(), isValidArchFlesh(), castle_read::key, AssetTWrapper< archetype >::myWrappedItem, archetype::name, object_get_value(), object::other_arch, object::randomitems, SKILL, SPELL, SPELL_EFFECT, sstring, object::type, AssetWrapper::Uses, and AssetTWrapper< archetype >::wrappedItem().
|
overrideprotectedvirtual |
Reimplemented from AssetWrapper.
Definition at line 47 of file ArchetypeWrapper.cpp.
References ResourcesManager::archetypeModified(), AssetWithArtifacts< archetype >::myResources, AssetTWrapper< archetype >::myWrappedItem, is_valid_types_gen::type, and AssetWrapper::wasModified().
|
protected |
Definition at line 60 of file ArchetypeWrapper.h.
Referenced by ArchetypeWrapper(), and setRaw().
|
read |
Definition at line 29 of file ArchetypeWrapper.h.
|
read |
Definition at line 30 of file ArchetypeWrapper.h.
|
read |
Definition at line 31 of file ArchetypeWrapper.h.
Referenced by ArchetypeWrapper().
|
read |
Definition at line 28 of file ArchetypeWrapper.h.
|
readwrite |
Definition at line 32 of file ArchetypeWrapper.h.
Referenced by setRaw().