OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Slots | Public Member Functions | Private Member Functions | Private Attributes | List of all members
CSMWorld::CommandDispatcher Class Reference

#include <commanddispatcher.hpp>

Inheritance diagram for CSMWorld::CommandDispatcher:
Collaboration diagram for CSMWorld::CommandDispatcher:

Public Slots

void executeDelete ()
 
void executeRevert ()
 
void executeExtendedDelete ()
 
void executeExtendedRevert ()
 

Public Member Functions

 CommandDispatcher (CSMDoc::Document &document, const CSMWorld::UniversalId &id, QObject *parent=0)
 
void setEditLock (bool locked)
 
void setSelection (const std::vector< std::string > &selection)
 
void setExtendedTypes (const std::vector< UniversalId > &types)
 Set record lists selected by the user for extended operations. More...
 
bool canDelete () const
 
bool canRevert () const
 
std::vector< UniversalIdgetExtendedTypes () const
 
void executeModify (QAbstractItemModel *model, const QModelIndex &index, const QVariant &new_)
 

Private Member Functions

std::vector< std::string > getDeletableRecords () const
 
std::vector< std::string > getRevertableRecords () const
 

Private Attributes

bool mLocked
 
CSMDoc::DocumentmDocument
 
UniversalId mId
 
std::vector< std::string > mSelection
 
std::vector< UniversalIdmExtendedTypes
 

Constructor & Destructor Documentation

CSMWorld::CommandDispatcher::CommandDispatcher ( CSMDoc::Document document,
const CSMWorld::UniversalId id,
QObject parent = 0 
)
Parameters
idID of the table the commands should operate on primarily.

Member Function Documentation

bool CSMWorld::CommandDispatcher::canDelete ( ) const

Here is the caller graph for this function:

bool CSMWorld::CommandDispatcher::canRevert ( ) const

Here is the caller graph for this function:

void CSMWorld::CommandDispatcher::executeDelete ( )
slot

Here is the call graph for this function:

void CSMWorld::CommandDispatcher::executeExtendedDelete ( )
slot

Here is the call graph for this function:

void CSMWorld::CommandDispatcher::executeExtendedRevert ( )
slot

Here is the call graph for this function:

void CSMWorld::CommandDispatcher::executeModify ( QAbstractItemModel model,
const QModelIndex &  index,
const QVariant &  new_ 
)

Add a modify command to the undo stack.

Attention
model must either be a model for the table operated on by this dispatcher or a proxy of it.

Here is the call graph for this function:

void CSMWorld::CommandDispatcher::executeRevert ( )
slot

Here is the call graph for this function:

std::vector< std::string > CSMWorld::CommandDispatcher::getDeletableRecords ( ) const
private

Here is the call graph for this function:

std::vector< CSMWorld::UniversalId > CSMWorld::CommandDispatcher::getExtendedTypes ( ) const

Return IDs of the record collection that can also be affected when operating on the record collection this dispatcher is used for.

Note
The returned collection contains the ID of the record collection this dispatcher is used for. However if that record collection does not support the extended mode, the returned vector will be empty instead.
Todo:
add other cell-specific types

Here is the caller graph for this function:

std::vector< std::string > CSMWorld::CommandDispatcher::getRevertableRecords ( ) const
private
Todo:
Reverting temporarily disabled on tables that support reordering, because revert logic currently can not handle reordering.

Here is the call graph for this function:

void CSMWorld::CommandDispatcher::setEditLock ( bool  locked)
void CSMWorld::CommandDispatcher::setExtendedTypes ( const std::vector< UniversalId > &  types)

Set record lists selected by the user for extended operations.

Here is the caller graph for this function:

void CSMWorld::CommandDispatcher::setSelection ( const std::vector< std::string > &  selection)

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

CSMDoc::Document& CSMWorld::CommandDispatcher::mDocument
private
std::vector<UniversalId> CSMWorld::CommandDispatcher::mExtendedTypes
private
UniversalId CSMWorld::CommandDispatcher::mId
private
bool CSMWorld::CommandDispatcher::mLocked
private
std::vector<std::string> CSMWorld::CommandDispatcher::mSelection
private

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