KDE 4.2 PyKDE API Reference for Marble
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

GeoPainter Class Reference

from PyKDE4.marble import *

Inherits: Marble.ClipPainter → QPainter
Namespace: Marble

Detailed Description

a painter that makes it easy to draw geometric items on the map

This class enables application developers to paint simple geometric shapes and objects on the map. The API is inspired by and is compatible to QPainter.

All methods are using geographic coordinates to position the item. However while being placed in geographic coordinates the shape of the objects could still use the screen coordinates ( isGeoProjected = false ). Alternatively the shape of the object can get projected according to Marble's current projection (e.g. spherical projection) ( isGeoProjected = true ). If screen coordinates get used then e.g. width and height are assumed to be expressed in pixels, otherwise degrees are used.

Painter transformations (e.g. translate) always happen in screen coordinates.

NOTE: Like in QPainter drawing objects should always be a VOLATILE operation! This means that e.g. placemarks don't get added to the globe permanently. So unless you do the drawing on every repaint the objects you draw will disappear on the next paint event.

So if you want to add placemarks to your map PERMANENTLY (i.e. you don't need to take care of repainting) then please use other means such as the KML import.

See docs/paintingmaps.txt for more information.


Methods

 __init__ (self, QPaintDevice pd, Marble.ViewportParams params, Marble.MapQuality mapQuality, bool clip=1)
 __init__ (self, Marble.GeoPainter a0)
 autoMapQuality (self)
 drawAnnotation (self, Marble.GeoDataCoordinates position, QString text, QSize bubbleSize=QSize(130,100), int bubbleOffsetX=-10, int bubbleOffsetY=-30, int xRnd=5, int yRnd=5)
 drawEllipse (self, Marble.GeoDataCoordinates centerPoint, float width, float height, bool isGeoProjected=0)
 drawEllipse (self, int x, int y, int width, int height)
 drawEllipse (self, QRectF rectangle)
 drawImage (self, Marble.GeoDataCoordinates centerPoint, QImage image, bool isGeoProjected=0)
 drawImage (self, QRect target, QImage image, QRect source, Qt.ImageConversionFlags flags=Qt.AutoColor)
 drawLine (self, Marble.GeoDataCoordinates p1, Marble.GeoDataCoordinates p2, bool isGeoProjected=0)
 drawLine (self, int x1, int y1, int x2, int y2)
 drawPixmap (self, Marble.GeoDataCoordinates centerPoint, QPixmap pixmap, bool isGeoProjected=0)
 drawPixmap (self, int x, int y, QPixmap pixmap)
 drawPixmap (self, QPointF point, QPixmap pixmap)
 drawPixmap (self, QPoint point, QPixmap pixmap)
 drawPoint (self, Marble.GeoDataCoordinates position)
 drawPoint (self, int x, int y)
 drawPoints (self, Marble.GeoDataCoordinates points, int pointCount)
 drawPolygon (self, Marble.GeoDataLinearRing linearRing, Qt.FillRule fillRule=Qt.OddEvenFill)
 drawPolygon (self, Marble.GeoDataPolygon polygon, Qt.FillRule fillRule=Qt.OddEvenFill)
 drawPolygon (self, QPolygonF polygon)
 drawPolyline (self, Marble.GeoDataLineString lineString)
 drawPolyline (self, QPolygonF polyline)
 drawRect (self, Marble.GeoDataCoordinates centerPoint, float width, float height, bool isGeoProjected=0)
 drawRect (self, QRectF rectangle)
 drawRect (self, QRect rectangle)
 drawRect (self, int x, int y, int width, int height)
 drawRoundRect (self, Marble.GeoDataCoordinates centerPoint, int w, int h, int xRnd=25, int yRnd=25, bool isGeoProjected=0)
 drawText (self, Marble.GeoDataCoordinates position, QString text)
 drawText (self, int x, int y, QString text)
 drawText (self, QPoint position, QString text)
 drawText (self, QRect rectangle, int flags, QString text, QRect boundingRect=0)
Marble.MapQuality mapQuality (self)

Method Documentation

__init__ (  self,
QPaintDevice  pd,
Marble.ViewportParams  params,
Marble.MapQuality  mapQuality,
bool  clip=1
)
__init__ (  self,
Marble.GeoPainter  a0
)
autoMapQuality (   self )
drawAnnotation (  self,
Marble.GeoDataCoordinates  position,
QString  text,
QSize  bubbleSize=QSize(130,100),
int  bubbleOffsetX=-10,
int  bubbleOffsetY=-30,
int  xRnd=5,
int  yRnd=5
)
drawEllipse (  self,
Marble.GeoDataCoordinates  centerPoint,
float  width,
float  height,
bool  isGeoProjected=0
)
drawEllipse (  self,
int  x,
int  y,
int  width,
int  height
)
drawEllipse (  self,
QRectF  rectangle
)
drawImage (  self,
Marble.GeoDataCoordinates  centerPoint,
QImage  image,
bool  isGeoProjected=0
)
drawImage (  self,
QRect  target,
QImage  image,
QRect  source,
Qt.ImageConversionFlags  flags=Qt.AutoColor
)
drawLine (  self,
Marble.GeoDataCoordinates  p1,
Marble.GeoDataCoordinates  p2,
bool  isGeoProjected=0
)
drawLine (  self,
int  x1,
int  y1,
int  x2,
int  y2
)
drawPixmap (  self,
Marble.GeoDataCoordinates  centerPoint,
QPixmap  pixmap,
bool  isGeoProjected=0
)
drawPixmap (  self,
int  x,
int  y,
QPixmap  pixmap
)
drawPixmap (  self,
QPointF  point,
QPixmap  pixmap
)
drawPixmap (  self,
QPoint  point,
QPixmap  pixmap
)
drawPoint (  self,
Marble.GeoDataCoordinates  position
)
drawPoint (  self,
int  x,
int  y
)
drawPoints (  self,
Marble.GeoDataCoordinates  points,
int  pointCount
)
drawPolygon (  self,
Marble.GeoDataLinearRing  linearRing,
Qt.FillRule  fillRule=Qt.OddEvenFill
)
drawPolygon (  self,
Marble.GeoDataPolygon  polygon,
Qt.FillRule  fillRule=Qt.OddEvenFill
)
drawPolygon (  self,
QPolygonF  polygon
)
drawPolyline (  self,
Marble.GeoDataLineString  lineString
)
drawPolyline (  self,
QPolygonF  polyline
)
drawRect (  self,
Marble.GeoDataCoordinates  centerPoint,
float  width,
float  height,
bool  isGeoProjected=0
)
drawRect (  self,
QRectF  rectangle
)
drawRect (  self,
QRect  rectangle
)
drawRect (  self,
int  x,
int  y,
int  width,
int  height
)
drawRoundRect (  self,
Marble.GeoDataCoordinates  centerPoint,
int  w,
int  h,
int  xRnd=25,
int  yRnd=25,
bool  isGeoProjected=0
)
drawText (  self,
Marble.GeoDataCoordinates  position,
QString  text
)
drawText (  self,
int  x,
int  y,
QString  text
)
drawText (  self,
QPoint  position,
QString  text
)
drawText (  self,
QRect  rectangle,
int  flags,
QString  text,
QRect  boundingRect=0
)
Marble.MapQuality mapQuality (   self )
  • Full Index

Modules

  • marble