Marble.MarbleGraphicsItem

KDE 4.9 PyKDE API Reference

- KDE's Python API

# MarbleGraphicsItem Class Reference

`from PyKDE4.marble import *`

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, Marble.MarbleGraphicsItem other)
Marble.MarbleGraphicsItem.CacheMode | cacheMode (self)
bool | contains (self, QPointF point)
QRectF | containsRect (self, QPointF point)
QRectF | contentRect (self)
QSizeF | contentSize (self)
bool | eventFilter (self, QObject object, QEvent e)
| hide (self)
Marble.AbstractMarbleGraphicsLayout | layout (self)
| paint (self, QPainter painter)
bool | paintEvent (self, QPainter painter, Marble.ViewportParams viewport)
| setCacheMode (self, Marble.MarbleGraphicsItem.CacheMode mode)
| setContentSize (self, QSizeF size)
| setLayout (self, Marble.AbstractMarbleGraphicsLayout layout)
| setProjection (self, Marble.ViewportParams viewport)
| setSize (self, QSizeF size)
| setVisible (self, bool visible)
| show (self)
QSizeF | size (self)
| update (self)
bool | visible (self)

## Method Documentation

__init__ | ( | self, |
|  | Marble.MarbleGraphicsItem | other
| ) |  |  |

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

Returns the cache mode of the item

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

Returns true if the Item contains point in parent coordinates.

QRectF containsRect | ( | self, |
|  | QPointF | point
| ) |  |  |

Returns the rect of one representation of the object that is at the given position.

QRectF contentRect | ( |  | self ) |

Returns the rect of the content in item coordinates.

QSizeF contentSize | ( |  | self ) |

Returns the size of the content of the MarbleGraphicsItem. This is identical to size() for default MarbleGraphicsItems.

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

hide | ( |  | self ) |

Hides the item. Equivalent to setVisible( false )

Marble.AbstractMarbleGraphicsLayout layout | ( |  | self ) |

Returns the layout of the MarbleGraphicsItem.

paint | ( | self, |
|  | QPainter | painter
| ) |  |  |

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

bool paintEvent | ( | self, |
|  | QPainter | painter,
|  | Marble.ViewportParams | viewport
| ) |  |  |

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

setCacheMode | ( | self, |
|  | Marble.MarbleGraphicsItem.CacheMode | mode
| ) |  |  |

Set the cache mode of the item

setContentSize | ( | self, |
|  | QSizeF | size
| ) |  |  |

Set the size of the content of the item.

setLayout | ( | self, |
|  | Marble.AbstractMarbleGraphicsLayout | layout
| ) |  |  |

Set the layout of the graphics item. The layout will now handle positions of added child items. The MarbleGraphicsItem takes ownership of the layout.

setProjection | ( | self, |
|  | Marble.ViewportParams | viewport
| ) |  |  |

setSize | ( | self, |
|  | QSizeF | size
| ) |  |  |

Set the size of the item

setVisible | ( | self, |
|  | bool | visible
| ) |  |  |

Makes the item visible or invisible, depending on visible.

show | ( |  | self ) |

Shows the item. Equivalent to setVisible( true )

QSizeF size | ( |  | self ) |

Returns the size of the item

update | ( |  | self ) |

Marks the item and all parent items as invalid. If caching is enabled, the next paintEvent() will cause the cache to be recreated, such that the paintEvent()s after will be optimized.

bool visible | ( |  | self ) |

Returns if the item is visible.

## Enumeration Documentation

CacheMode

Enumerator:

  NoCache |
  ItemCoordinateCache |
  DeviceCoordinateCache |