MeasureItem.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014-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 _MEASURE_ITEM_HH_
19 #define _MEASURE_ITEM_HH_
20 
21 #include "gazebo/gui/qt.h"
23 #include "gazebo/util/system.hh"
24 
25 namespace gazebo
26 {
27  namespace gui
28  {
29  class SegmentItem;
30 
33 
37  {
38  Q_OBJECT
39 
44  public: MeasureItem(const QPointF &_start, const QPointF &_end);
45 
47  public: ~MeasureItem();
48 
49  // Documentation inherited
50  private: virtual void paint(QPainter *_painter,
51  const QStyleOptionGraphicsItem *_option, QWidget *_widget);
52 
55  public: double GetDistance() const;
56 
59  public: void SetValue(double _value);
60 
62  private: double value;
63  };
65  }
66 }
67 
68 #endif
Measurement lines and values.
Definition: MeasureItem.hh:36
2D line segment.
Definition: SegmentItem.hh:38
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48