WallSegmentItem.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014-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 _WALL_SEGMENT_ITEM_HH_
19 #define _WALL_SEGMENT_ITEM_HH_
20 
21 #include "gazebo/gui/qt.h"
25 
26 namespace gazebo
27 {
28  namespace gui
29  {
30  class MeasureItem;
31  class SegmentItem;
32  class BuildingItem;
33  class WallInspectorDialog;
34 
37 
42  {
43  Q_OBJECT
44 
49  public: WallSegmentItem(const QPointF &_start, const QPointF &_end,
50  const double _height);
51 
53  public: ~WallSegmentItem();
54 
57  public: double GetHeight() const;
58 
61  public: void SetHeight(double _height);
62 
65  public: WallSegmentItem *Clone() const;
66 
68  public: void Update();
69 
71  public: void WallSegmentChanged();
72 
74  public: void UpdateInspector();
75 
76  // Documentation inherited
77  public: void SetHighlighted(bool _highlighted);
78 
80  protected: void SegmentUpdated();
81 
84  private: void contextMenuEvent(QGraphicsSceneContextMenuEvent *_event);
85 
88  private: void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *
89  _event);
90 
94  private: QVariant itemChange(GraphicsItemChange _change,
95  const QVariant &_value);
96 
97  // Documentation inherited
98  private slots: void OnApply();
99 
100  // Documentation inherited
101  private slots: void OnOpenInspector();
102 
103  // Documentation inherited
104  private slots: void OnDeleteItem();
105 
107  private: double wallThickness;
108 
110  private: double wallHeight;
111 
113  private: MeasureItem *measure;
114 
116  private: QAction *openInspectorAct;
117 
119  private: QAction *deleteItemAct;
120 
122  private: WallInspectorDialog *inspector;
123  };
125  }
126 }
127 
128 #endif
Measurement lines and values.
Definition: MeasureItem.hh:36
2D line segment.
Definition: SegmentItem.hh:38
#define GZ_GUI_BUILDING_VISIBLE
Definition: system.hh:393
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:36
2D representation of a wall.
Definition: WallSegmentItem.hh:40