Crossfire Server, Trunk
CREPrePostPanel Class Reference

#include <CREPrePostPanel.h>

+ Inheritance diagram for CREPrePostPanel:
+ Collaboration diagram for CREPrePostPanel:

Public Member Functions

 CREPrePostPanel (PrePostWidget::Mode mode, const QList< QuestConditionScript * > scripts, QWidget *parent)
 
QStringList getData ()
 
void setData (const QStringList &data)
 
virtual ~CREPrePostPanel ()
 

Private Slots

void currentChoiceChanged (int index)
 
void onReset (bool)
 
void subItemChanged (const QStringList &data)
 

Private Member Functions

CRESubItemWidgetcreateSubItemWidget (const QuestConditionScript *script)
 

Private Attributes

QComboBox * myChoices
 
QStringList myData
 
PrePostWidget::Mode myMode
 
QStringList myOriginal
 
QStackedWidget * mySubItemsStack
 
QList< CRESubItemWidget * > mySubWidgets
 

Detailed Description

Edition of a single pre- or post- condition for a message, or a quest step list for a quest step.

Definition at line 152 of file CREPrePostPanel.h.

Constructor & Destructor Documentation

◆ CREPrePostPanel()

CREPrePostPanel::CREPrePostPanel ( PrePostWidget::Mode  mode,
const QList< QuestConditionScript * >  scripts,
QWidget *  parent 
)

Standard constructor.

Parameters
modewhat mode to work on.
scriptsavailable script types for the conditions.
parentancestor of this panel.

Definition at line 426 of file CREPrePostPanel.cpp.

References createSubItemWidget(), currentChoiceChanged(), myChoices, mySubItemsStack, mySubWidgets, give::name, onReset(), PrePostWidget::PostConditions, PrePostWidget::PreConditions, python_init::scripts, PrePostWidget::SetWhen, and subItemChanged().

+ Here is the call graph for this function:

◆ ~CREPrePostPanel()

CREPrePostPanel::~CREPrePostPanel ( )
virtual

Definition at line 475 of file CREPrePostPanel.cpp.

Member Function Documentation

◆ createSubItemWidget()

CRESubItemWidget * CREPrePostPanel::createSubItemWidget ( const QuestConditionScript script)
private

Creates a CRESubItemWidget for the specified script.

Parameters
scriptthe script to create the display for.
Returns
specialised CRESubItemWidget if available, CRESubItemList else.

Definition at line 516 of file CREPrePostPanel.cpp.

References myMode, QuestConditionScript::name(), PrePostWidget::PostConditions, and PrePostWidget::PreConditions.

Referenced by CREPrePostPanel().

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

◆ currentChoiceChanged

void CREPrePostPanel::currentChoiceChanged ( int  index)
privateslot

Definition at line 498 of file CREPrePostPanel.cpp.

References myChoices, myData, mySubItemsStack, and mySubWidgets.

Referenced by CREPrePostPanel().

+ Here is the caller graph for this function:

◆ getData()

QStringList CREPrePostPanel::getData ( )

Definition at line 479 of file CREPrePostPanel.cpp.

References myData.

Referenced by CREPrePostSingleConditionDelegate::setModelData().

+ Here is the caller graph for this function:

◆ onReset

void CREPrePostPanel::onReset ( bool  )
privateslot

Definition at line 530 of file CREPrePostPanel.cpp.

References myOriginal, and setData().

Referenced by CREPrePostPanel().

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

◆ setData()

void CREPrePostPanel::setData ( const QStringList &  data)

Definition at line 484 of file CREPrePostPanel.cpp.

References navar-midane_time::data, myChoices, myData, myMode, myOriginal, mySubWidgets, and PrePostWidget::SetWhen.

Referenced by onReset(), and CREPrePostSingleConditionDelegate::setEditorData().

+ Here is the caller graph for this function:

◆ subItemChanged

void CREPrePostPanel::subItemChanged ( const QStringList &  data)
privateslot

Definition at line 509 of file CREPrePostPanel.cpp.

References navar-midane_time::data, and myData.

Referenced by CREPrePostPanel().

+ Here is the caller graph for this function:

Field Documentation

◆ myChoices

QComboBox* CREPrePostPanel::myChoices
private

Available conditions types.

Definition at line 175 of file CREPrePostPanel.h.

Referenced by CREPrePostPanel(), currentChoiceChanged(), and setData().

◆ myData

QStringList CREPrePostPanel::myData
private

Pre- or post- condition we're working on.

Definition at line 171 of file CREPrePostPanel.h.

Referenced by currentChoiceChanged(), getData(), setData(), and subItemChanged().

◆ myMode

PrePostWidget::Mode CREPrePostPanel::myMode
private

Mode we're working in.

Definition at line 181 of file CREPrePostPanel.h.

Referenced by createSubItemWidget(), and setData().

◆ myOriginal

QStringList CREPrePostPanel::myOriginal
private

Original data, to reset the state.

Definition at line 173 of file CREPrePostPanel.h.

Referenced by onReset(), and setData().

◆ mySubItemsStack

QStackedWidget* CREPrePostPanel::mySubItemsStack
private

Arguments panels, only one visible based on the choice.

Definition at line 179 of file CREPrePostPanel.h.

Referenced by CREPrePostPanel(), and currentChoiceChanged().

◆ mySubWidgets

QList<CRESubItemWidget*> CREPrePostPanel::mySubWidgets
private

Matching between index of myChoices and the variable subpanels.

Definition at line 177 of file CREPrePostPanel.h.

Referenced by CREPrePostPanel(), currentChoiceChanged(), and setData().


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