KDE 4.9 PyKDE API Reference

- KDE's Python API

# RenderPlugin Class Reference

`from PyKDE4.marble import *`

Inherits: QObject,Marble.RenderPluginInterface → Marble.PluginInterface
Namespace: Marble

## Detailed Description

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

The abstract class that creates a renderable Item.

## Enumerations
ItemDataRole | { NameId, ConfigurationDialogAvailable, BackendTypes }
RenderType | { Unknown, Online }
## Signals
| actionGroupsChanged ()
| enabledChanged (bool enable)
| repaintNeeded (QRegion dirtyRegion=QRegion())
| settingsChanged (QString nameId)
| visibilityChanged (bool visible, QString nameId)
## Methods
| __init__ (self, Marble.MarbleModel marbleModel)
QAction | action (self)
[QActionGroup] | actionGroups (self)
| applyItemState (self)
bool | enabled (self)
bool | eventFilter (self, QObject a0, QEvent a1)
QString | guiString (self)
QStandardItem | item (self)
Marble.MarbleModel | marbleModel (self)
Marble.RenderPlugin | newInstance (self, Marble.MarbleModel marbleModel)
Marble.RenderPlugin.RenderType | renderType (self)
| restoreDefaultSettings (self)
| retrieveItemState (self)
QString | runtimeTrace (self)
| setEnabled (self, bool enabled)
bool | setSetting (self, QString key, QVariant value)
| setSettings (self, {QString:QVariant} settings)
| setVisible (self, bool visible)
QVariant | setting (self, QString key)
QStringList | settingKeys (self)
{QString:QVariant} | settings (self)
[QActionGroup] | toolbarActionGroups (self)
bool | visible (self)

## Signal Documentation

actionGroupsChanged | ( |  | ) |

This signal is emitted if the actions that the plugin supports change in any way

Signal syntax:
  `QObject.connect(source, SIGNAL("actionGroupsChanged()"), target_slot)`

enabledChanged | ( | bool | enable
| ) |  |  |

Signal syntax:
  `QObject.connect(source, SIGNAL("enabledChanged(bool)"), target_slot)`

repaintNeeded | ( | QRegion | dirtyRegion=QRegion()
| ) |  |  |

This signal is emitted if an update of the view is needed. If available with the dirtyRegion which is the region the view will change in. If dirtyRegion.isEmpty() returns true, the whole viewport has to be repainted.

Signal syntax:
  `QObject.connect(source, SIGNAL("repaintNeeded(QRegion)"), target_slot)`

settingsChanged | ( | QString | nameId
| ) |  |  |

This signal is emitted if the settings of the RenderPlugin changed.

Signal syntax:
  `QObject.connect(source, SIGNAL("settingsChanged(QString)"), target_slot)`

visibilityChanged | ( | bool | visible,
|  | QString | nameId
| ) |  |  |

This signal is emitted if the visibility is changed with setVisible.

Signal syntax:
  `QObject.connect(source, SIGNAL("visibilityChanged(bool, const QString&)"), target_slot)`

## Method Documentation

__init__ | ( | self, |
|  | Marble.MarbleModel | marbleModel
| ) |  |  |

QAction action | ( |  | self ) |

[QActionGroup] actionGroups | ( |  | self ) |

This method is used by the main window to get all of the actions that this plugin defines. There is no guarantee where the main window will place the actions but it will generally be in a Menu. The returned QList should also contain all of the actions returned by

See also:
  toolbarActions().

Returns:
  A QList of grouped actions

applyItemState | ( |  | self ) |

bool enabled | ( |  | self ) |

bool eventFilter | ( | self, |
|  | QObject | a0,
|  | QEvent | a1
| ) |  |  |

QString guiString | ( |  | self ) |

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

Returns the string that should appear in the UI / in the menu. . Using a "&" you can suggest key shortcuts

Example: "&Stars"

QStandardItem item | ( |  | self ) |

Marble.MarbleModel marbleModel | ( |  | self ) |

Marble.RenderPlugin newInstance | ( | self, |
|  | Marble.MarbleModel | marbleModel
| ) |  |  |

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

Returns a new object of the plugin

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.

restoreDefaultSettings | ( |  | self ) |

retrieveItemState | ( |  | self ) |

QString runtimeTrace | ( |  | self ) |

setEnabled | ( | self, |
|  | bool | enabled
| ) |  |  |

bool setSetting | ( | self, |
|  | QString | key,
|  | QVariant | value
| ) |  |  |

setSettings | ( | self, |
|  | {QString:QVariant} | settings
| ) |  |  |

Set the settings of the item.

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

QVariant setting | ( | self, |
|  | QString | key
| ) |  |  |

QStringList settingKeys | ( |  | self ) |

{QString:QVariant} settings | ( |  | self ) |

@return: The settings of the item.

[QActionGroup] toolbarActionGroups | ( |  | self ) |

This method returns a subset of the actions returned by

See also:
  actions() which are intended to be placed in a more prominent place such as a toolbar above the Marble Widget. You are not guaranteed that they will be in an actual toolbar but they will be visible and discoverable

Returns:
  A QList of grouped toolbar actions

bool visible | ( |  | self ) |

## Enumeration Documentation

ItemDataRole

This enum contains the data roles for the QStandardItem that is returned by item(). TODO: This should get moved into PluginInterface.h

Enumerator:

  NameId = Qt::UserRole+2 |
  ConfigurationDialogAvailable |
  BackendTypes |

RenderType

Enumerator:

  Unknown |
  Online |