DoorItem.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 
18 #ifndef _DOOR_ITEM_HH_
19 #define _DOOR_ITEM_HH_
20 
21 #include "gazebo/gui/qt.h"
24 #include "gazebo/util/system.hh"
25 
26 namespace gazebo
27 {
28  namespace gui
29  {
30  class RectItem;
31  class BuildingItem;
32  class WindowDoorInspectorDialog;
33 
36 
40  {
41  Q_OBJECT
42 
44  public: DoorItem();
45 
47  public: ~DoorItem();
48 
49  // Documentation inherited
50  public: virtual QVector3D GetSize() const;
51 
52  // Documentation inherited
53  public: virtual QVector3D GetScenePosition() const;
54 
55  // Documentation inherited
56  public: virtual double GetSceneRotation() const;
57 
58  // Documentation inherited
59  private: virtual void paint(QPainter *_painter,
60  const QStyleOptionGraphicsItem *_option, QWidget *_widget);
61 
62  // Documentation inherited
63  private: void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *_event);
64 
65  // Documentation inherited
66  private slots: void OnApply();
67 
68  // Documentation inherited
69  private slots: void OnOpenInspector();
70 
71  // Documentation inherited
72  private slots: void OnDeleteItem();
73 
75  public: void DoorChanged();
76 
78  private: void SizeChanged();
79 
81  private: double doorDepth;
82 
84  private: double doorHeight;
85 
87  private: double doorWidth;
88 
90  private: double doorElevation;
91 
93  private: QPointF doorPos;
94 
96  private: WindowDoorInspectorDialog *inspector;
97  };
99  }
100 }
101 
102 #endif
Definition: WindowDoorInspectorDialog.hh:29
2D representation of a door
Definition: DoorItem.hh:39
2D rectangle.
Definition: RectItem.hh:40
Base class of a items that have building level properties such as the level number and level height...
Definition: BuildingItem.hh:33
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48