• 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
  • lib
  • marble
GeoPainter.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 2008-2009 Torsten Rahn <tackat@kde.org>
9 //
10 
11 #ifndef MARBLE_GEOPAINTER_H
12 #define MARBLE_GEOPAINTER_H
13 
14 
15 #include "marble_export.h"
16 
17 #include <QSize>
18 #include <QRegion>
19 
20 // Marble
21 #include "MarbleGlobal.h"
22 #include "ClipPainter.h"
23 
24 
25 class QImage;
26 class QPaintDevice;
27 class QPolygonF;
28 class QRect;
29 class QRectF;
30 class QString;
31 
32 
33 namespace Marble
34 {
35 
36 class ViewportParams;
37 class GeoPainterPrivate;
38 class GeoDataCoordinates;
39 class GeoDataLineString;
40 class GeoDataLinearRing;
41 class GeoDataPoint;
42 class GeoDataPolygon;
43 
44 
98 class MARBLE_EXPORT GeoPainter : public ClipPainter
99 {
100  public:
101 
109  GeoPainter( QPaintDevice * paintDevice,
110  const ViewportParams *viewportParams,
111  MapQuality mapQuality = NormalQuality );
112 
113 
117  ~GeoPainter();
118 
119 
124  MapQuality mapQuality() const;
125 
126 
159  void drawAnnotation( const GeoDataCoordinates & position,
160  const QString & text,
161  QSizeF bubbleSize = QSizeF( 130, 100 ),
162  qreal bubbleOffsetX = -10, qreal bubbleOffsetY = -30,
163  qreal xRnd = 5, qreal yRnd = 5 );
164 
165 
172  void drawPoint ( const GeoDataCoordinates & position );
173 
174 
189  QRegion regionFromPoint ( const GeoDataCoordinates & position,
190  qreal strokeWidth = 3) const;
191 
192 
199  void drawPoint ( const GeoDataPoint & point );
200 
201 
214  QRegion regionFromPoint ( const GeoDataPoint & point,
215  qreal strokeWidth = 3) const;
216 
217 
224  void drawText ( const GeoDataCoordinates & position, const QString & text );
225 
226 
243  void drawEllipse ( const GeoDataCoordinates & centerPosition,
244  qreal width, qreal height, bool isGeoProjected = false );
245 
246 
260  QRegion regionFromEllipse ( const GeoDataCoordinates & centerPosition,
261  qreal width, qreal height, bool isGeoProjected = false,
262  qreal strokeWidth = 3 ) const;
263 
264 
274  void drawImage ( const GeoDataCoordinates & centerPosition,
275  const QImage & image /* , bool isGeoProjected = false */ );
276 
277 
287  void drawPixmap ( const GeoDataCoordinates & centerPosition,
288  const QPixmap & pixmap /*, bool isGeoProjected = false */ );
289 
290 
302  void drawPolyline ( const GeoDataLineString & lineString,
303  const QString& labelText = QString(),
304  LabelPositionFlags labelPositionFlags = LineCenter );
305 
306 
321  QRegion regionFromPolyline ( const GeoDataLineString & lineString,
322  qreal strokeWidth = 3 ) const;
323 
324 
335  void drawPolygon ( const GeoDataLinearRing & linearRing,
336  Qt::FillRule fillRule = Qt::OddEvenFill );
337 
338 
359  QRegion regionFromPolygon ( const GeoDataLinearRing & linearRing,
360  Qt::FillRule fillRule, qreal strokeWidth = 3 ) const;
361 
362 
373  void drawPolygon ( const GeoDataPolygon & polygon,
374  Qt::FillRule fillRule = Qt::OddEvenFill );
375 
376 
394  void drawRect ( const GeoDataCoordinates & centerPosition,
395  qreal width, qreal height,
396  bool isGeoProjected = false );
397 
398 
416  QRegion regionFromRect ( const GeoDataCoordinates & centerPosition,
417  qreal width, qreal height,
418  bool isGeoProjected = false,
419  qreal strokeWidth = 3 ) const;
420 
421 
441  void drawRoundRect ( const GeoDataCoordinates & centerPosition,
442  int width, int height,
443  int xRnd = 25, int yRnd = 25 );
444 
445 
446 
447  // Reenabling QPainter+ClipPainter methods.
448  using QPainter::drawText;
449  using QPainter::drawEllipse;
450  using QPainter::drawImage;
451  using QPainter::drawPixmap;
452  using QPainter::drawPoint;
453  using ClipPainter::drawPolyline;
454  using ClipPainter::drawPolygon;
455  using QPainter::drawRect;
456  using QPainter::drawRoundedRect;
457 
458  private:
459  Q_DISABLE_COPY( GeoPainter )
460  GeoPainterPrivate * const d;
461 };
462 
463 }
464 
465 #endif
Marble::GeoDataPoint
A Geometry object representing a 3d point.
Definition: GeoDataPoint.h:47
Marble::GeoDataCoordinates
A 3d point representation.
Definition: GeoDataCoordinates.h:52
Marble::GeoDataLinearRing
A LinearRing that allows to store a closed, contiguous set of line segments.
Definition: GeoDataLinearRing.h:68
Marble::GeoPainter
A painter that allows to draw geometric primitives on the map.
Definition: GeoPainter.h:98
QPaintDevice
Marble::MapQuality
MapQuality
This enum is used to choose the map quality shown in the view.
Definition: MarbleGlobal.h:82
Marble::ClipPainter::drawPolygon
void drawPolygon(const QPolygonF &, Qt::FillRule fillRule=Qt::OddEvenFill)
Definition: ClipPainter.cpp:136
Marble::GeoPainterPrivate
Definition: GeoPainter_p.h:29
QPainter::drawRect
void drawRect(const QRectF &rectangle)
QRect
QPainter::drawPoint
void drawPoint(const QPointF &position)
QPainter::drawEllipse
void drawEllipse(const QRectF &rectangle)
MARBLE_EXPORT
#define MARBLE_EXPORT
Definition: marble_export.h:20
QPainter::drawRoundedRect
void drawRoundedRect(const QRectF &rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode)
QPainter::drawPixmap
void drawPixmap(const QRectF &target, const QPixmap &pixmap, const QRectF &source)
Marble::GeoDataPolygon
A polygon that can have "holes".
Definition: GeoDataPolygon.h:81
Marble::LineCenter
Definition: MarbleGlobal.h:113
Marble::NormalQuality
Normal quality.
Definition: MarbleGlobal.h:85
Marble::ClipPainter
Definition: ClipPainter.h:51
QPainter::drawText
void drawText(const QPointF &position, const QString &text)
QString
MarbleGlobal.h
Marble::GeoDataLineString
A LineString that allows to store a contiguous set of line segments.
Definition: GeoDataLineString.h:75
Marble::ViewportParams
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
QPixmap
QImage
QPainter::drawImage
void drawImage(const QRectF &target, const QImage &image, const QRectF &source, QFlags< Qt::ImageConversionFlag > flags)
QSizeF
ClipPainter.h
marble_export.h
Marble::ClipPainter::drawPolyline
void drawPolyline(const QPolygonF &)
Definition: ClipPainter.cpp:166
QRectF
QRegion
QPolygonF
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:39 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