KDE 4.9 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

AbstractDataPlugin Class Reference

from PyKDE4.marble import *

Inherits: Marble.RenderPlugin → QObject
Namespace: Marble

Detailed Description

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

An abstract class for plugins that show data that has a geo coordinate

This is the abstract class for plugins that show data on Marble map. It takes care of painting all items it gets from the corresponding AbstractDataPluginModel that has to be set on initialisation.

The user has to set the nameId as well as the number of items to fetch. Additionally it should be useful to set standard values via setEnabled (often true) and setVisible (often false) in the constructor of a subclass.


Signals

 changedNumberOfItems (long number)
 favoriteItemsOnlyChanged ()
 favoritesModelChanged ()

Methods

 __init__ (self, Marble.MarbleModel marbleModel)
QStringList backendTypes (self)
QObject favoritesModel (self)
 handleViewportChange (self, Marble.ViewportParams viewport)
bool isFavoriteItemsOnly (self)
bool isInitialized (self)
Marble.AbstractDataPluginModel model (self)
long numberOfItems (self)
bool render (self, Marble.GeoPainter painter, Marble.ViewportParams viewport, QString renderPos="NONE", Marble.GeoSceneLayer layer=0)
QString renderPolicy (self)
QStringList renderPosition (self)
Marble.RenderPlugin.RenderType renderType (self)
 setDelegate (self, QDeclarativeComponent delegate, QGraphicsItem parent)
 setFavoriteItemsOnly (self, bool favoriteOnly)
 setModel (self, Marble.AbstractDataPluginModel model)
 setNumberOfItems (self, long number)
[Marble.AbstractDataPluginItem] whichItemAt (self, QPoint curpos)

Signal Documentation

changedNumberOfItems ( long  number
)
Signal syntax:
QObject.connect(source, SIGNAL("changedNumberOfItems(quint32)"), target_slot)
favoriteItemsOnlyChanged (   )
Signal syntax:
QObject.connect(source, SIGNAL("favoriteItemsOnlyChanged()"), target_slot)
favoritesModelChanged (   )
Signal syntax:
QObject.connect(source, SIGNAL("favoritesModelChanged()"), target_slot)

Method Documentation

__init__ (  self,
Marble.MarbleModel  marbleModel
)

To do: FIXME Qt Quick segfaults if using the real class here instead of QObject

QStringList backendTypes (   self )

Returns the name(s) of the backend that the plugin can render

QObject favoritesModel (   self )
handleViewportChange (  self,
Marble.ViewportParams  viewport
)
bool isFavoriteItemsOnly (   self )
bool isInitialized (   self )
Marble.AbstractDataPluginModel model (   self )

Returns:
The model associated with the plugin.

long numberOfItems (   self )

Returns:
The number of items to be shown at the same time.

bool render (  self,
Marble.GeoPainter  painter,
Marble.ViewportParams  viewport,
QString  renderPos="NONE",
Marble.GeoSceneLayer  layer=0
)

Renders the content provided by the plugin on the viewport.

Returns:
true Returns whether the rendering has been successful

QString renderPolicy (   self )

Return how the plugin settings should be used.

QStringList renderPosition (   self )

Preferred level in the layer stack for the rendering

Marble.RenderPlugin.RenderType renderType (   self )

Function for returning the type of plugin this is for. This affects where in the menu tree the action() is placed.

@return: The type of render plugin this is.

setDelegate (  self,
QDeclarativeComponent  delegate,
QGraphicsItem  parent
)
setFavoriteItemsOnly (  self,
bool  favoriteOnly
)

Convenience method to set the favorite item state on the current model

setModel (  self,
Marble.AbstractDataPluginModel  model
)

Set the model of the plugin.

setNumberOfItems (  self,
long  number
)

Set the number of items to be shown at the same time.

[Marble.AbstractDataPluginItem] whichItemAt (  self,
QPoint  curpos
)

This function returns all items at the position curpos. Depending on where they have been painted the last time.

Returns:
The items at the given position.

  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • plasma
  • polkitqt
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal