hpp-gui  4.10.1
Graphical interface for HPP
joint-action.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) CNRS
3 // Author: Joseph Mirabel
4 //
5 
6 #ifndef HPP_GUI_JOINT_ACTION_HH
7 #define HPP_GUI_JOINT_ACTION_HH
8 
9 #include <QAction>
10 
11 namespace hpp {
12  namespace gui {
13  class JointTreeWidget;
14 
15  class JointAction : public QAction
16  {
17  Q_OBJECT
18 
19  public:
20  JointAction (const QString& actionName, const std::string& jointName, QObject* parent)
21  : QAction (actionName, parent)
22  , jointName_ (jointName)
23  , tree_ (NULL)
24  {
25  connect (this, SIGNAL (triggered(bool)), SLOT(trigger()));
26  }
27 
28  JointAction (const QString& actionName, JointTreeWidget* tree, QObject* parent)
29  : QAction (actionName, parent)
30  , tree_ (tree)
31  {
32  connect (this, SIGNAL (triggered(bool)), SLOT(trigger()));
33  }
34 
35  signals:
36  void triggered (const std::string& jointName);
37 
38  private slots:
39  void trigger ();
40 
41  private:
42  const std::string jointName_;
43  JointTreeWidget* tree_;
44  };
45  } // namespace gui
46 } // namespace hpp
47 
48 #endif // HPP_GUI_JOINT_ACTION_HH
JointAction(const QString &actionName, const std::string &jointName, QObject *parent)
Definition: joint-action.hh:20
namespace that encapsulate all the softwares of humanoid-path-planner
Definition: __init__.py:1
Definition: jointtreewidget.hh:19
Definition: joint-action.hh:15
void triggered(const std::string &jointName)
JointAction(const QString &actionName, JointTreeWidget *tree, QObject *parent)
Definition: joint-action.hh:28