hpp-gui  4.11.0
Graphical interface for HPP
solverwidget.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_SOLVERWIDGET_HH
7 #define HPP_GUI_SOLVERWIDGET_HH
8 
9 #include <QWidget>
10 
11 #include "gepetto/gui/fwd.hh"
13 
14 class QComboBox;
15 class QDoubleSpinBox;
16 
17 namespace Ui {
18  class SolverWidget;
19 }
20 
21 namespace hpp {
22  namespace gui {
23  class SolverWidget : public QWidget
24  {
25  Q_OBJECT
26 
27  public:
28  enum Select {
34  All
35  };
36 
37  SolverWidget (HppWidgetsPlugin* plugin, QWidget* parent = 0);
38 
39  ~SolverWidget ();
40 
41  public slots:
44  virtual void update (Select s = All);
45 
46 signals:
47  void problemSolved ();
48 
49  protected slots:
52  void selectPathPlanner (const QString& text);
53 
56  void selectPathOptimizers (const QStringList& list);
57  void openPathOptimizerSelector ();
58 
61  void selectPathProjector (const QString& name);
62 
65  void selectPathValidation (const QString& name);
66 
69  void selectSteeringMethod(const QString& name);
70 
73  void discontinuityChanged(double value);
74 
77  void penetrationChanged(double value);
78 
80  void solve ();
81 
84  void solveAndDisplay ();
85 
87  void interrupt ();
88 
90  void loadRoadmap ();
91 
93  void saveRoadmap ();
94 
96  void clearRoadmap ();
97 
99  void optimizePath();
100 
101  void solveDone ();
102 
103  private:
104  struct Solve {
105  bool interrupt, stepByStep, isSolved;
106  QFuture <void> status;
107  QFutureWatcher <void> watcher;
108  HppWidgetsPlugin* plugin;
109  SolverWidget* parent;
110  void solve ();
111  void optimize (const int pathId);
112  void solveAndDisplay ();
113  bool done ();
114  Solve (HppWidgetsPlugin* p, SolverWidget* par) :
115  interrupt (false), stepByStep(false), isSolved (false),
116  plugin (p), parent (par)
117  {}
118  };
119 
120  void setSelected(QComboBox* cb, QString const& what);
121  void selectButtonSolve (bool solve);
122  QComboBox* planner ();
123  QComboBox* projector ();
124  QComboBox* validation ();
125  QComboBox* steeringMethod();
126  QDoubleSpinBox* projectorDiscontinuity ();
127  QDoubleSpinBox* validationPenetration ();
128 
129  ::Ui::SolverWidget* ui_;
130  HppWidgetsPlugin* plugin_;
131  gepetto::gui::MainWindow* main_;
132 
133  QStringList optimizers_;
134 
135  Solve solve_;
136  friend struct Solve;
137  };
138  } // namespace gui
139 } // namespace hpp
140 
141 #endif // HPP_GUI_SOLVERWIDGET_HH
Definition: solverwidget.hh:32
Definition: solverwidget.hh:31
namespace that encapsulate all the softwares of humanoid-path-planner
Definition: __init__.py:1
Definition: configurationlistwidget.hh:20
Select
Definition: solverwidget.hh:28
Definition: solverwidget.hh:23
Definition: solverwidget.hh:29
Definition: solverwidget.hh:33
Plugin that add a lot of features to work with hpp.
Definition: hppwidgetsplugin.hh:29
Definition: solverwidget.hh:30