StairsItem.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2016 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 _GAZEBO_GUI_BUILDING_STAIRSITEM_HH_
19 #define _GAZEBO_GUI_BUILDING_STAIRSITEM_HH_
20 
21 #include <memory>
22 
24 
25 #include "gazebo/util/system.hh"
26 
27 namespace gazebo
28 {
29  namespace gui
30  {
31  class RotateHandle;
32 
33  // Forward declare private data.
34  class StairsItemPrivate;
35 
38 
42  {
43  Q_OBJECT
44 
46  public: StairsItem();
47 
49  public: ~StairsItem();
50 
51  // Documentation inherited
52  public: virtual QVector3D GetSize() const;
53 
54  // Documentation inherited
55  public: virtual QVector3D GetScenePosition() const;
56 
57  // Documentation inherited
58  public: virtual double GetSceneRotation() const;
59 
62  public: int GetSteps() const;
63 
64  // Documentation inherited
65  private: virtual void paint(QPainter *_painter,
66  const QStyleOptionGraphicsItem *_option, QWidget *_widget);
67 
68  // Documentation inherited
69  private: virtual bool RotateEventFilter(RotateHandle *_rotateHandle,
70  QEvent *_event);
71 
72  // Documentation inherited
73  private: void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *_event);
74 
75  // Documentation inherited
76  private slots: void OnApply();
77 
78  // Documentation inherited
79  private slots: void OnOpenInspector();
80 
81  // Documentation inherited
82  private slots: void OnDeleteItem();
83 
85  public: void StairsChanged();
86 
88  private: void StepsChanged();
89 
92  private: std::unique_ptr<StairsItemPrivate> dataPtr;
93  };
95  }
96 }
97 #endif
#define GZ_GUI_VISIBLE
Definition: system.hh:284
2D representation of a staircase.
Definition: StairsItem.hh:41
2D rectangle.
Definition: RectItem.hh:45
Handle for rotating an editor item.
Definition: RotateHandle.hh:40