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  public RectItem, public BuildingItem
41  {
42  Q_OBJECT
43 
45  public: StairsItem();
46 
48  public: ~StairsItem();
49 
50  // Documentation inherited
51  public: virtual QVector3D GetSize() const;
52 
53  // Documentation inherited
54  public: virtual QVector3D GetScenePosition() const;
55 
56  // Documentation inherited
57  public: virtual double GetSceneRotation() const;
58 
61  public: int GetSteps() const;
62 
63  // Documentation inherited
64  private: virtual void paint(QPainter *_painter,
65  const QStyleOptionGraphicsItem *_option, QWidget *_widget);
66 
67  // Documentation inherited
68  private: virtual bool RotateEventFilter(RotateHandle *_rotateHandle,
69  QEvent *_event);
70 
71  // Documentation inherited
72  private: void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *_event);
73 
74  // Documentation inherited
75  private slots: void OnApply();
76 
77  // Documentation inherited
78  private slots: void OnOpenInspector();
79 
80  // Documentation inherited
81  private slots: void OnDeleteItem();
82 
84  public: void StairsChanged();
85 
87  private: void StepsChanged();
88 
90  private: double stairsDepth;
91 
93  private: double stairsHeight;
94 
96  private: double stairsWidth;
97 
99  private: QPointF stairsPos;
100 
102  private: double stairsElevation;
103 
105  private: int stairsSteps;
106 
108  private: StairsInspectorDialog *inspector;
109 
110  // private: double stairsUnitRise;
111 
112  // private: double stairsUnitRun;
113  };
115  }
116 }
117 #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:36
#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