Choreonoid  1.8
SimulationBar.h
Go to the documentation of this file.
1 
5 #ifndef CNOID_BODY_PLUGIN_SIMULATION_BAR_H
6 #define CNOID_BODY_PLUGIN_SIMULATION_BAR_H
7 
8 #include <cnoid/ToolBar>
9 #include <cnoid/Signal>
10 #include <functional>
11 #include "exportdecl.h"
12 
13 namespace cnoid {
14 
15 class SimulatorItem;
16 
17 class CNOID_EXPORT SimulationBar : public ToolBar
18 {
19 public:
20  static void initialize(ExtensionManager* ext);
21  static SimulationBar* instance();
22 
24  return sigSimulationAboutToStart_;
25  }
26 
27  void startSimulation(bool doRest = true);
28 
29  virtual ~SimulationBar();
30 
31 private:
32  SimulationBar();
33 
34  void onStoreInitialClicked();
35  void onRestoreInitialClicked();
36  void forEachSimulator(std::function<void(SimulatorItem* simulator)> callback, bool doSelect = false);
37  void startSimulation(SimulatorItem* simulator, bool doReset);
38  void onStopSimulationClicked();
39  void onPauseSimulationClicked();
40  void pauseSimulation(SimulatorItem* simulator);
41  ToolButton* pauseToggle;
42 
43  Signal<void(SimulatorItem*)> sigSimulationAboutToStart_;
44 };
45 
46 }
47 
48 #endif
cnoid::SimulationBar::sigSimulationAboutToStart
SignalProxy< void(SimulatorItem *)> sigSimulationAboutToStart()
Definition: SimulationBar.h:23
cnoid::ToolBar
Definition: ToolBar.h:22
cnoid::ExtensionManager
Definition: ExtensionManager.h:23
cnoid::SimulationBar
Definition: SimulationBar.h:17
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::ToolButton
Definition: Buttons.h:74
cnoid::Signal
Definition: Signal.h:165
cnoid::SignalProxy
Definition: Signal.h:470
cnoid::SimulatorItem
Definition: SimulatorItem.h:81