1 #ifndef CSM_WOLRD_COMMANDS_H
2 #define CSM_WOLRD_COMMANDS_H
11 #include <QUndoCommand>
12 #include <QModelIndex>
25 struct NestedTableWrapperBase;
72 void addValue (
int column,
const QVariant& value);
74 void addNestedValue(
int parentColumn,
int nestedColumn,
const QVariant &value);
88 const std::string& IdDestination,
ModifyCommand(QAbstractItemModel &model, const QModelIndex &index, const QVariant &new_, QUndoCommand *parent=0)
Definition: commands.cpp:18
ModifyCommand * mModifyParentCommand
Definition: commands.hpp:213
Definition: nestedtablewrapper.hpp:6
UpdateCellCommand(IdTable &model, int row, QUndoCommand *parent=0)
Definition: commands.cpp:265
int mNewRow
Definition: commands.hpp:230
std::vector< int > mNewOrder
Definition: commands.hpp:145
Definition: commands.hpp:81
Definition: commands.hpp:48
ModifyCommand * mModifyParentCommand
Definition: commands.hpp:235
Definition: idtable.hpp:15
IdTable & mModel
Definition: commands.hpp:99
ReorderRowsCommand(IdTable &model, int baseIndex, const std::vector< int > &newOrder)
Definition: commands.cpp:198
Definition: commands.hpp:188
UniversalId::Type mType
Definition: commands.hpp:123
int mBaseIndex
Definition: commands.hpp:144
const NestedTableWrapperBase & getOld() const
Definition: commands.cpp:378
Definition: commands.hpp:97
QModelIndex mIndex
Definition: commands.hpp:174
CreatePathgridCommand(IdTable &model, const std::string &id, QUndoCommand *parent=0)
Definition: commands.cpp:241
QModelIndex mRecordStateIndex
Definition: commands.hpp:35
Type
Definition: universalid.hpp:40
QVariant mNew
Definition: commands.hpp:175
std::string mIdOrigin
Definition: commands.hpp:83
IdTree & mModel
Definition: commands.hpp:204
DeleteCommand & operator=(const DeleteCommand &)
std::map< int, std::pair< int, QVariant > > mNestedValues
Definition: commands.hpp:51
void setType(UniversalId::Type type)
Definition: commands.cpp:110
virtual void redo()
Definition: commands.cpp:271
Definition: commands.hpp:118
NestedTableWrapperBase * mOld
Definition: commands.hpp:190
State
Definition: record.hpp:10
int mParentColumn
Definition: commands.hpp:232
CreateCommand(IdTable &model, const std::string &id, QUndoCommand *parent=0)
Definition: commands.cpp:94
void addValue(int column, const QVariant &value)
Definition: commands.cpp:100
IdTree & mModel
Definition: commands.hpp:226
int mNestedRow
Definition: commands.hpp:210
NestedTableStoring(const IdTree &model, const std::string &id, int parentColumn)
Definition: commands.cpp:370
virtual void redo()
Definition: commands.cpp:203
std::string mId
Definition: commands.hpp:206
RevertCommand & operator=(const RevertCommand &)
virtual void undo()
Definition: commands.cpp:333
std::string mId
Definition: commands.hpp:121
CSMWorld::RecordBase::State mOldRecordState
Definition: commands.hpp:36
QVariant mOld
Definition: commands.hpp:32
IdTable & mModel
Definition: commands.hpp:143
virtual ~DeleteCommand()
Definition: commands.cpp:170
RecordBase * mOld
Definition: commands.hpp:101
void applyModifications()
Apply modifications set via addValue.
Definition: commands.cpp:72
DeleteCommand(const DeleteCommand &)
virtual void undo()
Definition: commands.cpp:299
virtual void undo()
Definition: commands.cpp:121
virtual void redo()
Definition: commands.cpp:325
virtual void redo()
Definition: commands.cpp:139
Definition: commands.hpp:141
Definition: commands.hpp:156
~NestedTableStoring()
Definition: commands.cpp:373
RevertCommand(const RevertCommand &)
UniversalId::Type mType
Definition: commands.hpp:59
Definition: commands.hpp:202
std::map< int, QVariant > mValues
Definition: commands.hpp:50
int mRow
Definition: commands.hpp:173
QAbstractItemModel * mModel
Definition: commands.hpp:29
bool mHasRecordState
Definition: commands.hpp:34
IdTable & mModel
Definition: commands.hpp:57
AddNestedCommand(IdTree &model, const std::string &id, int nestedRow, int parentColumn, QUndoCommand *parent=0)
Definition: commands.cpp:340
Update cell ID according to x/y-coordinates.
Definition: commands.hpp:170
IdTable & mModel
Definition: commands.hpp:120
RecordBase * mOld
Definition: commands.hpp:122
DeleteNestedCommand(IdTree &model, const std::string &id, int nestedRow, int parentColumn, QUndoCommand *parent=0)
Definition: commands.cpp:305
Definition: commands.hpp:27
virtual void redo()
Definition: commands.cpp:230
CloneCommand(IdTable &model, const std::string &idOrigin, const std::string &IdDestination, const UniversalId::Type type, QUndoCommand *parent=0)
Definition: commands.cpp:219
int mParentColumn
Definition: commands.hpp:208
Definition: universalid.hpp:42
std::string mId
Definition: commands.hpp:100
Definition: idtree.hpp:25
virtual void undo()
Definition: commands.cpp:156
virtual void redo()
Definition: commands.cpp:356
virtual void redo()
Definition: commands.cpp:56
virtual void redo()
Definition: commands.cpp:175
virtual void redo()
Definition: commands.cpp:247
QVariant mNew
Definition: commands.hpp:31
Definition: commands.hpp:224
virtual void undo()
Definition: commands.cpp:208
virtual void undo()
Definition: commands.cpp:363
std::string mId
Definition: commands.hpp:228
virtual void undo()
Definition: commands.cpp:62
virtual void redo()
Definition: commands.cpp:115
QModelIndex mIndex
Definition: commands.hpp:30
QVariant mOld
Definition: commands.hpp:176
void addNestedValue(int parentColumn, int nestedColumn, const QVariant &value)
Definition: commands.cpp:105
IdTable & mModel
Definition: commands.hpp:172
virtual void undo()
Definition: commands.cpp:192
std::string mId
Definition: commands.hpp:58
virtual ~RevertCommand()
Definition: commands.cpp:134
virtual void undo()
Definition: commands.cpp:236