Crossfire Server, Trunk
|
#include <TreasureWrapper.h>
Public Slots | |
void | swapYesNo () |
Public Slots inherited from AssetWrapper |
Public Member Functions | |
const archetype * | arch () const |
const QString | artifact () const |
virtual bool | canDrop (const QMimeData *data, int row) const override |
uint8_t | chance () const |
virtual AssetWrapper * | child (int child) override |
virtual int | childIndex (AssetWrapper *child) override |
virtual int | childrenCount () const override |
virtual QIcon | displayIcon () const override |
virtual QString | displayName () const override |
virtual void | drop (const QMimeData *data, int row) override |
virtual void | fillMenu (QMenu *menu) override |
const treasurelist * | list () const |
qint8 | listMagicAdjustment () const |
quint8 | listMagicValue () const |
uint8_t | magic () const |
uint16_t | nrof () const |
virtual void | removeChild (AssetWrapper *child) override |
void | setArch (const archetype *arch) |
void | setArtifact (const QString &art) |
void | setChance (uint8_t chance) |
void | setList (const treasurelist *list) |
void | setListMagicAdjustment (qint8 value) |
void | setListMagicValue (quint8 value) |
void | setMagic (uint8_t magic) |
void | setNrof (uint16_t nrof) |
TreasureWrapper (AssetWrapper *parent, treasure *tr, ResourcesManager *resources) | |
virtual PossibleUse | uses (const AssetWrapper *asset, std::string &) const override |
virtual | ~TreasureWrapper () |
Public Member Functions inherited from AssetWithArtifacts< treasure > | |
AssetWithArtifacts (AssetWrapper *parent, const QString &panelName, treasure *item, ResourcesManager *resources) | |
virtual int | childrenCount () const override |
virtual | ~AssetWithArtifacts () |
Public Member Functions inherited from AssetTWrapper< treasure > | |
AssetTWrapper (AssetWrapper *parent, const QString &panelName, treasure *wrappedItem) | |
treasure * | wrappedItem () const |
Public Member Functions inherited from AssetWrapper | |
AssetWrapper (AssetWrapper *parent, const QString &panelName="empty") | |
virtual bool | canDrag () const |
virtual QString | displayPanelName () const |
AssetWrapper * | displayParent () const |
virtual void | drag (QMimeData *) const |
void | markModified (ChangeType change, int extra=0) |
AssetWrapper * | self () |
void | setDisplayParent (AssetWrapper *parent) |
virtual | ~AssetWrapper () override |
Protected Member Functions | |
void | addChild (treasurelist *tl, archetype *arch) |
void | doAddChild (TreasureYesNo **my, treasure **ti, bool isYes, int index, treasurelist *tl, archetype *arch) |
void | doRemoveChild (TreasureYesNo **tr, treasure **ti, int index) |
Protected Member Functions inherited from AssetWithArtifacts< treasure > | |
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 | |
TreasureYesNo * | myNextNo |
TreasureYesNo * | myNextYes |
Protected Attributes inherited from AssetWithArtifacts< treasure > | |
std::vector< ArtifactWrapper * > | myArtifacts |
ResourcesManager * | myResources |
const object * | mySpecificItem |
Protected Attributes inherited from AssetTWrapper< treasure > | |
treasure * | myWrappedItem |
Protected Attributes inherited from AssetWrapper | |
QString | myPanelName |
AssetWrapper * | myParent |
Properties | |
const archetype | arch |
QString | artifact |
quint8 | chance |
const treasurelist | list |
qint8 | list_magic_adjustment |
quint8 | list_magic_value |
quint8 | magic |
quint16 | nrof |
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 } |
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" |
Wrapper for a treasure item.
Definition at line 33 of file TreasureWrapper.h.
TreasureWrapper::TreasureWrapper | ( | AssetWrapper * | parent, |
treasure * | tr, | ||
ResourcesManager * | resources | ||
) |
Definition at line 25 of file TreasureWrapper.cpp.
References archetype::clone, treasure::item, myNextNo, myNextYes, AssetTWrapper< treasure >::myWrappedItem, treasure::next_no, treasure::next_yes, and AssetWithArtifacts< treasure >::setSpecificItem().
|
virtual |
Definition at line 39 of file TreasureWrapper.cpp.
|
protected |
Definition at line 168 of file TreasureWrapper.cpp.
References arch, doAddChild(), myNextNo, myNextYes, AssetTWrapper< treasure >::myWrappedItem, treasure::next_no, and treasure::next_yes.
Referenced by drop().
const archetype* TreasureWrapper::arch | ( | ) | const |
const QString TreasureWrapper::artifact | ( | ) | const |
|
overridevirtual |
Reimplemented from AssetWrapper.
Definition at line 178 of file TreasureWrapper.cpp.
References MimeUtils::Archetype, navar-midane_time::data, and MimeUtils::TreasureList.
uint8_t TreasureWrapper::chance | ( | ) | const |
|
overridevirtual |
Reimplemented from AssetWithArtifacts< treasure >.
Definition at line 98 of file TreasureWrapper.cpp.
References AssetWithArtifacts< T >::child(), myNextNo, and myNextYes.
Referenced by TreasureYesNo::child(), childIndex(), TreasureYesNo::childIndex(), and removeChild().
|
overridevirtual |
Reimplemented from AssetWithArtifacts< treasure >.
Definition at line 114 of file TreasureWrapper.cpp.
References c, child(), AssetWithArtifacts< T >::childIndex(), npc_dialog::index, myNextNo, and myNextYes.
|
overridevirtual |
Reimplemented from AssetWrapper.
Definition at line 87 of file TreasureWrapper.cpp.
References AssetWithArtifacts< T >::childrenCount(), disinfect::count, AssetTWrapper< treasure >::myWrappedItem, treasure::next_no, and treasure::next_yes.
|
overridevirtual |
Reimplemented from AssetWrapper.
Definition at line 72 of file TreasureWrapper.cpp.
References archetype::clone, object::face, AssetsCollection< T, Key >::find(), CREPixmap::getIcon(), getManager(), CREPixmap::getTreasureIcon(), CREPixmap::getTreasureOneIcon(), treasure::item, AssetTWrapper< treasure >::myWrappedItem, treasure::name, and AssetsManager::treasures().
|
overridevirtual |
Implements AssetWrapper.
Definition at line 42 of file TreasureWrapper.cpp.
References treasure::chance, archetype::clone, AssetWrapper::displayParent(), treasure::item, AssetTWrapper< treasure >::myWrappedItem, give::name, treasure::name, object::name, archetype::name, and treasure::nrof.
|
protected |
Definition at line 157 of file TreasureWrapper.cpp.
References add_string(), AssetWrapper::AfterChildAdd, arch, AssetWrapper::BeforeChildAdd, get_empty_treasure(), npc_dialog::index, AssetWrapper::markModified(), AssetWithArtifacts< treasure >::myResources, treasurelist::name, and archetype::name.
Referenced by addChild().
|
protected |
Definition at line 136 of file TreasureWrapper.cpp.
References AssetWrapper::AfterChildRemove, AssetWrapper::BeforeChildRemove, npc_dialog::index, AssetWrapper::markModified(), AssetWithArtifacts< treasure >::myResources, ResourcesManager::remove(), and treasure_free().
Referenced by removeChild().
|
overridevirtual |
Reimplemented from AssetWrapper.
Definition at line 185 of file TreasureWrapper.cpp.
References addChild(), arch, MimeUtils::Archetype, navar-midane_time::data, MimeUtils::extract(), getManager(), list, lists, and MimeUtils::TreasureList.
|
overridevirtual |
Reimplemented from AssetWrapper.
Definition at line 298 of file TreasureWrapper.cpp.
References myNextNo, myNextYes, AssetWrapper::myParent, AssetWrapper::removeChild(), and swapYesNo().
const treasurelist* TreasureWrapper::list | ( | ) | const |
qint8 TreasureWrapper::listMagicAdjustment | ( | ) | const |
Definition at line 257 of file TreasureWrapper.cpp.
References treasure::list_magic_adjustment, and AssetTWrapper< treasure >::myWrappedItem.
quint8 TreasureWrapper::listMagicValue | ( | ) | const |
Definition at line 246 of file TreasureWrapper.cpp.
References treasure::list_magic_value, and AssetTWrapper< treasure >::myWrappedItem.
uint8_t TreasureWrapper::magic | ( | ) | const |
uint16_t TreasureWrapper::nrof | ( | ) | const |
|
overridevirtual |
Reimplemented from AssetWrapper.
Definition at line 147 of file TreasureWrapper.cpp.
References child(), doRemoveChild(), myNextNo, myNextYes, AssetTWrapper< treasure >::myWrappedItem, treasure::next_no, and treasure::next_yes.
void TreasureWrapper::setArch | ( | const archetype * | arch | ) |
Definition at line 272 of file TreasureWrapper.cpp.
References arch, AssetWrapper::AssetUpdated, archetype::clone, FREE_AND_CLEAR_STR, treasure::item, AssetWrapper::markModified(), AssetTWrapper< treasure >::myWrappedItem, treasure::name, and AssetWithArtifacts< treasure >::setSpecificItem().
void TreasureWrapper::setArtifact | ( | const QString & | art | ) |
Definition at line 287 of file TreasureWrapper.cpp.
References add_string(), treasure::artifact, AssetWrapper::AssetUpdated, FREE_AND_CLEAR_STR_IF, AssetWrapper::markModified(), and AssetTWrapper< treasure >::myWrappedItem.
void TreasureWrapper::setChance | ( | uint8_t | chance | ) |
Definition at line 201 of file TreasureWrapper.cpp.
References AssetWrapper::AssetUpdated, chance, treasure::chance, AssetWrapper::markModified(), and AssetTWrapper< treasure >::myWrappedItem.
void TreasureWrapper::setList | ( | const treasurelist * | list | ) |
Definition at line 234 of file TreasureWrapper.cpp.
References add_string(), AssetWrapper::AssetUpdated, FREE_AND_CLEAR_STR_IF, treasure::item, list, AssetWrapper::markModified(), AssetTWrapper< treasure >::myWrappedItem, treasure::name, treasurelist::name, and AssetWithArtifacts< treasure >::setSpecificItem().
void TreasureWrapper::setListMagicAdjustment | ( | qint8 | value | ) |
Definition at line 260 of file TreasureWrapper.cpp.
References AssetWrapper::AssetUpdated, treasure::list_magic_adjustment, AssetWrapper::markModified(), AssetTWrapper< treasure >::myWrappedItem, and autojail::value.
void TreasureWrapper::setListMagicValue | ( | quint8 | value | ) |
Definition at line 250 of file TreasureWrapper.cpp.
References AssetWrapper::AssetUpdated, treasure::list_magic_value, AssetWrapper::markModified(), AssetTWrapper< treasure >::myWrappedItem, and autojail::value.
void TreasureWrapper::setMagic | ( | uint8_t | magic | ) |
Definition at line 212 of file TreasureWrapper.cpp.
References AssetWrapper::AssetUpdated, magic, treasure::magic, AssetWrapper::markModified(), and AssetTWrapper< treasure >::myWrappedItem.
void TreasureWrapper::setNrof | ( | uint16_t | nrof | ) |
Definition at line 223 of file TreasureWrapper.cpp.
References AssetWrapper::AssetUpdated, AssetWrapper::markModified(), AssetTWrapper< treasure >::myWrappedItem, nrof, and treasure::nrof.
|
slot |
Definition at line 305 of file TreasureWrapper.cpp.
References AssetWrapper::AfterLayoutChange, AssetWrapper::BeforeLayoutChange, AssetWrapper::markModified(), myNextNo, myNextYes, AssetTWrapper< treasure >::myWrappedItem, treasure::next_no, treasure::next_yes, and TreasureYesNo::setIsYes().
Referenced by fillMenu(), and TreasureYesNo::fillMenu().
|
overridevirtual |
Reimplemented from AssetWrapper.
Definition at line 320 of file TreasureWrapper.cpp.
References arch, AssetWrapper::ChildrenMayUse, AssetWrapper::DoesntUse, treasure::item, list, AssetTWrapper< treasure >::myWrappedItem, treasure::name, treasurelist::name, AssetWrapper::Uses, and AssetTWrapper< treasure >::wrappedItem().
|
protected |
Definition at line 86 of file TreasureWrapper.h.
Referenced by addChild(), child(), childIndex(), fillMenu(), removeChild(), swapYesNo(), and TreasureWrapper().
|
protected |
Definition at line 85 of file TreasureWrapper.h.
Referenced by addChild(), child(), childIndex(), fillMenu(), removeChild(), swapYesNo(), and TreasureWrapper().
|
readwrite |
Definition at line 42 of file TreasureWrapper.h.
Referenced by addChild(), doAddChild(), drop(), setArch(), and uses().
|
readwrite |
Definition at line 43 of file TreasureWrapper.h.
|
readwrite |
Definition at line 36 of file TreasureWrapper.h.
Referenced by setChance().
|
readwrite |
Definition at line 39 of file TreasureWrapper.h.
|
readwrite |
Definition at line 41 of file TreasureWrapper.h.
|
readwrite |
Definition at line 40 of file TreasureWrapper.h.
|
readwrite |
Definition at line 37 of file TreasureWrapper.h.
Referenced by setMagic().
|
readwrite |
Definition at line 38 of file TreasureWrapper.h.
Referenced by setNrof().