4 #ifndef SAVE_CONTROLLER_H
5 #define SAVE_CONTROLLER_H
7 #include <trajectory_editor/headerview.h>
8 #include <trajectory_editor/frameview.h>
9 #include <trajectory_editor/jointperspective.h>
12 #include <QMessageBox>
13 #include <QFileDialog>
14 #include <QInputDialog>
17 #include <ros/package.h>
18 #include <ros/console.h>
20 #include <motion_file/motionfile.h>
22 class SaveController :
public QObject
26 typedef boost::shared_ptr<motionfile::Keyframe> KeyframePtr;
28 SaveController(HeaderView *view, joint_perspective::PerspectiveManager *manager);
32 QString newMotion(motionfile::Motion &motion);
33 QString open(motionfile::Motion &motion);
34 QString open(motionfile::Motion &motion, QString path);
36 void save(motionfile::Motion &motion);
37 void saveAs(motionfile::Motion &motion);
38 void saveMirroredAs(motionfile::Motion &original_motion, motionfile::Motion &mirrored);
39 void saveBackup(motionfile::Motion &motion);
42 void newPath(QString path);
43 void modelChanged(std::string model_path, std::vector<std::string> &new_joint_list);
46 KeyframePtr firstFrame(
unsigned joints_amount);
47 std::string getFileNameFromPath(QString path);
48 void showMessageBox(QString title, QString text);
50 bool isMotionValid(motionfile::Motion &motion);
53 void mirrorValues(KeyframePtr frame, KeyframePtr mirrored, std::string
54 left, std::string right,
bool swap,
bool invert, std::vector<std::string> jointList);
57 HeaderView *m_header_view;
58 joint_perspective::PerspectiveManager *m_perspective_manager;
61 #endif // SAVE_CONTROLLER_H