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

#include <commands.hpp>

Inheritance diagram for CSMWorld::CreateCommand:
Collaboration diagram for CSMWorld::CreateCommand:

Public Member Functions

 CreateCommand (IdTable &model, const std::string &id, QUndoCommand *parent=0)
 
void setType (UniversalId::Type type)
 
void addValue (int column, const QVariant &value)
 
void addNestedValue (int parentColumn, int nestedColumn, const QVariant &value)
 
virtual void redo ()
 
virtual void undo ()
 

Protected Member Functions

void applyModifications ()
 Apply modifications set via addValue. More...
 

Protected Attributes

IdTablemModel
 
std::string mId
 
UniversalId::Type mType
 

Private Attributes

std::map< int, QVariant > mValues
 
std::map< int, std::pair< int,
QVariant > > 
mNestedValues
 

Constructor & Destructor Documentation

CSMWorld::CreateCommand::CreateCommand ( IdTable model,
const std::string &  id,
QUndoCommand parent = 0 
)

Member Function Documentation

void CSMWorld::CreateCommand::addNestedValue ( int  parentColumn,
int  nestedColumn,
const QVariant &  value 
)

Here is the caller graph for this function:

void CSMWorld::CreateCommand::addValue ( int  column,
const QVariant &  value 
)

Here is the caller graph for this function:

void CSMWorld::CreateCommand::applyModifications ( )
protected

Apply modifications set via addValue.

Here is the call graph for this function:

void CSMWorld::CreateCommand::redo ( )
virtual

Reimplemented in CSMWorld::CreatePathgridCommand, and CSMWorld::CloneCommand.

Here is the caller graph for this function:

void CSMWorld::CreateCommand::setType ( UniversalId::Type  type)

Here is the caller graph for this function:

void CSMWorld::CreateCommand::undo ( )
virtual

Reimplemented in CSMWorld::CloneCommand.

Member Data Documentation

std::string CSMWorld::CreateCommand::mId
protected
IdTable& CSMWorld::CreateCommand::mModel
protected
std::map<int, std::pair<int, QVariant> > CSMWorld::CreateCommand::mNestedValues
private

Parameter order: a parent column, a nested column, a data. A nested row has index of 0.

UniversalId::Type CSMWorld::CreateCommand::mType
protected
std::map<int, QVariant> CSMWorld::CreateCommand::mValues
private

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