Crossfire Server, Trunk
|
#include <ArtifactWrapper.h>
Public Member Functions | |
QStringList | allowed () const |
ArtifactWrapper (AssetWrapper *parent, artifact *art, ResourcesManager *resourcesManager) | |
int | chance () const |
int | difficulty () const |
virtual QIcon | displayIcon () const override |
virtual QString | displayName () const override |
QObject * | item () |
QString | name () const |
void | setChance (int chance) |
void | setSpecificItem (const object *item) |
virtual PossibleUse | uses (const AssetWrapper *asset, std::string &) const override |
Public Member Functions inherited from AssetTWrapper< artifact > | |
AssetTWrapper (AssetWrapper *parent, const QString &panelName, artifact *wrappedItem) | |
artifact * | 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 AssetWrapper * | child (int) |
virtual int | childIndex (AssetWrapper *) |
virtual int | childrenCount () const |
virtual QString | displayPanelName () const |
AssetWrapper * | displayParent () const |
virtual void | drag (QMimeData *) const |
virtual void | drop (const QMimeData *, int) |
virtual void | fillMenu (QMenu *) |
void | markModified (ChangeType change, int extra=0) |
AssetWrapper * | self () |
void | setDisplayParent (AssetWrapper *parent) |
virtual | ~AssetWrapper () override |
Protected Attributes | |
ResourcesManager * | myResourcesManager |
const object * | mySpecificItem |
Protected Attributes inherited from AssetTWrapper< artifact > | |
artifact * | myWrappedItem |
Protected Attributes inherited from AssetWrapper | |
QString | myPanelName |
AssetWrapper * | myParent |
Properties | |
QStringList | allowed |
int | chance |
int | difficulty |
QObject | item |
QString | name |
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" |
Protected Member Functions inherited from AssetWrapper | |
virtual void | wasModified (AssetWrapper *asset, ChangeType type, int extra) |
Definition at line 24 of file ArtifactWrapper.h.
ArtifactWrapper::ArtifactWrapper | ( | AssetWrapper * | parent, |
artifact * | art, | ||
ResourcesManager * | resourcesManager | ||
) |
Definition at line 19 of file ArtifactWrapper.cpp.
QStringList ArtifactWrapper::allowed | ( | ) | const |
int ArtifactWrapper::chance | ( | ) | const |
int ArtifactWrapper::difficulty | ( | ) | const |
|
overridevirtual |
Reimplemented from AssetWrapper.
Definition at line 48 of file ArtifactWrapper.cpp.
References artifact_get_face(), CREPixmap::getIcon(), and AssetTWrapper< artifact >::myWrappedItem.
|
overridevirtual |
Implements AssetWrapper.
Definition at line 24 of file ArtifactWrapper.cpp.
References artifact_compute_chance_for_item(), artifact::chance, find_artifactlist(), artifact::item, guildoracle::list, mySpecificItem, AssetTWrapper< artifact >::myWrappedItem, name, object::name, and object::type.
QObject* ArtifactWrapper::item | ( | ) |
QString ArtifactWrapper::name | ( | ) | const |
void ArtifactWrapper::setChance | ( | int | chance | ) |
Definition at line 64 of file ArtifactWrapper.cpp.
References AssetWrapper::AssetUpdated, chance, artifact::chance, AssetWrapper::markModified(), and AssetTWrapper< artifact >::myWrappedItem.
|
inline |
Definition at line 41 of file ArtifactWrapper.h.
References item, and mySpecificItem.
|
overridevirtual |
Reimplemented from AssetWrapper.
Definition at line 82 of file ArtifactWrapper.cpp.
References animate::anim, object::animation, AssetWrapper::DoesntUse, object::face, artifact::item, AssetTWrapper< artifact >::myWrappedItem, and AssetWrapper::Uses.
|
protected |
Definition at line 51 of file ArtifactWrapper.h.
|
protected |
Definition at line 52 of file ArtifactWrapper.h.
Referenced by displayName(), and setSpecificItem().
|
read |
Definition at line 31 of file ArtifactWrapper.h.
|
readwrite |
Definition at line 29 of file ArtifactWrapper.h.
Referenced by setChance().
|
read |
Definition at line 30 of file ArtifactWrapper.h.
|
read |
Definition at line 28 of file ArtifactWrapper.h.
Referenced by setSpecificItem().
|
read |
Definition at line 27 of file ArtifactWrapper.h.
Referenced by displayName().