KDE 4.3 PyKDE API Reference

- KDE's Python API

# MarbleGraphicsItem Class Reference

`from PyKDE4.marble import *`

Subclasses: Marble.GeoGraphicsItem, Marble.ScreenGraphicsItem
Namespace: Marble

## Detailed Description

Abstract class:
  This class can be used as a base class for new classes, but can not be instantiated directly.

## Enumerations

CacheMode | { NoCache, ItemCoordinateCache, DeviceCoordinateCache }

## Methods

| __init__ (self)
| __init__ (self, MarbleGraphicsItemPrivate d_ptr)
Marble.MarbleGraphicsItem.CacheMode | cacheMode (self)
bool | contains (self, QPoint point)
bool | eventFilter (self, QObject object, QEvent e)
| paint (self, Marble.GeoPainter painter, Marble.ViewportParams viewport, QString renderPos, GeoSceneLayer layer=0)
bool | paintEvent (self, Marble.GeoPainter painter, Marble.ViewportParams viewport, QString renderPos, GeoSceneLayer layer=0)
| setCacheMode (self, Marble.MarbleGraphicsItem.CacheMode mode, QSize logicalCacheSize=QSize())
| setSize (self, QSize size)
QSize | size (self)
| update (self)

## Method Documentation

__init__ | ( |  | self ) |

__init__ | ( | self, |
|  | MarbleGraphicsItemPrivate | d_ptr
| ) |  |  |

Marble.MarbleGraphicsItem.CacheMode cacheMode | ( |  | self ) |

Returns the cache mode of the item

bool contains | ( | self, |
|  | QPoint | point
| ) |  |  |

Returns true if the Item contains point in view coordinates.

bool eventFilter | ( | self, |
|  | QObject | object,
|  | QEvent | e
| ) |  |  |

paint | ( | self, |
|  | Marble.GeoPainter | painter,
|  | Marble.ViewportParams | viewport,
|  | QString | renderPos,
|  | GeoSceneLayer | layer=0
| ) |  |  |

Abstract method:
  This method is abstract and can be overridden but not called directly.

Paints the item in item coordinates. This has to be reimplemented by the subclass This function will be called by paintEvent().

bool paintEvent | ( | self, |
|  | Marble.GeoPainter | painter,
|  | Marble.ViewportParams | viewport,
|  | QString | renderPos,
|  | GeoSceneLayer | layer=0
| ) |  |  |

Paints the item on the screen in view coordinates. It is now save to call this function from a thread other than the gui thread.

setCacheMode | ( | self, |
|  | Marble.MarbleGraphicsItem.CacheMode | mode,
|  | QSize | logicalCacheSize=QSize()
| ) |  |  |

Set the cache mode of the item

setSize | ( | self, |
|  | QSize | size
| ) |  |  |

Set the size of the item

QSize size | ( |  | self ) |

Returns the size of the item

update | ( |  | self ) |

Schedules an painting update for the Item. As long it is not added to an GraphicsScene (which doesn't exist yet) it will be repainted at the next paint event instead of using the cache.

## Enumeration Documentation

CacheMode

Enumerator:

  NoCache |
  ItemCoordinateCache |
  DeviceCoordinateCache |