WindowItem.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_WINDOWITEM_HH_
19 #define _GAZEBO_GUI_BUILDING_WINDOWITEM_HH_
20 
21 #include <memory>
22 
23 #include "gazebo/gui/qt.h"
25 
26 #include "gazebo/util/system.hh"
27 
28 namespace gazebo
29 {
30  namespace gui
31  {
32  // Forward declare private data.
33  class WindowItemPrivate;
34 
37 
41  {
42  Q_OBJECT
43 
45  public: WindowItem();
46 
48  public: ~WindowItem();
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 
59  // Documentation inherited
60  private: virtual void paint(QPainter *_painter,
61  const QStyleOptionGraphicsItem *_option, QWidget *_widget);
62 
63  // Documentation inherited
64  private: void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *_event);
65 
66  // Documentation inherited
67  private slots: void OnApply();
68 
69  // Documentation inherited
70  private slots: void OnOpenInspector();
71 
72  // Documentation inherited
73  private slots: void OnDeleteItem();
74 
76  public: void WindowChanged();
77 
80  private: std::unique_ptr<WindowItemPrivate> dataPtr;
81  };
83  }
84 }
85 #endif
#define GZ_GUI_VISIBLE
Definition: system.hh:284
2D representation of a window.
Definition: WindowItem.hh:40
2D rectangle.
Definition: RectItem.hh:45