Crossfire Server, Trunk  R20513
Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes
CREPrePostPanel Class Reference

This panel is the 'pre' or 'post' subpanel in the messages panel. More...

#include <CREPrePostPanel.h>

Inheritance diagram for CREPrePostPanel:
Inheritance graph
Collaboration diagram for CREPrePostPanel:
Collaboration graph

Signals

void dataModified ()
 Emitted when the data this panel manages was changed. More...
 

Public Member Functions

 CREPrePostPanel (bool isPre, const QList< QuestConditionScript * > scripts, const QuestManager *quests, QWidget *parent)
 Standard constructor. More...
 
QList< QStringList > getData ()
 
void setData (const QList< QStringList > data)
 
virtual ~CREPrePostPanel ()
 

Private Slots

void currentChoiceChanged (int index)
 
void currentItemChanged (int index)
 
void onAddItem (bool)
 
void onDeleteItem (bool)
 
void subItemChanged (const QStringList &data)
 

Private Member Functions

CRESubItemWidgetcreateSubItemWidget (bool isPre, const QuestConditionScript *script, const QuestManager *quests)
 Creates a CRESubItemWidget for the specified script. More...
 

Private Attributes

QComboBox * myChoices
 Available conditions types. More...
 
QList< QStringList > myData
 Pre- or post- conditions we're working on. More...
 
QListWidget * myItems
 The first item of each condition. More...
 
QStackedWidget * mySubItemsStack
 Arguments panels, only one visible based on the choice. More...
 
QList< CRESubItemWidget * > mySubWidgets
 Matching between index of myChoices and the variable subpanels. More...
 

Detailed Description

This panel is the 'pre' or 'post' subpanel in the messages panel.

Definition at line 142 of file CREPrePostPanel.h.

Constructor & Destructor Documentation

CREPrePostPanel::CREPrePostPanel ( bool  isPre,
const QList< QuestConditionScript * >  scripts,
const QuestManager quests,
QWidget *  parent 
)

Standard constructor.

Parameters
isPretrue if displaying preconditions, false for postconditions.
scriptsavailable script types for the conditions.
parentancestor of this panel.

Definition at line 388 of file CREPrePostPanel.cpp.

References createSubItemWidget(), currentChoiceChanged(), currentItemChanged(), dataModified(), myChoices, myItems, mySubItemsStack, mySubWidgets, onAddItem(), onDeleteItem(), and subItemChanged().

Here is the call graph for this function:

CREPrePostPanel::~CREPrePostPanel ( )
virtual

Definition at line 424 of file CREPrePostPanel.cpp.

Member Function Documentation

CRESubItemWidget * CREPrePostPanel::createSubItemWidget ( bool  isPre,
const QuestConditionScript script,
const QuestManager quests 
)
private

Creates a CRESubItemWidget for the specified script.

Parameters
isPretrue if pre-condition, false for post-condition.
scriptthe script to create the display for.
questsavailable quests, for specific panel.
Returns
specialised CRESubItemWidget if available, CRESubItemList else.

Definition at line 512 of file CREPrePostPanel.cpp.

References QuestConditionScript::name().

Referenced by CREPrePostPanel().

Here is the call graph for this function:

Here is the caller graph for this function:

void CREPrePostPanel::currentChoiceChanged ( int  index)
privateslot

Definition at line 481 of file CREPrePostPanel.cpp.

References dataModified(), myChoices, myData, myItems, mySubItemsStack, and mySubWidgets.

Referenced by CREPrePostPanel().

Here is the caller graph for this function:

void CREPrePostPanel::currentItemChanged ( int  index)
privateslot

Definition at line 467 of file CREPrePostPanel.cpp.

References myChoices, myData, and mySubWidgets.

Referenced by CREPrePostPanel().

Here is the caller graph for this function:

void CREPrePostPanel::dataModified ( )
signal

Emitted when the data this panel manages was changed.

Referenced by CREPrePostPanel(), currentChoiceChanged(), onAddItem(), onDeleteItem(), and subItemChanged().

Here is the caller graph for this function:

QList< QStringList > CREPrePostPanel::getData ( )

Definition at line 428 of file CREPrePostPanel.cpp.

References myData.

Referenced by CRERulePanel::onPostModified(), and CRERulePanel::onPreModified().

Here is the caller graph for this function:

void CREPrePostPanel::onAddItem ( bool  )
privateslot

Definition at line 448 of file CREPrePostPanel.cpp.

References dataModified(), myData, and myItems.

Referenced by CREPrePostPanel().

Here is the caller graph for this function:

void CREPrePostPanel::onDeleteItem ( bool  )
privateslot

Definition at line 456 of file CREPrePostPanel.cpp.

References dataModified(), myData, and myItems.

Referenced by CREPrePostPanel().

Here is the caller graph for this function:

void CREPrePostPanel::setData ( const QList< QStringList >  data)

Definition at line 433 of file CREPrePostPanel.cpp.

References myData, and myItems.

Referenced by CRERulePanel::setMessageRule().

Here is the caller graph for this function:

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

Definition at line 499 of file CREPrePostPanel.cpp.

References dataModified(), myData, and myItems.

Referenced by CREPrePostPanel().

Here is the caller graph for this function:

Field Documentation

QComboBox* CREPrePostPanel::myChoices
private

Available conditions types.

Definition at line 169 of file CREPrePostPanel.h.

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

QList<QStringList> CREPrePostPanel::myData
private

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

Definition at line 165 of file CREPrePostPanel.h.

Referenced by currentChoiceChanged(), currentItemChanged(), getData(), onAddItem(), onDeleteItem(), setData(), and subItemChanged().

QListWidget* CREPrePostPanel::myItems
private

The first item of each condition.

Definition at line 167 of file CREPrePostPanel.h.

Referenced by CREPrePostPanel(), currentChoiceChanged(), onAddItem(), onDeleteItem(), setData(), and subItemChanged().

QStackedWidget* CREPrePostPanel::mySubItemsStack
private

Arguments panels, only one visible based on the choice.

Definition at line 173 of file CREPrePostPanel.h.

Referenced by CREPrePostPanel(), and currentChoiceChanged().

QList<CRESubItemWidget*> CREPrePostPanel::mySubWidgets
private

Matching between index of myChoices and the variable subpanels.

Definition at line 171 of file CREPrePostPanel.h.

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


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