OpenMW
|
Use commands instead of manipulating the model directly. More...
#include <util.hpp>
Public Member Functions | |
CommandDelegateFactoryCollection () | |
~CommandDelegateFactoryCollection () | |
void | add (CSMWorld::ColumnBase::Display display, CommandDelegateFactory *factory) |
CommandDelegate * | makeDelegate (CSMWorld::ColumnBase::Display display, QUndoStack &undoStack, QObject *parent) const |
Static Public Member Functions | |
static const CommandDelegateFactoryCollection & | get () |
Private Member Functions | |
CommandDelegateFactoryCollection (const CommandDelegateFactoryCollection &) | |
CommandDelegateFactoryCollection & | operator= (const CommandDelegateFactoryCollection &) |
Private Attributes | |
std::map < CSMWorld::ColumnBase::Display, CommandDelegateFactory * > | mFactories |
Static Private Attributes | |
static CommandDelegateFactoryCollection * | sThis = 0 |
Use commands instead of manipulating the model directly.
CSVWorld::CommandDelegateFactoryCollection::CommandDelegateFactoryCollection | ( | const CommandDelegateFactoryCollection & | ) | [private] |
void CSVWorld::CommandDelegateFactoryCollection::add | ( | CSMWorld::ColumnBase::Display | display, |
CommandDelegateFactory * | factory | ||
) |
The ownership of \æ factory is transferred to *this.
This function must not be called more than once per value of \æ display.
const CSVWorld::CommandDelegateFactoryCollection & CSVWorld::CommandDelegateFactoryCollection::get | ( | ) | [static] |
CSVWorld::CommandDelegate * CSVWorld::CommandDelegateFactoryCollection::makeDelegate | ( | CSMWorld::ColumnBase::Display | display, |
QUndoStack & | undoStack, | ||
QObject * | parent | ||
) | const |
The ownership of the returned CommandDelegate is transferred to the caller.
If no factory is registered for display, a CommandDelegate will be returned.
CommandDelegateFactoryCollection& CSVWorld::CommandDelegateFactoryCollection::operator= | ( | const CommandDelegateFactoryCollection & | ) | [private] |
std::map<CSMWorld::ColumnBase::Display, CommandDelegateFactory *> CSVWorld::CommandDelegateFactoryCollection::mFactories [private] |
CSVWorld::CommandDelegateFactoryCollection * CSVWorld::CommandDelegateFactoryCollection::sThis = 0 [static, private] |