StairsItem.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 _STAIRS_ITEM_HH_
19 #define _STAIRS_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 StairsInspectorDialog;
33 
36 
40  {
41  Q_OBJECT
42 
44  public: StairsItem();
45 
47  public: ~StairsItem();
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 
60  public: int GetSteps() const;
61 
62  // Documentation inherited
63  private: virtual void paint(QPainter *_painter,
64  const QStyleOptionGraphicsItem *_option, QWidget *_widget);
65 
66  // Documentation inherited
67  private: virtual bool RotateEventFilter(RotateHandle *_rotateHandle,
68  QEvent *_event);
69 
70  // Documentation inherited
71  private: void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *_event);
72 
73  // Documentation inherited
74  private slots: void OnApply();
75 
76  // Documentation inherited
77  private slots: void OnOpenInspector();
78 
79  // Documentation inherited
80  private slots: void OnDeleteItem();
81 
83  public: void StairsChanged();
84 
86  private: void StepsChanged();
87 
89  private: double stairsDepth;
90 
92  private: double stairsHeight;
93 
95  private: double stairsWidth;
96 
98  private: QPointF stairsPos;
99 
101  private: double stairsElevation;
102 
104  private: int stairsSteps;
105 
107  private: StairsInspectorDialog *inspector;
108 
109  // private: double stairsUnitRise;
110 
111  // private: double stairsUnitRun;
112  };
114  }
115 }
116 #endif
2D representation of a staircase.
Definition: StairsItem.hh:39
2D rectangle.
Definition: RectItem.hh:40
Handle for rotating an editor item.
Definition: RotateHandle.hh:33
Dialog for configuring a staircase item.
Definition: StairsInspectorDialog.hh:35
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