NimbRo ROS Soccer Package
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
jointdisplay.h
1 // Displays joints of loaded frame
2 // Author: Dmytro Pavlichenko <dm.mark999@gmail.com>
3 
4 #ifndef JOINTDISPLAY_H
5 #define JOINTDISPLAY_H
6 
7 #include <QGridLayout>
8 #include <QLabel>
9 
10 #include <trajectory_editor/spaces/posveleffview.h>
11 #include <trajectory_editor/spaces/basicspace.h>
12 
13 // TODO: rename to JointSpace
14 class JointManager : public BasicSpace
15 {
16 Q_OBJECT
17 public:
18  JointManager(const std::vector<std::string> &modelJointList, QWidget *parent = 0);
19  ~JointManager(){};
20 
21  void unsetFrame();
22 
23 public Q_SLOTS:
24  void handleFieldChanged(PosVelEffView::Field, std::string jointName);
25  void handleChangeForInverse(std::string jointName, PosVelEffView::Field field, double value);
26 
27  void handlePerspectiveUpdate(const joint_perspective::JointPerspective &perspective);
28 
29 private:
30  void updateFrame();
31  void initGUI(const joint_perspective::JointPerspective &perspective);
32 
33  // Find joint jointName in jointList and create view for it. Put it on layout
34  // If jointName was not found, put warning on layout
35  void findAndPutView(std::string jointName, std::string label, int row, BasicSmallView::Alignment alignment, BasicSmallView::Type type, bool shiftMirrored);
36  void createHeaderLabels(BasicSmallView::Alignment alignment, int row);
37 
38 private:
39  std::vector<PosVelEffView*> jointViews;
40  QGridLayout *jointsLayout;
41 };
42 
43 
44 #endif