• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • plugins
  • render
  • annotate
AreaAnnotation.cpp
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2009 Andrew Manson <g.real.ate@gmail.com>
9 // Copyright 2013 Thibaut Gridel <tgridel@free.fr>
10 // Copyright 2014 Calin-Cristian Cruceru <crucerucalincristian@gmail.com
11 //
12 
13 // Self
14 #include "AreaAnnotation.h"
15 
16 // Marble
17 #include "GeoDataPlacemark.h"
18 #include "GeoDataTypes.h"
19 #include "GeoPainter.h"
20 #include "ViewportParams.h"
21 #include "SceneGraphicsTypes.h"
22 #include "MarbleMath.h"
23 
24 // Qt
25 #include <qmath.h>
26 
27 
28 namespace Marble
29 {
30 
31 AreaAnnotation::AreaAnnotation( GeoDataPlacemark *placemark )
32  : SceneGraphicsItem( placemark ),
33  m_state( Normal ),
34  m_movedNodeIndex( -1 ),
35  m_rightClickedNode( -2 ),
36  m_viewport( 0 )
37 {
38 
39 }
40 
41 void AreaAnnotation::paint(GeoPainter *painter, const ViewportParams *viewport )
42 {
43  m_viewport = viewport;
44  QList<QRegion> regionList;
45 
46  painter->save();
47  if ( placemark()->geometry()->nodeType() == GeoDataTypes::GeoDataPolygonType ) {
48  const GeoDataPolygon *polygon = static_cast<const GeoDataPolygon*>( placemark()->geometry() );
49  const GeoDataLinearRing &outerRing = polygon->outerBoundary();
50  const QVector<GeoDataLinearRing> &innerRings = polygon->innerBoundaries();
51 
52  // First paint and add to the region list the nodes which form the outerBoundary, as
53  // well as the entire outer polygon.
54  for ( int i = 0; i < outerRing.size(); ++i ) {
55  QRegion newRegion = painter->regionFromEllipse( outerRing.at(i), 15, 15 );
56 
57  if ( !m_selectedNodes.contains( i ) ) {
58  painter->setBrush( Oxygen::aluminumGray3);
59  } else {
60  painter->setBrush( Oxygen::aluminumGray6 );
61  }
62 
63  // If we are in the MergingNodes state paint with a different color the node.
64  if ( ( i == m_mergedNodes.first && m_state == MergingNodes ) ||
65  ( i == m_mergedNodes.second && m_state == MergingNodes ) ) {
66  painter->setBrush( Oxygen::emeraldGreen6 );
67  painter->drawEllipse( outerRing.at(i) , 15, 15 );
68  } else {
69 
70  painter->drawEllipse( outerRing.at(i) , 10, 10 );
71  }
72  regionList.append( newRegion );
73  }
74 
75  // Then paint and add to the region list the nodes which form the innerBoundaries
76  int sizeOffset = outerRing.size();
77  m_innerBoundariesList.clear();
78 
79  foreach ( const GeoDataLinearRing &ring, innerRings ) {
80  for ( int i = 0; i < ring.size(); ++i ) {
81  QRegion newRegion = painter->regionFromEllipse( ring.at(i), 15, 15 );
82 
83  if ( !m_selectedNodes.contains( i + sizeOffset ) ) {
84  painter->setBrush( Oxygen::aluminumGray3 );
85  } else {
86  painter->setBrush( Oxygen::aluminumGray6 );
87  }
88 
89  if ( ( i + sizeOffset == m_mergedNodes.first && m_state == MergingNodes ) ||
90  ( i + sizeOffset == m_mergedNodes.second && m_state == MergingNodes ) ) {
91  painter->setBrush( Oxygen::emeraldGreen6 );
92  painter->drawEllipse( ring.at(i) , 15, 15 );
93  } else {
94  painter->drawEllipse( ring.at(i) , 10, 10 );
95  }
96 
97  regionList.append( newRegion );
98  }
99  sizeOffset += ring.size();
100  m_innerBoundariesList.append( painter->regionFromPolygon( ring, Qt::OddEvenFill ) );
101  }
102 
103  regionList.append( painter->regionFromPolygon( outerRing, Qt::OddEvenFill ) );
104  }
105  painter->restore();
106  setRegions( regionList );
107 }
108 
109 bool AreaAnnotation::mousePressEvent( QMouseEvent *event )
110 {
111  QList<QRegion> regionList = regions();
112 
113  qreal lat, lon;
114  m_viewport->geoCoordinates( event->pos().x(), event->pos().y(),
115  lon, lat,
116  GeoDataCoordinates::Radian );
117  m_movedPointCoords.set( lon, lat );
118 
119  int index = firstRegionWhichContains( event );
120 
121  if ( index == regionList.size() - 1 && isInnerBoundsPoint( event->pos() ) ) {
122  m_rightClickedNode = -2;
123  return false;
124  }
125 
126  if ( event->button() == Qt::LeftButton ) {
127  m_movedNodeIndex = index;
128  // If we are in the merging state store the clicked nodes.
129  if ( m_state == MergingNodes && index < regionList.size() - 1 ) {
130  if ( m_mergedNodes.first != -1 && m_mergedNodes.second != -1 ) {
131  m_mergedNodes = QPair<int, int>( -1, -1 );
132  } else if ( m_mergedNodes.first == -1 ) {
133  m_mergedNodes.first = index;
134  } else {
135  m_mergedNodes.second = index;
136  }
137  }
138 
139  return true;
140  } else if ( event->button() == Qt::RightButton ) {
141  if ( index < regionList.size() - 1 ) {
142  m_rightClickedNode = index;
143  } else {
144  m_rightClickedNode = -1;
145  }
146 
147  return true;
148  }
149 
150  return false;
151 }
152 
153 bool AreaAnnotation::mouseMoveEvent( QMouseEvent *event )
154 {
155  if ( !m_viewport ) {
156  return false;
157  }
158 
159  if ( m_movedNodeIndex < 0 ) {
160  return false;
161  }
162 
163  QList<QRegion> regionList = regions();
164 
165  qreal lon, lat;
166  m_viewport->geoCoordinates( event->pos().x(),
167  event->pos().y(),
168  lon, lat,
169  GeoDataCoordinates::Radian );
170  const GeoDataCoordinates coords( lon, lat );
171 
172  // This means one of the nodes has been clicked. The clicked node can be on the outer
173  // boundary of the polygon as well as on its inner boundary.
174  if ( m_movedNodeIndex >= 0 && m_movedNodeIndex < regionList.size() - 1 ) {
175  if ( placemark()->geometry()->nodeType() == GeoDataTypes::GeoDataPolygonType ) {
176  GeoDataPolygon *polygon = static_cast<GeoDataPolygon*>( placemark()->geometry() );
177  GeoDataLinearRing &outerRing = polygon->outerBoundary();
178 
179  // This means the clicked node is one of the nodes which form one of the
180  // polygon's inner boundaries.
181  if ( m_movedNodeIndex >= outerRing.size() ) {
182  int newIndex = m_movedNodeIndex - outerRing.size();
183  QVector<GeoDataLinearRing> &innerRings = polygon->innerBoundaries();
184 
185  for ( int i = 0; i < innerRings.size(); ++i ) {
186  if ( newIndex - innerRings.at(i).size() < 0 ) {
187  innerRings[i].at(newIndex) = coords;
188  break;
189  } else {
190  newIndex -= innerRings.at(i).size();
191  }
192  }
193  } else {
194  outerRing[m_movedNodeIndex] = coords;
195  }
196 
197  return true;
198  } else {
199  return false;
200  }
201  }
202 
203  // This means the interior of the polygon has been clicked (excepting its "holes" - its
204  // inner boundaries) and here we handle the move of the entire polygon.
205  Q_ASSERT( m_movedNodeIndex == regionList.size() - 1 );
206  qreal bearing = m_movedPointCoords.bearing( coords );
207  qreal distance = distanceSphere( coords, m_movedPointCoords );
208 
209  if ( placemark()->geometry()->nodeType() == GeoDataTypes::GeoDataPolygonType ) {
210 
211  GeoDataPolygon *poly = static_cast<GeoDataPolygon*>( placemark()->geometry() );
212  GeoDataLinearRing outerRing = poly->outerBoundary();
213  QVector<GeoDataLinearRing> innerRings = poly->innerBoundaries();
214 
215  poly->outerBoundary().clear();
216  poly->innerBoundaries().clear();
217 
218  for ( int i = 0; i < outerRing.size(); ++i ) {
219  GeoDataCoordinates movedPoint = outerRing.at(i).moveByBearing( bearing, distance );
220  qreal lon = movedPoint.longitude();
221  qreal lat = movedPoint.latitude();
222 
223  GeoDataCoordinates::normalizeLonLat( lon, lat );
224  movedPoint.setLongitude( lon );
225  movedPoint.setLatitude( lat );
226 
227  poly->outerBoundary().append( movedPoint );
228  }
229 
230  foreach ( const GeoDataLinearRing &ring, innerRings ) {
231  GeoDataLinearRing newRing( Tessellate );
232  for ( int i = 0; i < ring.size(); ++i ) {
233  GeoDataCoordinates movedPoint = ring.at(i).moveByBearing( bearing, distance );
234  qreal lon = movedPoint.longitude();
235  qreal lat = movedPoint.latitude();
236 
237  GeoDataCoordinates::normalizeLonLat( lon, lat );
238  movedPoint.setLongitude( lon );
239  movedPoint.setLatitude( lat );
240 
241  newRing.append( movedPoint );
242  }
243  poly->innerBoundaries().append( newRing );
244  }
245 
246  m_movedPointCoords.set( lon, lat );
247  return true;
248  }
249 
250  return false;
251 }
252 
253 bool AreaAnnotation::mouseReleaseEvent( QMouseEvent *event )
254 {
255  // The offset in pixels after which a mouse move event should not be considered actually a mouse
256  // press event.
257  static const int mouseMoveOffset = 1;
258 
259  // If the event is caught in one of the polygon's holes, we return false in
260  // order to pass it to other potential polygons which have been drawn there.
261  if ( isInnerBoundsPoint( event->pos() ) && m_movedNodeIndex == -1 ) {
262  return false;
263  }
264 
265  QList<QRegion> regionList = regions();
266 
267  m_movedNodeIndex = -1;
268  m_rightClickedNode = -2;
269 
270  qreal x, y;
271  m_viewport->screenCoordinates( m_movedPointCoords.longitude(), m_movedPointCoords.latitude(), x, y );
272 
273  // Get the index of the first region from the regionList which contains the event pos.
274  // This may refer to a node or, if i == regionList.size() - 1, to the whole polygon.
275  int index = firstRegionWhichContains( event );
276 
277  // The node gets selected only if it is clicked and not moved.
278  // Is this value ok in order to avoid this?
279  if ( qFabs(event->pos().x() - x) > mouseMoveOffset ||
280  qFabs(event->pos().y() - y) > mouseMoveOffset ) {
281  return true;
282  }
283 
284  // If the action state is set to MergingNodes then the clicked node should not get into the
285  // selectedNodes list.
286  if ( m_state == MergingNodes ) {
287  return true;
288  }
289 
290  // Do the same as above with the node which has been clicked.
291  if ( index >= 0 && index < regionList.size() - 1 && event->button() == Qt::LeftButton ) {
292  if ( !m_selectedNodes.contains( index ) ) {
293  m_selectedNodes.append( index );
294  } else {
295  m_selectedNodes.removeAll( index );
296  }
297  }
298 
299  // We return true even if we get here, because it means that there were no nodes to
300  // be marked (the interior of the polygon has been clicked) and we don't want to do
301  // anything else than release it, so we tell caller that we handled the event.
302  return true;
303 }
304 
305 void AreaAnnotation::setState( ActionState state )
306 {
307  m_state = state;
308 
309  // Also do the initializations.
310  if ( state == MergingNodes ) {
311  m_mergedNodes = QPair<int, int>( -1, -1 );
312  }
313 }
314 
315 AreaAnnotation::ActionState AreaAnnotation::state() const
316 {
317  return m_state;
318 }
319 
320 QList<int> &AreaAnnotation::selectedNodes()
321 {
322  return m_selectedNodes;
323 }
324 
325 int AreaAnnotation::rightClickedNode() const
326 {
327  return m_rightClickedNode;
328 }
329 
330 bool AreaAnnotation::isInnerBoundsPoint( const QPoint &point, bool restrictive ) const
331 {
332  foreach ( const QRegion &innerRegion, m_innerBoundariesList ) {
333  if ( innerRegion.contains( point ) ) {
334  if ( restrictive ) {
335  QList<QRegion> regionList = regions();
336 
337  for ( int i = 0; i < regionList.size() - 1; ++i ) {
338  if ( regionList.at(i).contains( point ) ) {
339  return false;
340  }
341  }
342 
343  return true;
344  } else {
345  return true;
346  }
347  }
348  }
349 
350  return false;
351 }
352 
353 bool AreaAnnotation::isValidPolygon() const
354 {
355  const GeoDataPolygon *poly = static_cast<const GeoDataPolygon*>( placemark()->geometry() );
356 
357  foreach ( const GeoDataLinearRing &innerRing, poly->innerBoundaries() ) {
358  for ( int i = 0; i < innerRing.size(); ++i ) {
359  if ( !poly->outerBoundary().contains( innerRing.at(i) ) ) {
360  return false;
361  }
362  }
363  }
364 
365  return true;
366 }
367 
368 void AreaAnnotation::setMergedNodes( const QPair<int, int> &nodes )
369 {
370  m_mergedNodes = nodes;
371 }
372 
373 QPair<int, int> &AreaAnnotation::mergedNodes()
374 {
375  return m_mergedNodes;
376 }
377 
378 const char *AreaAnnotation::graphicType() const
379 {
380  return SceneGraphicTypes::SceneGraphicAreaAnnotation;
381 }
382 
383 int AreaAnnotation::firstRegionWhichContains( QMouseEvent *mouseEvent )
384 {
385  QList<QRegion> regionList = regions();
386 
387  for ( int i = 0; i < regionList.size(); ++i ) {
388  if ( regionList.at(i).contains( mouseEvent->pos() ) ) {
389  return i;
390  }
391  }
392 
393  // It cannot get here since the region list is used so far for handling the mouse events.
394  Q_ASSERT( 0 );
395  return -1;
396 }
397 
398 }
QList::clear
void clear()
Marble::GeoDataCoordinates
A 3d point representation.
Definition: GeoDataCoordinates.h:52
Marble::GeoDataCoordinates::moveByBearing
GeoDataCoordinates moveByBearing(qreal bearing, qreal distance) const
Returns the coordinates of the resulting point after moving this point according to the distance and ...
Definition: GeoDataCoordinates.cpp:1226
Marble::GeoDataGeometry::nodeType
virtual const char * nodeType() const
Provides type information for downcasting a GeoData.
Definition: GeoDataGeometry.cpp:77
SceneGraphicsTypes.h
Marble::GeoDataCoordinates::Radian
Definition: GeoDataCoordinates.h:65
Marble::Oxygen::emeraldGreen6
QColor const emeraldGreen6
Definition: MarbleColors.h:66
Marble::GeoDataLinearRing
A LinearRing that allows to store a closed, contiguous set of line segments.
Definition: GeoDataLinearRing.h:68
MarbleMath.h
Marble::GeoDataTypes::GeoDataPolygonType
const char * GeoDataPolygonType
Definition: GeoDataTypes.cpp:69
Marble::GeoDataLinearRing::contains
virtual bool contains(const GeoDataCoordinates &coordinates) const
Returns whether the given coordinates lie within the polygon.
Definition: GeoDataLinearRing.cpp:58
Marble::ViewportParams::geoCoordinates
bool geoCoordinates(const int x, const int y, qreal &lon, qreal &lat, GeoDataCoordinates::Unit unit=GeoDataCoordinates::Degree) const
Get the earth coordinates corresponding to a pixel in the map.
Definition: ViewportParams.cpp:391
Marble::GeoPainter
A painter that allows to draw geometric primitives on the map.
Definition: GeoPainter.h:98
Marble::AreaAnnotation::graphicType
virtual const char * graphicType() const
Provides information for downcasting a SceneGraphicsItem.
Definition: AreaAnnotation.cpp:378
Marble::AreaAnnotation::mergedNodes
QPair< int, int > & mergedNodes()
Getters for the nodes to be merged.
Definition: AreaAnnotation.cpp:373
Marble::AreaAnnotation::paint
virtual void paint(GeoPainter *painter, const ViewportParams *viewport)
Paints the item using the given GeoPainter.
Definition: AreaAnnotation.cpp:41
Marble::GeoDataLineString::size
int size() const
Returns the number of nodes in a LineString.
Definition: GeoDataLineString.cpp:138
QList::at
const T & at(int i) const
Marble::AreaAnnotation::mouseReleaseEvent
virtual bool mouseReleaseEvent(QMouseEvent *event)
Definition: AreaAnnotation.cpp:253
Marble::AreaAnnotation::selectedNodes
QList< int > & selectedNodes()
Returns the list of selected node indexes.
Definition: AreaAnnotation.cpp:320
Marble::SceneGraphicsItem::setRegions
void setRegions(const QList< QRegion > &regions)
A setter for the m_regions private member.
Definition: SceneGraphicsItem.cpp:36
QPainter::save
void save()
Marble::AreaAnnotation::rightClickedNode
int rightClickedNode() const
Returns the node index on which the mouse press event (with the right button) has been caught...
Definition: AreaAnnotation.cpp:325
Marble::distanceSphere
qreal distanceSphere(qreal lon1, qreal lat1, qreal lon2, qreal lat2)
This method calculates the shortest distance between two points on a sphere.
Definition: MarbleMath.h:52
Marble::AreaAnnotation::MergingNodes
Definition: AreaAnnotation.h:31
QPoint
QMouseEvent
AreaAnnotation.h
Marble::GeoDataCoordinates::latitude
qreal latitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the latitude of the GeoDataCoordinates object use the unit parameter to switch between Radi...
Definition: GeoDataCoordinates.cpp:751
Marble::GeoPainter::drawEllipse
void drawEllipse(const GeoDataCoordinates &centerPosition, qreal width, qreal height, bool isGeoProjected=false)
Draws an ellipse at the given position. The ellipse is placed with its center located at the given ce...
Definition: GeoPainter.cpp:289
Marble::GeoPainter::regionFromEllipse
QRegion regionFromEllipse(const GeoDataCoordinates &centerPosition, qreal width, qreal height, bool isGeoProjected=false, qreal strokeWidth=3) const
Creates a region for an ellipse at a given position.
Definition: GeoPainter.cpp:356
QPoint::x
int x() const
QPoint::y
int y() const
QList::size
int size() const
Marble::GeoDataPlacemark::geometry
GeoDataGeometry * geometry()
The geometry of the GeoDataPlacemark is to be rendered to the marble map along with the icon at the c...
Definition: GeoDataPlacemark.cpp:152
Marble::Oxygen::aluminumGray3
QColor const aluminumGray3
Definition: MarbleColors.h:93
Marble::AreaAnnotation::AreaAnnotation
AreaAnnotation(GeoDataPlacemark *placemark)
Definition: AreaAnnotation.cpp:31
QList::append
void append(const T &value)
Marble::AreaAnnotation::isInnerBoundsPoint
bool isInnerBoundsPoint(const QPoint &point, bool restrictive=false) const
Checks whether the point parameter is contained by one of its inner boundaries.
Definition: AreaAnnotation.cpp:330
Marble::Oxygen::aluminumGray6
QColor const aluminumGray6
Definition: MarbleColors.h:90
QMouseEvent::button
Qt::MouseButton button() const
Marble::SceneGraphicsItem
This is the base class for all scene graphics included within the annotate plugin.
Definition: SceneGraphicsItem.h:34
Marble::AreaAnnotation::mouseMoveEvent
virtual bool mouseMoveEvent(QMouseEvent *event)
Definition: AreaAnnotation.cpp:153
Marble::GeoDataPolygon
A polygon that can have "holes".
Definition: GeoDataPolygon.h:81
QList::removeAll
int removeAll(const T &value)
Marble::GeoDataCoordinates::bearing
qreal bearing(const GeoDataCoordinates &other, Unit unit=Radian, BearingType type=InitialBearing) const
Returns the bearing (true bearing, the angle between the line defined by this point and the other and...
Definition: GeoDataCoordinates.cpp:1213
QPainter::setBrush
void setBrush(const QBrush &brush)
Marble::ViewportParams::screenCoordinates
bool screenCoordinates(const qreal lon, const qreal lat, qreal &x, qreal &y) const
Get the screen coordinates corresponding to geographical coordinates in the map.
Definition: ViewportParams.cpp:357
Marble::AreaAnnotation::setState
void setState(ActionState state)
Sets the state of the object.
Definition: AreaAnnotation.cpp:305
QList< QRegion >
Marble::GeoDataCoordinates::normalizeLonLat
static void normalizeLonLat(qreal &lon, qreal &lat, GeoDataCoordinates::Unit=GeoDataCoordinates::Radian)
normalize both longitude and latitude at the same time This method normalizes both latitude and longi...
Definition: GeoDataCoordinates.cpp:845
GeoPainter.h
Marble::GeoDataCoordinates::set
void set(qreal lon, qreal lat, qreal alt=0, GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian)
(re)set the coordinates in a GeoDataCoordinates object
Definition: GeoDataCoordinates.cpp:657
GeoDataPlacemark.h
Marble::GeoDataLineString::append
void append(const GeoDataCoordinates &position)
Appends a given geodesic position as a new node to the LineString.
Definition: GeoDataLineString.cpp:225
Marble::GeoDataPolygon::outerBoundary
GeoDataLinearRing & outerBoundary()
Returns the outer boundary that is represented as a LinearRing.
Definition: GeoDataPolygon.cpp:123
Marble::GeoDataLineString::at
GeoDataCoordinates & at(int pos)
Returns a reference to the coordinates of a node at a given position. This method detaches the return...
Definition: GeoDataLineString.cpp:143
Marble::ViewportParams
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
QPair< int, int >
QRegion::contains
bool contains(const QPoint &p) const
Marble::GeoDataCoordinates::longitude
qreal longitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the longitude of the GeoDataCoordinates object use the unit parameter to switch between Rad...
Definition: GeoDataCoordinates.cpp:739
QList::contains
bool contains(const T &value) const
Marble::GeoDataCoordinates::setLatitude
void setLatitude(qreal lat, GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian)
set the longitude in a GeoDataCoordinates object
Definition: GeoDataCoordinates.cpp:699
ViewportParams.h
This file contains the headers for ViewportParams.
QPainter::restore
void restore()
Marble::GeoDataCoordinates::setLongitude
void setLongitude(qreal lon, GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian)
set the longitude in a GeoDataCoordinates object
Definition: GeoDataCoordinates.cpp:679
QVector::at
const T & at(int i) const
Marble::SceneGraphicsItem::regions
QList< QRegion > regions() const
Returns the list of regions which form the scene graphic element.
Definition: SceneGraphicsItem.cpp:31
Marble::GeoPainter::regionFromPolygon
QRegion regionFromPolygon(const GeoDataLinearRing &linearRing, Qt::FillRule fillRule, qreal strokeWidth=3) const
Creates a region for a given linear ring (a "polygon without holes").
Definition: GeoPainter.cpp:585
Marble::SceneGraphicTypes::SceneGraphicAreaAnnotation
const char * SceneGraphicAreaAnnotation
Definition: SceneGraphicsTypes.cpp:20
Marble::GeoDataPolygon::innerBoundaries
QVector< GeoDataLinearRing > & innerBoundaries()
Returns a set of inner boundaries which are represented as LinearRings.
Definition: GeoDataPolygon.cpp:139
QVector
Marble::AreaAnnotation::state
ActionState state() const
Getter for the state.
Definition: AreaAnnotation.cpp:315
Marble::GeoDataLineString::clear
void clear()
Destroys all nodes in a LineString.
Definition: GeoDataLineString.cpp:298
Marble::SceneGraphicsItem::placemark
const GeoDataPlacemark * placemark() const
SceneGraphicItem class, when called from one of its derived classes' constructors, takes as a parameter a pointer to the placemark of the graphic element.
Definition: SceneGraphicsItem.cpp:41
QMouseEvent::pos
const QPoint & pos() const
Marble::AreaAnnotation::ActionState
ActionState
Definition: AreaAnnotation.h:29
GeoDataTypes.h
Marble::AreaAnnotation::setMergedNodes
void setMergedNodes(const QPair< int, int > &nodes)
Sets the nodes to be merged.
Definition: AreaAnnotation.cpp:368
Marble::AreaAnnotation::isValidPolygon
bool isValidPolygon() const
Checks if the polygon has a valid shape; an invalid shape would be, for example, if one of its inner ...
Definition: AreaAnnotation.cpp:353
Marble::Tessellate
Definition: MarbleGlobal.h:32
QVector::size
int size() const
Marble::GeoDataPlacemark
a class representing a point of interest on the map
Definition: GeoDataPlacemark.h:54
QRegion
Marble::AreaAnnotation::mousePressEvent
virtual bool mousePressEvent(QMouseEvent *event)
In the implementation of these virtual functions, the following convention has been followed: if the ...
Definition: AreaAnnotation.cpp:109
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:38 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal