Crossfire Server, Trunk
CREMessagePanel Class Reference

#include <CREMessagePanel.h>

+ Inheritance diagram for CREMessagePanel:
+ Collaboration diagram for CREMessagePanel:

Public Member Functions

 CREMessagePanel (const MessageManager *manager, QWidget *parent)
 
virtual void updateItem () override
 
virtual ~CREMessagePanel ()
 
- Public Member Functions inherited from AssetSWrapperPanel< MessageFile >
 AssetSWrapperPanel (QWidget *parent)
 
virtual void setAsset (AssetWrapper *asset) override
 
- Public Member Functions inherited from AssetWrapperPanel
ArchetypeComboBoxaddArchetype (const QString &label, const char *property, bool readOnly=false, bool allowNone=true)
 
AssetUseTreeaddAssetUseTree (const QString &label, AssetModel *assets, const char *property)
 
void addBottomFiller ()
 
QCheckBox * addCheckBox (const QString &label, const char *property, bool readOnly=true)
 
void addFaceChoice (const QString &label, const char *property, bool readOnly=true, bool allowNone=true)
 
QLabel * addLabel (const QString &label, const char *property)
 
QLineEdit * addLineEdit (const QString &label, const char *property, bool readOnly=true)
 
void addQuestChoice (const QString &label, const char *property, bool readOnly=true, bool allowNone=true)
 
QSpinBox * addSpinBox (const QString &label, const char *property, int min=0, int max=100, bool readOnly=true)
 
void addTab (const QString &title)
 
QTextEdit * addTextEdit (const QString &label, const char *property, bool readOnly=true)
 
TreasureListComboBoxaddTreasureList (const QString &label, const char *property, bool readOnly=true, bool allowNone=true)
 
 AssetWrapperPanel (QWidget *parent)
 
virtual ~AssetWrapperPanel ()
 

Private Slots

void currentRowChanged (const QModelIndex &current, const QModelIndex &previous)
 
void onAddRule (bool)
 
void onDeleteRule (bool)
 
void onDuplicate (bool)
 
void onMoveDown (bool)
 
void onMoveUp (bool)
 
void onReset (bool)
 

Private Attributes

QBrush myDefaultBackground
 
const MessageManagermyMessageManager
 
CREMessageItemModelmyModel
 
MessageFilemyOriginal
 
QLineEdit * myPath
 
QTableView * myRules
 
QTreeWidget * myUse
 

Additional Inherited Members

- Protected Slots inherited from AssetWrapperPanel
void dataChanged ()
 
void itemChanged ()
 
- Protected Member Functions inherited from AssetWrapperPanel
template<class T >
T * addWidget (const QString &label, T *widget, bool sideBySide, const char *property, const char *widgetProperty)
 
- Protected Attributes inherited from AssetSWrapperPanel< MessageFile >
MessageFilemyItem
 
- Protected Attributes inherited from AssetWrapperPanel
AssetWrappermyAsset
 
QMetaObject::Connection myChanged
 
QMetaObject::Connection myDelete
 
bool myInhibit
 
QGridLayout * myLayout
 
QList< PropertyLinkmyLinks
 
QTabWidget * myTab
 

Detailed Description

Display information about a NPC message file, and allow edition.

Definition at line 31 of file CREMessagePanel.h.

Constructor & Destructor Documentation

◆ CREMessagePanel()

◆ ~CREMessagePanel()

CREMessagePanel::~CREMessagePanel ( )
virtual

Definition at line 88 of file CREMessagePanel.cpp.

References myOriginal.

Member Function Documentation

◆ currentRowChanged

void CREMessagePanel::currentRowChanged ( const QModelIndex &  current,
const QModelIndex &  previous 
)
privateslot

Definition at line 167 of file CREMessagePanel.cpp.

References replace::current, myModel, and CREMessageItemModel::setSelectedRule().

Referenced by CREMessagePanel().

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

◆ onAddRule

void CREMessagePanel::onAddRule ( bool  )
privateslot

Definition at line 172 of file CREMessagePanel.cpp.

References CREMessageItemModel::index(), CREMessageItemModel::insertRows(), myModel, and myRules.

Referenced by CREMessagePanel().

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

◆ onDeleteRule

void CREMessagePanel::onDeleteRule ( bool  )
privateslot

Definition at line 179 of file CREMessagePanel.cpp.

References myModel, myRules, and CREMessageItemModel::removeRows().

Referenced by CREMessagePanel().

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

◆ onDuplicate

void CREMessagePanel::onDuplicate ( bool  )
privateslot

Definition at line 204 of file CREMessagePanel.cpp.

References CREMessageItemModel::duplicateRow(), CREMessageItemModel::index(), npc_dialog::index, AssetSWrapperPanel< MessageFile >::myItem, myModel, myRules, and MessageFile::rules().

Referenced by CREMessagePanel().

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

◆ onMoveDown

void CREMessagePanel::onMoveDown ( bool  )
privateslot

Definition at line 194 of file CREMessagePanel.cpp.

References CREMessageItemModel::index(), npc_dialog::index, CREMessageItemModel::moveUpDown(), AssetSWrapperPanel< MessageFile >::myItem, myModel, myRules, and MessageFile::rules().

Referenced by CREMessagePanel().

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

◆ onMoveUp

void CREMessagePanel::onMoveUp ( bool  )
privateslot

Definition at line 184 of file CREMessagePanel.cpp.

References CREMessageItemModel::index(), npc_dialog::index, CREMessageItemModel::moveUpDown(), AssetSWrapperPanel< MessageFile >::myItem, myModel, myRules, and MessageFile::rules().

Referenced by CREMessagePanel().

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

◆ onReset

void CREMessagePanel::onReset ( bool  )
privateslot

Definition at line 214 of file CREMessagePanel.cpp.

References MessageFile::copy(), AssetSWrapperPanel< MessageFile >::myItem, myOriginal, and updateItem().

Referenced by CREMessagePanel().

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

◆ updateItem()

void CREMessagePanel::updateItem ( )
overridevirtual

Called when myItem was updated.

Implements AssetSWrapperPanel< MessageFile >.

Definition at line 93 of file CREMessagePanel.cpp.

References MessageFile::duplicate(), mad_mage_user::file, sunnista::got, disinfect::map, MessageFile::maps(), MessageManager::messages(), AssetSWrapperPanel< MessageFile >::myItem, myMessageManager, myModel, myOriginal, myPath, myUse, MessageFile::path, root, npc_dialog::rule, and CREMessageItemModel::setMessage().

Referenced by onReset().

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

Field Documentation

◆ myDefaultBackground

QBrush CREMessagePanel::myDefaultBackground
private

Definition at line 47 of file CREMessagePanel.h.

◆ myMessageManager

const MessageManager* CREMessagePanel::myMessageManager
private

Definition at line 42 of file CREMessagePanel.h.

Referenced by CREMessagePanel(), and updateItem().

◆ myModel

CREMessageItemModel* CREMessagePanel::myModel
private

◆ myOriginal

MessageFile* CREMessagePanel::myOriginal
private

Definition at line 43 of file CREMessagePanel.h.

Referenced by CREMessagePanel(), onReset(), updateItem(), and ~CREMessagePanel().

◆ myPath

QLineEdit* CREMessagePanel::myPath
private

Definition at line 44 of file CREMessagePanel.h.

Referenced by CREMessagePanel(), and updateItem().

◆ myRules

QTableView* CREMessagePanel::myRules
private

◆ myUse

QTreeWidget* CREMessagePanel::myUse
private

Definition at line 48 of file CREMessagePanel.h.

Referenced by CREMessagePanel(), and updateItem().


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