Crossfire Server, Trunk
|
#include <TreasureWrapper.h>
Public Slots | |
void | swapYesNo () |
![]() |
Public Member Functions | |
const archetype * | arch () 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 void | displayFillPanel (QWidget *panel) 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 |
uint8_t | magic () const |
uint16_t | nrof () const |
virtual void | removeChild (AssetWrapper *child) override |
void | setArch (const archetype *arch) |
void | setChance (uint8_t chance) |
void | setList (const treasurelist *list) |
void | setMagic (uint8_t magic) |
void | setNrof (uint16_t nrof) |
TreasureWrapper (AssetWrapper *parent, treasure *tr, ResourcesManager *resources) | |
virtual | ~TreasureWrapper () |
![]() | |
AssetWithArtifacts (AssetWrapper *parent, const QString &panelName, treasure *item, ResourcesManager *resources) | |
virtual int | childrenCount () const override |
virtual | ~AssetWithArtifacts () |
![]() | |
AssetTWrapper (AssetWrapper *parent, const QString &panelName, treasure *wrappedItem) | |
treasure * | wrappedItem () const |
![]() | |
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) |
void | setDisplayParent (AssetWrapper *parent) |
virtual PossibleUse | uses (const AssetWrapper *, std::string &) const |
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) |
![]() | |
void | setSpecificItem (const object *item, bool notify) |
void | updateArtifacts (bool notify) |
![]() | |
virtual void | wasModified (AssetWrapper *asset, ChangeType type, int extra) |
Protected Attributes | |
TreasureYesNo * | myNextNo |
TreasureYesNo * | myNextYes |
![]() | |
std::vector< ArtifactWrapper * > | myArtifacts |
ResourcesManager * | myResources |
const object * | mySpecificItem |
![]() | |
treasure * | myWrappedItem |
![]() | |
QString | myPanelName |
AssetWrapper * | myParent |
Properties | |
const archetype | arch |
quint8 | chance |
const treasurelist | list |
quint8 | magic |
quint16 | nrof |
Additional Inherited Members | |
![]() | |
enum | ChangeType { AssetUpdated, BeforeChildAdd, AfterChildAdd, BeforeChildRemove, AfterChildRemove, BeforeLayoutChange, AfterLayoutChange } |
enum | PossibleUse { Uses, ChildrenMayUse, DoesntUse } |
![]() | |
void | dataModified (AssetWrapper *asset, AssetWrapper::ChangeType type, int extra) |
void | modified () |
![]() | |
static bool | compareByDisplayName (const AssetWrapper *left, const AssetWrapper *right) |
![]() | |
static const char * | tipProperty = "_cre_internal" |
Definition at line 20 of file TreasureWrapper.h.
TreasureWrapper::TreasureWrapper | ( | AssetWrapper * | parent, |
treasure * | tr, | ||
ResourcesManager * | resources | ||
) |
Definition at line 14 of file TreasureWrapper.cpp.
References archt::clone, treasurestruct::item, myNextNo, myNextYes, AssetTWrapper< treasure >::myWrappedItem, treasurestruct::next_no, treasurestruct::next_yes, and AssetWithArtifacts< treasure >::setSpecificItem().
|
virtual |
Definition at line 28 of file TreasureWrapper.cpp.
|
protected |
Definition at line 162 of file TreasureWrapper.cpp.
References arch, doAddChild(), myNextNo, myNextYes, AssetTWrapper< treasure >::myWrappedItem, treasurestruct::next_no, and treasurestruct::next_yes.
Referenced by drop().
const archetype* TreasureWrapper::arch | ( | ) | const |
|
overridevirtual |
Reimplemented from AssetWrapper.
Definition at line 172 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 92 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 108 of file TreasureWrapper.cpp.
References c, child(), AssetWithArtifacts< T >::childIndex(), npc_dialog::index, myNextNo, and myNextYes.
|
overridevirtual |
Reimplemented from AssetWrapper.
Definition at line 81 of file TreasureWrapper.cpp.
References AssetWithArtifacts< T >::childrenCount(), disinfect::count, AssetTWrapper< treasure >::myWrappedItem, treasurestruct::next_no, and treasurestruct::next_yes.
|
overridevirtual |
Reimplemented from AssetTWrapper< treasure >.
Definition at line 76 of file TreasureWrapper.cpp.
References AssetWrapperPanel::setItem().
|
overridevirtual |
Reimplemented from AssetWrapper.
Definition at line 61 of file TreasureWrapper.cpp.
References archt::clone, obj::face, AssetsCollection< T, Key >::find(), CREPixmap::getIcon(), getManager(), CREPixmap::getTreasureIcon(), CREPixmap::getTreasureOneIcon(), treasurestruct::item, AssetTWrapper< treasure >::myWrappedItem, treasurestruct::name, and AssetsManager::treasures().
|
overridevirtual |
Implements AssetWrapper.
Definition at line 31 of file TreasureWrapper.cpp.
References treasurestruct::chance, archt::clone, AssetWrapper::displayParent(), treasurestruct::item, AssetTWrapper< treasure >::myWrappedItem, give::name, treasurestruct::name, obj::name, archt::name, and treasurestruct::nrof.
|
protected |
Definition at line 151 of file TreasureWrapper.cpp.
References add_string(), AssetWrapper::AfterChildAdd, arch, AssetWrapper::BeforeChildAdd, get_empty_treasure(), npc_dialog::index, AssetWrapper::markModified(), AssetWithArtifacts< treasure >::myResources, treasureliststruct::name, and archt::name.
Referenced by addChild().
|
protected |
Definition at line 130 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 179 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 255 of file TreasureWrapper.cpp.
References myNextNo, myNextYes, AssetWrapper::myParent, AssetWrapper::removeChild(), and swapYesNo().
const treasurelist* TreasureWrapper::list | ( | ) | const |
uint8_t TreasureWrapper::magic | ( | ) | const |
uint16_t TreasureWrapper::nrof | ( | ) | const |
|
overridevirtual |
Reimplemented from AssetWrapper.
Definition at line 141 of file TreasureWrapper.cpp.
References child(), doRemoveChild(), myNextNo, myNextYes, AssetTWrapper< treasure >::myWrappedItem, treasurestruct::next_no, and treasurestruct::next_yes.
void TreasureWrapper::setArch | ( | const archetype * | arch | ) |
Definition at line 244 of file TreasureWrapper.cpp.
References arch, AssetWrapper::AssetUpdated, archt::clone, FREE_AND_CLEAR_STR, treasurestruct::item, AssetWrapper::markModified(), AssetTWrapper< treasure >::myWrappedItem, treasurestruct::name, and AssetWithArtifacts< treasure >::setSpecificItem().
void TreasureWrapper::setChance | ( | uint8_t | chance | ) |
Definition at line 195 of file TreasureWrapper.cpp.
References AssetWrapper::AssetUpdated, chance, treasurestruct::chance, AssetWrapper::markModified(), and AssetTWrapper< treasure >::myWrappedItem.
void TreasureWrapper::setList | ( | const treasurelist * | list | ) |
Definition at line 228 of file TreasureWrapper.cpp.
References add_string(), AssetWrapper::AssetUpdated, FREE_AND_CLEAR_STR_IF, treasurestruct::item, list, AssetWrapper::markModified(), AssetTWrapper< treasure >::myWrappedItem, treasurestruct::name, treasureliststruct::name, and AssetWithArtifacts< treasure >::setSpecificItem().
void TreasureWrapper::setMagic | ( | uint8_t | magic | ) |
Definition at line 206 of file TreasureWrapper.cpp.
References AssetWrapper::AssetUpdated, magic, treasurestruct::magic, AssetWrapper::markModified(), and AssetTWrapper< treasure >::myWrappedItem.
void TreasureWrapper::setNrof | ( | uint16_t | nrof | ) |
Definition at line 217 of file TreasureWrapper.cpp.
References AssetWrapper::AssetUpdated, AssetWrapper::markModified(), AssetTWrapper< treasure >::myWrappedItem, nrof, and treasurestruct::nrof.
|
slot |
Definition at line 262 of file TreasureWrapper.cpp.
References AssetWrapper::AfterLayoutChange, AssetWrapper::BeforeLayoutChange, AssetWrapper::markModified(), myNextNo, myNextYes, AssetTWrapper< treasure >::myWrappedItem, treasurestruct::next_no, treasurestruct::next_yes, and TreasureYesNo::setIsYes().
Referenced by fillMenu(), and TreasureYesNo::fillMenu().
|
protected |
Definition at line 63 of file TreasureWrapper.h.
Referenced by addChild(), child(), childIndex(), fillMenu(), removeChild(), swapYesNo(), and TreasureWrapper().
|
protected |
Definition at line 62 of file TreasureWrapper.h.
Referenced by addChild(), child(), childIndex(), fillMenu(), removeChild(), swapYesNo(), and TreasureWrapper().
|
readwrite |
Definition at line 27 of file TreasureWrapper.h.
Referenced by addChild(), doAddChild(), drop(), and setArch().
|
readwrite |
Definition at line 23 of file TreasureWrapper.h.
Referenced by setChance().
|
readwrite |
Definition at line 26 of file TreasureWrapper.h.
|
readwrite |
Definition at line 24 of file TreasureWrapper.h.
Referenced by setMagic().
|
readwrite |
Definition at line 25 of file TreasureWrapper.h.
Referenced by setNrof().