hpp-gui  4.10.1
Graphical interface for HPP
pathplayer.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) CNRS
3 // Author: Joseph Mirabel and Heidy Dallard
4 //
5 
6 #ifndef HPP_GUI_PATHPLAYER_HH
7 #define HPP_GUI_PATHPLAYER_HH
8 
9 #include <QWidget>
10 
11 #include <gepetto/gui/fwd.hh>
12 
13 class QDoubleSpinBox;
14 class QProcess;
15 class QPushButton;
16 class QSpinBox;
17 class QSlider;
18 class QTextBrowser;
19 
20 namespace Ui {
21  class PathPlayerWidget;
22 }
23 
24 namespace hpp {
25  namespace gui {
26  class HppWidgetsPlugin;
27 
28  class PathPlayer : public QWidget
29  {
30  Q_OBJECT
31 
32  public:
33  PathPlayer (HppWidgetsPlugin* plugin, QWidget* parent = 0);
34  ~PathPlayer();
35 
36  public slots:
38  int getCurrentPath() const;
39 
43  void displayWaypointsOfPath (const std::string jointName);
44 
48  void displayPath (const std::string jointName);
49 
51  void update ();
52 
54  void setRobotVelocity(bool set);
55 
57  double lengthBetweenRefresh () const;
58 
60  void setCurrentTime (const double& param);
61 
62  protected:
66  virtual void displayPath_impl (const std::string jointName);
67 signals:
68  void displayPath_status (int progress);
69  void appliedConfigAtParam (int pid, double param);
70 
71  private slots:
72  void pathIndexChanged (int i);
73  void pathSliderChanged (int value);
74  // void timeChanged (double d);
75  void playPauseToggled (bool toggled);
76  void stopClicked ();
77  void pathPulse ();
78  void timerEvent(QTimerEvent *event);
79 
80  private:
81  void initSearchActions();
82  void updateConfiguration ();
83  double sliderToLength (int v) const;
84  int lengthToSlider (double l) const;
85  double timeToLength (double time) const;
86  int timeBetweenRefresh() const;
87 
88  ::Ui::PathPlayerWidget* ui_;
89 
90  QDoubleSpinBox* timeSpinBox () const;
91  QSpinBox* pathIndex() const;
92  QSlider* pathSlider () const;
93  QPushButton* playPause () const;
94  QPushButton* stop () const;
95 
96  double pathLength_;
97  double currentParam_;
98  int timerId_;
99  bool velocity_;
100 
101  HppWidgetsPlugin* plugin_;
102  };
103  } // namespace gui
104 } // namespace hpp
105 
106 #endif // HPP_GUI_PATHPLAYER_HH
Definition: pathplayer.hh:28
namespace that encapsulate all the softwares of humanoid-path-planner
Definition: __init__.py:1
Definition: configurationlistwidget.hh:20
Plugin that add a lot of features to work with hpp.
Definition: hppwidgetsplugin.hh:29