18 #ifndef GAZEBO_GUI_MODEL_MEUSERCMDMANAGER_HH_
19 #define GAZEBO_GUI_MODEL_MEUSERCMDMANAGER_HH_
40 class MEUserCmdPrivate;
41 class MEUserCmdManagerPrivate;
58 INSERTING_NESTED_MODEL = 2,
61 DELETING_NESTED_MODEL = 3,
75 public:
MEUserCmd(
const unsigned int _id,
const std::string &_description,
82 public:
virtual void Undo();
85 public:
virtual void Redo();
89 public:
unsigned int Id()
const;
93 public: std::string Description()
const;
97 public:
void SetSDF(sdf::ElementPtr _sdf);
101 public:
void SetScopedName(
const std::string &_name);
105 public:
void SetJointId(
const std::string &_id);
109 protected: std::unique_ptr<MEUserCmdPrivate>
dataPtr;
125 public:
void Reset();
132 public:
MEUserCmdPtr NewCmd(
const std::string &_description,
137 private slots:
void OnUndoCommand(QAction *_action);
141 private slots:
void OnRedoCommand(QAction *_action);
145 private:
virtual bool HasUndo()
const;
149 private:
virtual bool HasRedo()
const;
153 private:
virtual std::vector<std::pair<unsigned int, std::string>>
154 Cmds(
const bool _undo)
const;
158 private: std::unique_ptr<MEUserCmdManagerPrivate> dataPtr;
std::unique_ptr< MEUserCmdPrivate > dataPtr
Definition: MEUserCmdManager.hh:109
Class which represents a user command, which can be "undone" and "redone".
Definition: MEUserCmdManager.hh:45
std::shared_ptr< MEUserCmd > MEUserCmdPtr
Definition: ModelEditorTypes.hh:37
Class which manages user commands in the model editor.
Definition: MEUserCmdManager.hh:114
CmdType
Types of user commands.
Definition: MEUserCmdManager.hh:49
Class which manages user commands in the client side.
Definition: UserCmdHistory.hh:36