se2ez
scenepanel.h
Go to the documentation of this file.
1 /* Author: Constantinos Chamzas */
2 
3 #ifndef SE2EZ_GUI_SCENEPANEL_
4 #define SE2EZ_GUI_SCENEPANEL_
5 
6 #include <mutex>
7 #include <set>
8 
9 #include <QWidget>
10 #include <QCheckBox>
11 #include <QPainter>
12 #include <QLabel>
13 
14 #include <se2ez/gui/panel.h>
16 
17 namespace Ui
18 {
19  class ScenePanel;
20 }
21 
22 namespace se2ez
23 {
24  /** \cond IGNORE */
25  SE2EZ_CLASS_FORWARD(Scene)
26  SE2EZ_CLASS_FORWARD(State)
27  SE2EZ_CLASS_FORWARD(Robot)
28  /** \endcond */
29 
30  namespace gui
31  {
32  class ScenePanel : public Panel
33  {
34  Q_OBJECT
35 
36  public:
37  ScenePanel(ScenePtr scene, std::string name, QWidget *parent = 0);
38  ~ScenePanel();
39 
40  void draw(QPainter &painter, RenderArea *canvas) override;
41  void update(boost::posix_time::ptime last, boost::posix_time::ptime current) override;
42 
43  public slots:
44  void updateScene();
45  void generateGoals();
46 
47  signals:
48  void stateChanged();
49 
50  private:
51  const RobotPtr getRobot(const QString &s);
52  const StatePtr getState(const QString &s);
53  const std::string getEE(const QString &s);
54 
55  Ui::ScenePanel *ui_;
56 
57  ScenePtr scene_{nullptr};
58  StatePtr sstate_{nullptr};
59 
60  std::set<std::string> panelnames_; ///< names of all panels
61 
62  std::set<std::string> anames_; ///< names of jpanels of active robots
63  std::set<std::string> pnames_; ///< names of jpanels of passive robots
64 
65  CollisionManagerPtr cm_{nullptr};
67 
69  };
70  } // namespace gui
71 } // namespace se2ez
72 
73 #endif
A shared pointer wrapper for se2ez::State.
Definition: cspacepanel.h:22
A shared pointer wrapper for se2ez::Scene.
std::set< std::string > colliding_
Definition: scenepanel.h:66
Ui::ScenePanel * ui_
Definition: scenepanel.h:55
A shared pointer wrapper for se2ez::CollisionManager.
A shared pointer wrapper for se2ez::Robot.
std::set< std::string > panelnames_
names of all panels
Definition: scenepanel.h:60
The canvas widget. It contains all the drawing functions as well as all the general settings for draw...
Definition: renderarea.h:48
Main namespace.
Definition: collision.h:11
std::set< std::string > anames_
names of jpanels of active robots
Definition: scenepanel.h:62
#define SE2EZ_CLASS_FORWARD(C)
Definition: class_forward.h:9
std::set< std::string > pnames_
names of jpanels of passive robots
Definition: scenepanel.h:63