diff options
author | Lukáš Lalinský <lalinsky@gmail.com> | 2008-12-07 13:23:12 +0100 |
---|---|---|
committer | Lukáš Lalinský <lalinsky@gmail.com> | 2008-12-07 13:23:12 +0100 |
commit | 67aa58e87c32fad4948abd859db30a4e7f9551c7 (patch) | |
tree | 493d42a676db1ad41d0bb04d019d82e5951b6c32 /src/commands.h | |
parent | 9e917b7f88963a7996d5d09c99e4ca41bde60e56 (diff) | |
download | dbmodel-67aa58e87c32fad4948abd859db30a4e7f9551c7.tar.xz |
Make item additions undo-able
Diffstat (limited to 'src/commands.h')
-rw-r--r-- | src/commands.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/commands.h b/src/commands.h index 142b62c..617193c 100644 --- a/src/commands.h +++ b/src/commands.h @@ -98,4 +98,18 @@ private: QPointF m_oldPos, m_newPos; }; +class AddItemCommand : public QUndoCommand +{ +public: + AddItemCommand(DiagramDocument *document, DiagramItem *item, QUndoCommand *parent = 0); + ~AddItemCommand(); + void undo(); + void redo(); + +private: + DiagramDocument *m_document; + DiagramItem *m_item; + bool m_owner; +}; + #endif |