Crossfire Server, Trunk
|
#include <CREMessageItemModel.h>
Public Member Functions | |
virtual int | columnCount (const QModelIndex &parent) const override |
CREMessageItemModel (QObject *parent) | |
virtual QVariant | data (const QModelIndex &index, int role) const override |
void | duplicateRow (int row) |
virtual Qt::ItemFlags | flags (const QModelIndex &index) const override |
virtual QVariant | headerData (int section, Qt::Orientation orientation, int role) const override |
virtual QModelIndex | index (int row, int column, const QModelIndex &parent) const override |
virtual bool | insertRows (int row, int count, const QModelIndex &parent=QModelIndex()) override |
void | moveUpDown (int row, bool up) |
virtual QModelIndex | parent (const QModelIndex &index) const override |
virtual bool | removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) override |
virtual int | rowCount (const QModelIndex &parent) const override |
virtual bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
void | setMessage (MessageFile *message) |
void | setSelectedRule (const QModelIndex &index) |
virtual | ~CREMessageItemModel () |
Protected Attributes | |
QSet< int > | myBlue |
MessageFile * | myMessage |
QSet< int > | myRed |
Item model for a message file.
Definition at line 26 of file CREMessageItemModel.h.
CREMessageItemModel::CREMessageItemModel | ( | QObject * | parent | ) |
Definition at line 17 of file CREMessageItemModel.cpp.
|
virtual |
Definition at line 21 of file CREMessageItemModel.cpp.
|
overridevirtual |
Definition at line 136 of file CREMessageItemModel.cpp.
References parent().
|
overridevirtual |
Definition at line 171 of file CREMessageItemModel.cpp.
References index(), myBlue, myMessage, myRed, npc_dialog::rule, MessageFile::rules(), and toDisplay().
void CREMessageItemModel::duplicateRow | ( | int | row | ) |
Definition at line 333 of file CREMessageItemModel.cpp.
References myMessage, MessageFile::rules(), and MessageFile::setModified().
Referenced by CREMessagePanel::onDuplicate().
|
overridevirtual |
Definition at line 234 of file CREMessageItemModel.cpp.
References index().
|
overridevirtual |
Definition at line 210 of file CREMessageItemModel.cpp.
|
overridevirtual |
Definition at line 143 of file CREMessageItemModel.cpp.
References parent().
Referenced by data(), flags(), CREMessagePanel::onAddRule(), CREMessagePanel::onDuplicate(), CREMessagePanel::onMoveDown(), CREMessagePanel::onMoveUp(), rowCount(), setData(), and setSelectedRule().
|
overridevirtual |
Definition at line 280 of file CREMessageItemModel.cpp.
References disinfect::count, myMessage, parent(), MessageFile::rules(), and MessageFile::setModified().
Referenced by CREMessagePanel::onAddRule().
void CREMessageItemModel::moveUpDown | ( | int | row, |
bool | up | ||
) |
Definition at line 316 of file CREMessageItemModel.cpp.
References myMessage, MessageFile::rules(), and MessageFile::setModified().
Referenced by CREMessagePanel::onMoveDown(), and CREMessagePanel::onMoveUp().
|
overridevirtual |
Definition at line 150 of file CREMessageItemModel.cpp.
Referenced by columnCount(), index(), insertRows(), and removeRows().
|
overridevirtual |
Definition at line 297 of file CREMessageItemModel.cpp.
References disinfect::count, myMessage, parent(), MessageFile::rules(), and MessageFile::setModified().
Referenced by CREMessagePanel::onDeleteRule().
|
overridevirtual |
Definition at line 155 of file CREMessageItemModel.cpp.
References index(), myMessage, and MessageFile::rules().
|
overridevirtual |
Definition at line 241 of file CREMessageItemModel.cpp.
References index(), myMessage, npc_dialog::rule, MessageFile::rules(), MessageFile::setModified(), and autojail::value.
void CREMessageItemModel::setMessage | ( | MessageFile * | message | ) |
Definition at line 25 of file CREMessageItemModel.cpp.
References diamondslots::message, and myMessage.
Referenced by CREMessagePanel::updateItem().
void CREMessageItemModel::setSelectedRule | ( | const QModelIndex & | index | ) |
Definition at line 32 of file CREMessageItemModel.cpp.
References Ice::b, c, bigchest::check, index(), push::match, myBlue, myMessage, myRed, ring_occidental_mages::r, npc_dialog::rule, and MessageFile::rules().
Referenced by CREMessagePanel::currentRowChanged().
|
protected |
Definition at line 53 of file CREMessageItemModel.h.
Referenced by data(), and setSelectedRule().
|
protected |
Message file currently displayed.
Definition at line 52 of file CREMessageItemModel.h.
Referenced by data(), duplicateRow(), insertRows(), moveUpDown(), removeRows(), rowCount(), setData(), setMessage(), and setSelectedRule().
|
protected |
Indexes of message rules that should be with a blue or red background.
Definition at line 53 of file CREMessageItemModel.h.
Referenced by data(), and setSelectedRule().