Crossfire Server, Trunk
CREQuestItemModel Class Reference

#include <CREQuestItemModel.h>

+ Inheritance diagram for CREQuestItemModel:
+ Collaboration diagram for CREQuestItemModel:

Public Slots

void addStep (bool)
 

Signals

void questModified (quest_definition *quest)
 

Public Member Functions

virtual int columnCount (const QModelIndex &parent) const
 
 CREQuestItemModel (QObject *parent)
 
virtual QVariant data (const QModelIndex &index, int role) const
 
virtual Qt::ItemFlags flags (const QModelIndex &index) const
 
virtual QVariant headerData (int section, Qt::Orientation orientation, int role) const
 
virtual QModelIndex index (int row, int column, const QModelIndex &parent) const
 
void moveDown (int step)
 
void moveUp (int step)
 
virtual QModelIndex parent (const QModelIndex &index) const
 
quest_definitionquest () const
 
virtual bool removeRows (int row, int count, const QModelIndex &parent=QModelIndex())
 
virtual int rowCount (const QModelIndex &parent) const
 
virtual bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
 
void setQuest (quest_definition *quest)
 
virtual ~CREQuestItemModel ()
 

Protected Member Functions

quest_step_definitiongetStep (int step) const
 

Protected Attributes

quest_definitionmyQuest
 
int myStepCount
 

Detailed Description

Item model for the steps of a quest.

Definition at line 15 of file CREQuestItemModel.h.

Constructor & Destructor Documentation

◆ CREQuestItemModel()

CREQuestItemModel::CREQuestItemModel ( QObject *  parent)

Definition at line 4 of file CREQuestItemModel.cpp.

References myQuest, and myStepCount.

◆ ~CREQuestItemModel()

CREQuestItemModel::~CREQuestItemModel ( )
virtual

Definition at line 10 of file CREQuestItemModel.cpp.

Member Function Documentation

◆ addStep

void CREQuestItemModel::addStep ( bool  )
slot

Definition at line 200 of file CREQuestItemModel.cpp.

References myQuest, myStepCount, quest_step_definition::next, quest_create_step(), questModified(), quest_step_definition::step, and quest_definition::steps.

+ Here is the call graph for this function:

◆ columnCount()

int CREQuestItemModel::columnCount ( const QModelIndex &  parent) const
virtual

Definition at line 32 of file CREQuestItemModel.cpp.

References myQuest, and parent().

+ Here is the call graph for this function:

◆ data()

QVariant CREQuestItemModel::data ( const QModelIndex &  index,
int  role 
) const
virtual

Definition at line 87 of file CREQuestItemModel.cpp.

References conditionsToString(), getStep(), index(), myQuest, and toDisplay().

+ Here is the call graph for this function:

◆ flags()

Qt::ItemFlags CREQuestItemModel::flags ( const QModelIndex &  index) const
virtual

Definition at line 142 of file CREQuestItemModel.cpp.

References index().

+ Here is the call graph for this function:

◆ getStep()

quest_step_definition * CREQuestItemModel::getStep ( int  step) const
protected

Definition at line 297 of file CREQuestItemModel.cpp.

References replace::current, myQuest, myStepCount, and quest_definition::steps.

Referenced by data(), and setData().

+ Here is the caller graph for this function:

◆ headerData()

QVariant CREQuestItemModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role 
) const
virtual

Definition at line 122 of file CREQuestItemModel.cpp.

◆ index()

QModelIndex CREQuestItemModel::index ( int  row,
int  column,
const QModelIndex &  parent 
) const
virtual

Definition at line 43 of file CREQuestItemModel.cpp.

References parent().

Referenced by data(), flags(), and setData().

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

◆ moveDown()

void CREQuestItemModel::moveDown ( int  step)

Definition at line 289 of file CREQuestItemModel.cpp.

References moveUp(), and myStepCount.

Referenced by CREQuestPanel::moveDown().

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

◆ moveUp()

void CREQuestItemModel::moveUp ( int  step)

Definition at line 256 of file CREQuestItemModel.cpp.

References myQuest, myStepCount, quest_step_definition::next, questModified(), and quest_definition::steps.

Referenced by moveDown(), and CREQuestPanel::moveUp().

+ Here is the caller graph for this function:

◆ parent()

QModelIndex CREQuestItemModel::parent ( const QModelIndex &  index) const
virtual

Definition at line 51 of file CREQuestItemModel.cpp.

Referenced by columnCount(), index(), removeRows(), and rowCount().

+ Here is the caller graph for this function:

◆ quest()

quest_definition * CREQuestItemModel::quest ( ) const

Definition at line 13 of file CREQuestItemModel.cpp.

References myQuest.

Referenced by setQuest().

+ Here is the caller graph for this function:

◆ questModified

void CREQuestItemModel::questModified ( quest_definition quest)
signal

Referenced by addStep(), moveUp(), removeRows(), and setData().

+ Here is the caller graph for this function:

◆ removeRows()

bool CREQuestItemModel::removeRows ( int  row,
int  count,
const QModelIndex &  parent = QModelIndex() 
)
virtual

Definition at line 225 of file CREQuestItemModel.cpp.

References disinfect::count, myQuest, myStepCount, quest_step_definition::next, parent(), quest_destroy_step(), questModified(), and quest_definition::steps.

+ Here is the call graph for this function:

◆ rowCount()

int CREQuestItemModel::rowCount ( const QModelIndex &  parent) const
virtual

Definition at line 56 of file CREQuestItemModel.cpp.

References myQuest, myStepCount, and parent().

+ Here is the call graph for this function:

◆ setData()

bool CREQuestItemModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
virtual

◆ setQuest()

void CREQuestItemModel::setQuest ( quest_definition quest)

Definition at line 18 of file CREQuestItemModel.cpp.

References myQuest, myStepCount, quest(), and quest_definition::steps.

Referenced by CREQuestPanel::displaySteps().

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

Field Documentation

◆ myQuest

quest_definition* CREQuestItemModel::myQuest
protected

◆ myStepCount

int CREQuestItemModel::myStepCount
protected

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