All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
WallItem.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2014 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 _WALL_ITEM_HH_
19 #define _WALL_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 PolylineItem;
31  class GrabberHandle;
32  class LineSegmentItem;
33  class BuildingItem;
34  class WallInspectorDialog;
35 
38 
42  {
43  Q_OBJECT
44 
48  public: WallItem(const QPointF &_start, const QPointF &_end);
49 
51  public: ~WallItem();
52 
55  public: double GetHeight() const;
56 
59  public: void SetHeight(double _height);
60 
63  public: WallItem *Clone() const;
64 
66  public: void Update();
67 
68  // Documentation inherited
69  private: bool GrabberEventFilter(GrabberHandle *_grabber,
70  QEvent *_event);
71 
72  // Documentation inherited
73  private: bool SegmentEventFilter(LineSegmentItem *_segment,
74  QEvent *_event);
75 
78  private: void contextMenuEvent(QGraphicsSceneContextMenuEvent *_event);
79 
83  private: void UpdateSegmentChildren(LineSegmentItem *_segment);
84 
85  // Documentation inherited
86  private slots: void OnApply();
87 
88  // Documentation inherited
89  private slots: void OnOpenInspector();
90 
91  // Documentation inherited
92  private slots: void OnDeleteItem();
93 
95  private: void WallChanged();
96 
101  private: void SetSegmentSelected(unsigned int _index, bool _selected);
102 
104  private: double wallThickness;
105 
107  private: double wallHeight;
108 
110  private: double scale;
111 
113  private: LineSegmentItem* selectedSegment;
114 
116  private: QAction *openInspectorAct;
117 
119  private: QAction *deleteItemAct;
120 
122  private: WallInspectorDialog *inspector;
123  };
125  }
126 }
127 
128 #endif
2D polyline.
Definition: PolylineItem.hh:39
2D representation of a wall.
Definition: WallItem.hh:41
2D line segment.
Definition: LineSegmentItem.hh:35
Definition: GrabberHandle.hh:28
Base class of a items that have building level properties such as the level number and level height...
Definition: BuildingItem.hh:33
Dialog for configuring a wall item.
Definition: WallInspectorDialog.hh:34
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48