NimbRo ROS Soccer Package
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
rateangleview.h
1 // Widget to edit rate and ange rate of certain joint
2 // Author: Dmytro Pavlichenko <dm.mark999@gmail.com>
3 
4 #ifndef RATEANGLEVIEW_H
5 #define RATEANGLEVIEW_H
6 
7 #include <trajectory_editor/historykeeper.h>
8 #include <trajectory_editor/spaces/basicsmallview.h>
9 
10 #include <QObject>
11 #include <QWidget>
12 #include <QSpinBox>
13 #include <QSlider>
14 
15 class RateAngleView : public BasicSmallView
16 {
17  Q_OBJECT
18 public:
19 
20  enum Field
21  {
22  RATE,
23  ANGLERATE,
24  };
25 
26  RateAngleView(BasicSmallView::Alignment alignment, BasicSmallView::Type type, std::string jointName, bool shiftMirrored, QWidget *parent = 0);
27  ~RateAngleView();
28 
29  void clearHistoryOfChanges();
30 
31  void setField(RateAngleView::Field field, double value);
32  void setRate(double rate);
33  double getRate();
34 
35 Q_SIGNALS:
36  void rateChanged(std::string jointName);
37  void changeForInverse(const std::string joint_name, const RateAngleView::Field field, const double value);
38 
39 private Q_SLOTS:
40  void rateSliderChanged();
41  void rateSpinChanged();
42 
43 private:
44  QSlider *rateSlider;
45  QDoubleSpinBox *rateSpin;
46  QDoubleSpinBox *angleRateSpin;
47 
48  HistoryKeeper *rateHistory;
49  HistoryKeeper *angleRateHistory;
50 };
51 
52 #endif // RATEANGLEVIEW_H