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

marble

  • kde-4.x
  • kdeedu
  • marble
  • src
  • lib
  • marble
  • geodata
  • graphicsitem
AbstractGeoPolygonGraphicsItem.h
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 2011 Konstantin Oblaukhov <[email protected]>
9 //
10 
11 #ifndef MARBLE_ABSTRACTGEOPOLYGONGRAPHICSITEM_H
12 #define MARBLE_ABSTRACTGEOPOLYGONGRAPHICSITEM_H
13 
14 #include "GeoGraphicsItem.h"
15 #include "marble_export.h"
16 
17 #include <QImage>
18 #include <QColor>
19 
20 namespace Marble
21 {
22 
23 class GeoDataLinearRing;
24 class GeoDataPlacemark;
25 class GeoDataPolygon;
26 class GeoDataBuilding;
27 
28 class MARBLE_EXPORT AbstractGeoPolygonGraphicsItem : public GeoGraphicsItem
29 {
30 protected:
31  AbstractGeoPolygonGraphicsItem(const GeoDataPlacemark *placemark, const GeoDataPolygon *polygon);
32  AbstractGeoPolygonGraphicsItem(const GeoDataPlacemark *placemark, const GeoDataLinearRing *ring);
33  AbstractGeoPolygonGraphicsItem(const GeoDataPlacemark *placemark, const GeoDataBuilding *building);
34  ~AbstractGeoPolygonGraphicsItem() override;
35 
36 public:
37  const GeoDataLatLonAltBox& latLonAltBox() const override;
38  void paint(GeoPainter* painter, const ViewportParams *viewport, const QString &layer, int tileZoomLevel) override;
39  bool contains(const QPoint &screenPosition, const ViewportParams *viewport) const override;
40 
41  void setLinearRing(GeoDataLinearRing* ring);
42  void setPolygon(GeoDataPolygon* polygon);
43 
44  static const void *s_previousStyle;
45 
46 protected:
47  bool configurePainter(GeoPainter* painter, const ViewportParams &viewport) const;
48  inline
49  const GeoDataPolygon *polygon() const { return m_polygon; }
50  inline
51  const GeoDataLinearRing *ring() const { return m_ring; }
52  inline
53  const GeoDataBuilding *building() const { return m_building; }
54 
55  static int extractElevation(const GeoDataPlacemark &placemark);
56 
57 private:
58  QPixmap texture(const QString &path, const QColor &color) const;
59 
60  const GeoDataPolygon * m_polygon;
61  const GeoDataLinearRing * m_ring;
62  const GeoDataBuilding *const m_building;
63 };
64 
65 }
66 
67 #endif
Marble::GeoDataLinearRing
A LinearRing that allows to store a closed, contiguous set of line segments.
Definition: GeoDataLinearRing.h:67
Marble::AbstractGeoPolygonGraphicsItem::polygon
const GeoDataPolygon * polygon() const
Definition: AbstractGeoPolygonGraphicsItem.h:49
Marble::GeoPainter
A painter that allows to draw geometric primitives on the map.
Definition: GeoPainter.h:93
Marble::AbstractGeoPolygonGraphicsItem::building
const GeoDataBuilding * building() const
Definition: AbstractGeoPolygonGraphicsItem.h:53
Marble::GeoGraphicsItem
Definition: GeoGraphicsItem.h:46
QPoint
Marble::GeoDataBuilding
Contains important information about a building and its floors (levels)
Definition: GeoDataBuilding.h:33
Marble::AbstractGeoPolygonGraphicsItem::s_previousStyle
static const void * s_previousStyle
Definition: AbstractGeoPolygonGraphicsItem.h:44
Marble::GeoDataPolygon
A polygon that can have "holes".
Definition: GeoDataPolygon.h:81
QString
QColor
Marble::ViewportParams
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:46
Marble::AbstractGeoPolygonGraphicsItem
Definition: AbstractGeoPolygonGraphicsItem.h:28
QPixmap
GeoGraphicsItem.h
Marble::GeoDataPlacemark
a class representing a point of interest on the map
Definition: GeoDataPlacemark.h:53
Marble::AbstractGeoPolygonGraphicsItem::ring
const GeoDataLinearRing * ring() const
Definition: AbstractGeoPolygonGraphicsItem.h:51
Marble::GeoDataLatLonAltBox
A class that defines a 3D bounding box for geographic data.
Definition: GeoDataLatLonAltBox.h:47
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Sat Dec 7 2019 02:40:55 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
  •   KmPlot
  • libkeduvocdocument
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   src
  •   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