Crossfire Server, Trunk
QuestWrapper Class Reference

#include <QuestWrapper.h>

+ Inheritance diagram for QuestWrapper:
+ Collaboration diagram for QuestWrapper:

Public Member Functions

virtual bool canDrop (const QMimeData *, int) const override
 
bool canRestart () const
 
virtual AssetWrapperchild (int) override
 
virtual int childIndex (AssetWrapper *) override
 
virtual int childrenCount () const override
 
QString code () const
 
QString comment () const
 
QString description () const
 
virtual QIcon displayIcon () const override
 
virtual QString displayName () const override
 
virtual void drop (const QMimeData *, int) override
 
const Faceface () const
 
virtual void fillMenu (QMenu *menu) override
 
bool isSystem () const
 
const quest_definitionquestParent () const
 
 QuestWrapper (AssetWrapper *parent, quest_definition *quest, ResourcesManager *resources)
 
void setComment (const QString &comment)
 
void setDescription (const QString &description)
 
void setFace (const Face *face)
 
void setQuestParent (const quest_definition *parent)
 
void setRestart (bool restart)
 
void setSystem (bool system)
 
void setTitle (const QString &title)
 
QString title () const
 
virtual PossibleUse uses (const AssetWrapper *asset, std::string &) const override
 
- Public Member Functions inherited from AssetTWrapper< quest_definition >
 AssetTWrapper (AssetWrapper *parent, const QString &panelName, quest_definition *wrappedItem)
 
quest_definitionwrappedItem () const
 
- Public Member Functions inherited from AssetWrapper
 AssetWrapper (AssetWrapper *parent, const QString &panelName="empty")
 
virtual bool canDrag () const
 
virtual QString displayPanelName () const
 
AssetWrapperdisplayParent () const
 
virtual void drag (QMimeData *) const
 
void markModified (ChangeType change, int extra=0)
 
AssetWrapperself ()
 
void setDisplayParent (AssetWrapper *parent)
 
virtual ~AssetWrapper () override
 

Protected Member Functions

void addStep ()
 
virtual void removeChild (AssetWrapper *child) override
 
virtual void wasModified (AssetWrapper *asset, ChangeType type, int extra) override
 

Protected Attributes

ResourcesManagermyResources
 
- Protected Attributes inherited from AssetTWrapper< quest_definition >
quest_definitionmyWrappedItem
 
- Protected Attributes inherited from AssetWrapper
QString myPanelName
 
AssetWrappermyParent
 

Properties

bool canRestart
 
QString code
 
QString comment
 
QString description
 
const Face face
 
bool isSystem
 
const quest_definition questParent
 
QString title
 
- Properties inherited from AssetWrapper
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
- 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 66 of file QuestWrapper.h.

Constructor & Destructor Documentation

◆ QuestWrapper()

QuestWrapper::QuestWrapper ( AssetWrapper parent,
quest_definition quest,
ResourcesManager resources 
)
inline

Definition at line 79 of file QuestWrapper.h.

Member Function Documentation

◆ addStep()

void QuestWrapper::addStep ( )
protected

◆ canDrop()

bool QuestWrapper::canDrop ( const QMimeData *  data,
int   
) const
overridevirtual

Reimplemented from AssetWrapper.

Definition at line 118 of file QuestWrapper.cpp.

References navar-midane_time::data, and MimeUtils::QuestStep.

◆ canRestart()

bool QuestWrapper::canRestart ( ) const
inline

◆ child()

AssetWrapper * QuestWrapper::child ( int  index)
overridevirtual

Reimplemented from AssetWrapper.

Definition at line 94 of file QuestWrapper.cpp.

References npc_dialog::index, myResources, AssetTWrapper< quest_definition >::myWrappedItem, quest_step_definition::next, quest_definition::steps, and ResourcesManager::wrap().

Referenced by childIndex(), and removeChild().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ childIndex()

int QuestWrapper::childIndex ( AssetWrapper child)
overridevirtual

Reimplemented from AssetWrapper.

Definition at line 103 of file QuestWrapper.cpp.

References child(), npc_dialog::index, myResources, AssetTWrapper< quest_definition >::myWrappedItem, quest_definition::steps, and ResourcesManager::wrap().

Referenced by QuestStepWrapper::drag().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ childrenCount()

int QuestWrapper::childrenCount ( ) const
overridevirtual

◆ code()

QString QuestWrapper::code ( ) const
inline

◆ comment()

QString QuestWrapper::comment ( ) const
inline

◆ description()

QString QuestWrapper::description ( ) const
inline

◆ displayIcon()

virtual QIcon QuestWrapper::displayIcon ( ) const
inlineoverridevirtual

Reimplemented from AssetWrapper.

Definition at line 83 of file QuestWrapper.h.

References quest_definition::face, CREPixmap::getIcon(), and AssetTWrapper< quest_definition >::myWrappedItem.

+ Here is the call graph for this function:

◆ displayName()

virtual QString QuestWrapper::displayName ( ) const
inlineoverridevirtual

◆ drop()

◆ face()

const Face* QuestWrapper::face ( ) const
inline

◆ fillMenu()

void QuestWrapper::fillMenu ( QMenu *  menu)
overridevirtual

Reimplemented from AssetWrapper.

Definition at line 171 of file QuestWrapper.cpp.

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

+ Here is the call graph for this function:

◆ isSystem()

bool QuestWrapper::isSystem ( ) const
inline

◆ questParent()

const quest_definition* QuestWrapper::questParent ( ) const
inline

◆ removeChild()

◆ setComment()

void QuestWrapper::setComment ( const QString &  comment)
inline

◆ setDescription()

void QuestWrapper::setDescription ( const QString &  description)
inline

◆ setFace()

void QuestWrapper::setFace ( const Face face)
inline

Definition at line 111 of file QuestWrapper.h.

References AssetWrapper::AssetUpdated, quest_definition::face, face, AssetWrapper::markModified(), and AssetTWrapper< quest_definition >::myWrappedItem.

+ Here is the call graph for this function:

◆ setQuestParent()

void QuestWrapper::setQuestParent ( const quest_definition parent)
inline

Definition at line 117 of file QuestWrapper.h.

References AssetWrapper::AssetUpdated, AssetWrapper::markModified(), AssetTWrapper< quest_definition >::myWrappedItem, and quest_definition::parent.

+ Here is the call graph for this function:

◆ setRestart()

void QuestWrapper::setRestart ( bool  restart)
inline

◆ setSystem()

void QuestWrapper::setSystem ( bool  system)
inline

◆ setTitle()

void QuestWrapper::setTitle ( const QString &  title)
inline

◆ title()

QString QuestWrapper::title ( ) const
inline

◆ uses()

AssetWrapper::PossibleUse QuestWrapper::uses ( const AssetWrapper asset,
std::string &   
) const
overridevirtual

◆ wasModified()

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

Reimplemented from AssetWrapper.

Definition at line 113 of file QuestWrapper.cpp.

References myResources, AssetTWrapper< quest_definition >::myWrappedItem, ResourcesManager::questModified(), is_valid_types_gen::type, and AssetWrapper::wasModified().

+ Here is the call graph for this function:

Field Documentation

◆ myResources

ResourcesManager* QuestWrapper::myResources
protected

Definition at line 151 of file QuestWrapper.h.

Referenced by child(), childIndex(), removeChild(), and wasModified().

Property Documentation

◆ canRestart

bool QuestWrapper::canRestart
readwrite

Definition at line 72 of file QuestWrapper.h.

◆ code

QString QuestWrapper::code
read

Definition at line 69 of file QuestWrapper.h.

Referenced by QuestStepWrapper::drag(), and drop().

◆ comment

QString QuestWrapper::comment
readwrite

Definition at line 76 of file QuestWrapper.h.

Referenced by setComment().

◆ description

QString QuestWrapper::description
readwrite

Definition at line 75 of file QuestWrapper.h.

Referenced by setDescription().

◆ face

const Face QuestWrapper::face
readwrite

Definition at line 71 of file QuestWrapper.h.

Referenced by setFace(), and uses().

◆ isSystem

bool QuestWrapper::isSystem
readwrite

Definition at line 74 of file QuestWrapper.h.

◆ questParent

const quest_definition QuestWrapper::questParent
readwrite

Definition at line 72 of file QuestWrapper.h.

◆ title

QString QuestWrapper::title
readwrite

Definition at line 70 of file QuestWrapper.h.


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