StairsItem.hh
Go to the documentation of this file.
1/*
2 * Copyright (C) 2012 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#include <ignition/math/Vector3.hh>
23
25
26#include "gazebo/util/system.hh"
27
28namespace gazebo
29{
30 namespace gui
31 {
32 class RotateHandle;
33
34 // Forward declare private data.
35 class StairsItemPrivate;
36
39
42 class GZ_GUI_VISIBLE StairsItem : public RectItem
43 {
44 Q_OBJECT
45
47 public: StairsItem();
48
50 public: ~StairsItem();
51
52 // Documentation inherited
53 public: virtual ignition::math::Vector3d Size() const;
54
55 // Documentation inherited
56 public: virtual ignition::math::Vector3d ScenePosition() const;
57
58 // Documentation inherited
59 public: virtual double SceneRotation() const;
60
63 public: int Steps() const;
64
65 // Documentation inherited
66 private: virtual void paint(QPainter *_painter,
67 const QStyleOptionGraphicsItem *_option, QWidget *_widget);
68
69 // Documentation inherited
70 private: virtual bool RotateEventFilter(RotateHandle *_rotateHandle,
71 QEvent *_event);
72
73 // Documentation inherited
74 private: void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *_event);
75
76 // Documentation inherited
77 private slots: void OnApply();
78
79 // Documentation inherited
80 private slots: void OnOpenInspector();
81
82 // Documentation inherited
83 private slots: void OnDeleteItem();
84
86 public: void StairsChanged();
87
89 private: void StepsChanged();
90
93 private: std::unique_ptr<StairsItemPrivate> dataPtr;
94 };
96 }
97}
98#endif
gui
Definition KeyEventHandler.hh:29
2D rectangle.
Definition RectItem.hh:51
Handle for rotating an editor item.
Definition RotateHandle.hh:38
2D representation of a staircase.
Definition StairsItem.hh:43
virtual double SceneRotation() const
Get the scene rotation of the editor item.
virtual ignition::math::Vector3d ScenePosition() const
Get the scene position of editor item.
int Steps() const
Get the number of steps in the staircase.
StairsItem()
Constructor.
~StairsItem()
Destructor.
virtual ignition::math::Vector3d Size() const
Get the size of the item in pixels.
void StairsChanged()
Emit stairs changed Qt signals.
Forward declarations for the common classes.
Definition Animation.hh:27