Choreonoid  1.8
Action.h
Go to the documentation of this file.
1 
5 #ifndef CNOID_BASE_ACTION_H
6 #define CNOID_BASE_ACTION_H
7 
8 #include <cnoid/Signal>
9 #include <QAction>
10 #include "exportdecl.h"
11 
12 namespace cnoid {
13 
14 class CNOID_EXPORT Action : public QAction
15 {
16  Q_OBJECT
17 
18 public:
19  Action(QObject* parent);
20  Action(const QString& text, QObject* parent);
21  Action(const QIcon& icon, QObject* parent);
22  Action(const QIcon& icon, const QString& text, QObject* parent);
23  ~Action();
24 
25  SignalProxy<void()> sigTriggered();
26  SignalProxy<void(bool)> sigToggled();
27 
28 private Q_SLOTS:
29  void onTriggered(bool checked);
30  void onToggled(bool checked);
31 
32 private:
33  Signal<void(void)>* sigTriggered_;
34  Signal<void(bool)>* sigToggled_;
35 
36  void initialize();
37 };
38 
39 }
40 
41 #endif
cnoid::Action
Definition: Action.h:14
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::Signal
Definition: Signal.h:165
cnoid::SignalProxy
Definition: Signal.h:470