WindowItem.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_WINDOWITEM_HH_
19 #define _GAZEBO_GUI_BUILDING_WINDOWITEM_HH_
20 
21 #include <memory>
22 #include <ignition/math/Vector3.hh>
23 
24 #include "gazebo/gui/qt.h"
26 
27 #include "gazebo/util/system.hh"
28 
29 namespace gazebo
30 {
31  namespace gui
32  {
33  // Forward declare private data.
34  class WindowItemPrivate;
35 
38 
41  class GZ_GUI_VISIBLE WindowItem : public RectItem
42  {
43  Q_OBJECT
44 
46  public: WindowItem();
47 
49  public: ~WindowItem();
50 
51  // Documentation inherited
52  public: virtual ignition::math::Vector3d Size() const;
53 
54  // Documentation inherited
55  public: virtual ignition::math::Vector3d ScenePosition() const;
56 
57  // Documentation inherited
58  public: virtual double SceneRotation() const;
59 
60  // Documentation inherited
61  private: virtual void paint(QPainter *_painter,
62  const QStyleOptionGraphicsItem *_option, QWidget *_widget);
63 
64  // Documentation inherited
65  private: void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *_event);
66 
67  // Documentation inherited
68  private slots: void OnApply();
69 
70  // Documentation inherited
71  private slots: void OnOpenInspector();
72 
73  // Documentation inherited
74  private slots: void OnDeleteItem();
75 
77  public: void WindowChanged();
78 
81  private: std::unique_ptr<WindowItemPrivate> dataPtr;
82  };
84  }
85 }
86 #endif
Forward declarations for the common classes.
Definition: Animation.hh:33
2D representation of a window.
Definition: WindowItem.hh:41
2D rectangle.
Definition: RectItem.hh:49