Marble.MapThemeManager

KDE 4.2 PyKDE API Reference for Marble

- KDE's Python API

# MapThemeManager Class Reference

`from PyKDE4.marble import *`

Inherits: QObject
Namespace: Marble

## Detailed Description

The class that handles map themes that are locally available .

This class which is able to check for maps that are locally available. After parsing the data it only stores the name, description and path into a QStandardItemModel.

The MapThemeManager is not owned by the MarbleWidget/Map itself. Instead it is owned by the widget or application that contains MarbleWidget/Map ( usually: the ControlView convenience class )

For convenience MarbleThemeManager provides a static helper class that loads the properties of a map theme into a GeoSceneDocument object.

See also:
  GeoSceneDocument

## Methods
| __init__ (self, QObject parent=0)
| __init__ (self, Marble.MapThemeManager a0)
| directoryChanged (self, QString path)
| fileChanged (self, QString path)
QStandardItemModel | mapThemeModel (self)
| updateMapThemeModel (self)
## Static Methods
Marble.GeoSceneDocument | loadMapTheme (QString mapThemeStringID)

## Method Documentation

__init__ | ( | self, |
|  | QObject | parent=0
| ) |  |  |

__init__ | ( | self, |
|  | Marble.MapThemeManager | a0
| ) |  |  |

Adds directory paths and .dgml file paths to the given QStringList.

directoryChanged | ( | self, |
|  | QString | path
| ) |  |  |

fileChanged | ( | self, |
|  | QString | path
| ) |  |  |

Marble.GeoSceneDocument loadMapTheme | ( | QString | mapThemeStringID
| ) |  |  |

Returns the map theme as a GeoSceneDocument object

Parameters:

  | mapThemeStringID | the string ID that refers to the map theme

This helper method should only get used by MarbleModel to load the current theme into memory or by the MapThemeManager.

QStandardItemModel mapThemeModel | ( |  | self ) |

Provides a model of the locally existing themes.

This method provides a QStandardItemModel of all themes that are available via MarbleDirs.

updateMapThemeModel | ( |  | self ) |

Updates the map theme model on request.

This method should usually get invoked on startup or by a QFileSystemWatcher instance.