18 #ifndef GAZEBO_GUI_MODEL_MEUSERCMDMANAGER_HH_ 19 #define GAZEBO_GUI_MODEL_MEUSERCMDMANAGER_HH_ 41 class MEUserCmdPrivate;
42 class MEUserCmdManagerPrivate;
59 INSERTING_NESTED_MODEL = 2,
62 DELETING_NESTED_MODEL = 3,
74 MOVING_NESTED_MODEL = 7,
80 INSERTING_MODEL_PLUGIN = 9,
83 DELETING_MODEL_PLUGIN = 10
91 public:
MEUserCmd(
const unsigned int _id,
const std::string &_description,
98 public:
virtual void Undo();
101 public:
virtual void Redo();
105 public:
unsigned int Id()
const;
109 public: std::string Description()
const;
113 public:
void SetSDF(sdf::ElementPtr _sdf);
117 public:
void SetScopedName(
const std::string &_name);
121 public:
void SetJointId(
const std::string &_id);
127 public:
void SetPoseChange(
const ignition::math::Pose3d &_before,
128 const ignition::math::Pose3d &_after);
133 public:
void SetScaleChange(
134 const std::map<std::string, ignition::math::Vector3d> &_before,
135 const std::map<std::string, ignition::math::Vector3d> &_after);
139 protected: std::unique_ptr<MEUserCmdPrivate>
dataPtr;
155 public:
void Reset();
162 public:
MEUserCmdPtr NewCmd(
const std::string &_description,
167 private slots:
void OnUndoCommand(QAction *_action);
171 private slots:
void OnRedoCommand(QAction *_action);
175 private:
virtual bool HasUndo()
const;
179 private:
virtual bool HasRedo()
const;
183 private:
virtual std::vector<std::pair<unsigned int, std::string>>
184 Cmds(
const bool _undo)
const;
188 private: std::unique_ptr<MEUserCmdManagerPrivate> dataPtr;
Forward declarations for the common classes.
Definition: Animation.hh:26
std::unique_ptr< MEUserCmdPrivate > dataPtr
Definition: MEUserCmdManager.hh:139
Class which represents a user command, which can be "undone" and "redone".
Definition: MEUserCmdManager.hh:46
std::shared_ptr< MEUserCmd > MEUserCmdPtr
Definition: ModelEditorTypes.hh:37
Class which manages user commands in the model editor.
Definition: MEUserCmdManager.hh:144
CmdType
Types of user commands.
Definition: MEUserCmdManager.hh:50
gui
Definition: KeyEventHandler.hh:29
Class which manages user commands in the client side.
Definition: UserCmdHistory.hh:36