Crossfire Server, Trunk
CREMessagePanel Class Reference

#include <CREMessagePanel.h>

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

Public Member Functions

virtual void commitData () override
 
 CREMessagePanel (const MessageManager *manager, QWidget *parent)
 
virtual void setItem (MessageFile *message) override
 
virtual ~CREMessagePanel ()
 
- Public Member Functions inherited from CRETPanel< MessageFile >
 CRETPanel (QWidget *parent)
 
- Public Member Functions inherited from CREPanel
 CREPanel (QWidget *parent)
 
virtual ~CREPanel ()
 

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
 
QLineEdit * myLocation
 
MessageFilemyMessage
 
const MessageManagermyMessageManager
 
CREMessageItemModelmyModel
 
MessageFilemyOriginal
 
QLineEdit * myPath
 
QTableView * myRules
 
QTreeWidget * myUse
 

Detailed Description

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

Definition at line 20 of file CREMessagePanel.h.

Constructor & Destructor Documentation

◆ CREMessagePanel()

CREMessagePanel::CREMessagePanel ( const MessageManager manager,
QWidget *  parent 
)

◆ ~CREMessagePanel()

CREMessagePanel::~CREMessagePanel ( )
virtual

Definition at line 93 of file CREMessagePanel.cpp.

References myOriginal.

Member Function Documentation

◆ commitData()

void CREMessagePanel::commitData ( )
overridevirtual

Reimplemented from CREPanel.

Definition at line 187 of file CREMessagePanel.cpp.

References myLocation, myMessage, myPath, MessageFile::setLocation(), and MessageFile::setPath().

+ Here is the call graph for this function:

◆ currentRowChanged

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

Definition at line 170 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 175 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 182 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 213 of file CREMessagePanel.cpp.

References CREMessageItemModel::duplicateRow(), CREMessageItemModel::index(), npc_dialog::index, myMessage, 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 203 of file CREMessagePanel.cpp.

References CREMessageItemModel::index(), npc_dialog::index, CREMessageItemModel::moveUpDown(), myMessage, 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 193 of file CREMessagePanel.cpp.

References CREMessageItemModel::index(), npc_dialog::index, CREMessageItemModel::moveUpDown(), myMessage, 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 223 of file CREMessagePanel.cpp.

References MessageFile::copy(), myMessage, myOriginal, and setItem().

Referenced by CREMessagePanel().

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

◆ setItem()

void CREMessagePanel::setItem ( MessageFile message)
overridevirtual

Field Documentation

◆ myDefaultBackground

QBrush CREMessagePanel::myDefaultBackground
private

Definition at line 41 of file CREMessagePanel.h.

◆ myLocation

QLineEdit* CREMessagePanel::myLocation
private

Definition at line 38 of file CREMessagePanel.h.

Referenced by commitData(), CREMessagePanel(), and setItem().

◆ myMessage

MessageFile* CREMessagePanel::myMessage
private

◆ myMessageManager

const MessageManager* CREMessagePanel::myMessageManager
private

Definition at line 34 of file CREMessagePanel.h.

Referenced by CREMessagePanel(), and setItem().

◆ myModel

CREMessageItemModel* CREMessagePanel::myModel
private

◆ myOriginal

MessageFile* CREMessagePanel::myOriginal
private

Definition at line 36 of file CREMessagePanel.h.

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

◆ myPath

QLineEdit* CREMessagePanel::myPath
private

Definition at line 37 of file CREMessagePanel.h.

Referenced by commitData(), CREMessagePanel(), and setItem().

◆ myRules

QTableView* CREMessagePanel::myRules
private

◆ myUse

QTreeWidget* CREMessagePanel::myUse
private

Definition at line 42 of file CREMessagePanel.h.

Referenced by CREMessagePanel(), and setItem().


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