GCC Code Coverage Report


Directory: plugins/
File: plugins/hppwidgetsplugin/joint-action.hh
Date: 2024-12-13 15:51:58
Exec Total Coverage
Lines: 0 6 0.0%
Branches: 0 6 0.0%

Line Branch Exec Source
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 Q_OBJECT
17
18 public:
19 JointAction(const QString& actionName, const std::string& jointName,
20 QObject* parent)
21 : QAction(actionName, parent), jointName_(jointName), tree_(NULL) {
22 connect(this, SIGNAL(triggered(bool)), SLOT(trigger()));
23 }
24
25 JointAction(const QString& actionName, JointTreeWidget* tree, QObject* parent)
26 : QAction(actionName, parent), tree_(tree) {
27 connect(this, SIGNAL(triggered(bool)), SLOT(trigger()));
28 }
29
30 signals:
31 void triggered(const std::string& jointName);
32
33 private slots:
34 void trigger();
35
36 private:
37 const std::string jointName_;
38 JointTreeWidget* tree_;
39 };
40 } // namespace gui
41 } // namespace hpp
42
43 #endif // HPP_GUI_JOINT_ACTION_HH
44