ModelBuilderWidget.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2015 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef _MODEL_BUILDER_WIDGET_HH_
18 #define _MODEL_BUILDER_WIDGET_HH_
19 
20 #include "gazebo/gui/qt.h"
23 #include "gazebo/math/Vector3.hh"
24 #include "gazebo/util/system.hh"
25 
26 namespace gazebo
27 {
28  class GLWidget;
29 
30  namespace gui
31  {
32  class GAZEBO_VISIBLE ModelBuilderWidget : public QWidget
33  {
34  Q_OBJECT
35  public: ModelBuilderWidget(QWidget *_parent = 0);
36  public: virtual ~ModelBuilderWidget();
37 
38  public: void Init();
39 
40  private slots: void CreateBox();
41  private slots: void CreateSphere();
42  private slots: void CreateCylinder();
43 
44  private: void OnBoxCreate(const math::Vector3 &pos,
45  const math::Vector3 &scale);
46 
47  private: void OnSphereCreate(const math::Vector3 &pos,
48  const math::Vector3 &scale);
49 
50  private: void OnCylinderCreate(const math::Vector3 &pos,
51  const math::Vector3 &scale);
52 
53  private: GLWidget *glWidget;
54  private: QAction *boxCreateAct, *sphereCreateAct, *cylinderCreateAct;
55 
56  private: physics::WorldPtr world;
57 
60  };
61  }
62 }
63 
64 #endif
65 
66 
Definition: GLWidget.hh:52
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
transport::NodePtr node
Definition: ModelBuilderWidget.hh:58
Forward declarations for transport.
default namespace for gazebo
boost::shared_ptr< World > WorldPtr
Definition: PhysicsTypes.hh:80
boost::shared_ptr< Node > NodePtr
Definition: TransportTypes.hh:57
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
Definition: ModelBuilderWidget.hh:32
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
transport::PublisherPtr factoryPub
Definition: ModelBuilderWidget.hh:59
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:66