Marble.GeoDataDocument

KDE 4.9 PyKDE API Reference

- KDE's Python API

# GeoDataDocument Class Reference

`from PyKDE4.marble import *`

Inherits: Marble.GeoDocument,Marble.GeoDataContainer → Marble.GeoDataFeature → Marble.GeoDataObject → Marble.GeoNode
Namespace: Marble

## Detailed Description

A container for Features, Styles and in the future Schemas.

A GeoDataDocument is a container for features, styles, and schemas. This element is required if your KML file uses schemas or shared styles. It is recommended that all Styles be defined in a Document, each with an id, and then later referenced by a styleUrl for a given Feature or StyleMap.

## Methods
| __init__ (self)
| __init__ (self, Marble.GeoDataDocument other)
| addStyle (self, Marble.GeoDataStyle style)
| addStyleMap (self, Marble.GeoDataStyleMap map)
QString | fileName (self)
bool | isGeoDataDocument (self)
| pack (self, QDataStream stream)
| removeStyle (self, QString styleId)
| removeStyleMap (self, QString mapId)
| setDocumentRole (self, Marble.DocumentRole role)
| setFileName (self, QString value)
Marble.GeoDataStyle | style (self, QString styleId)
Marble.GeoDataStyleMap | styleMap (self, QString styleId)
[Marble.GeoDataStyleMap] | styleMaps (self)
[Marble.GeoDataStyle] | styles (self)
| unpack (self, QDataStream stream)

## Method Documentation

__init__ | ( |  | self ) |

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

addStyle | ( | self, |
|  | Marble.GeoDataStyle | style
| ) |  |  |

Add a style to the style storage

Parameters:

  | style | the new style

addStyleMap | ( | self, |
|  | Marble.GeoDataStyleMap | map
| ) |  |  |

Add a stylemap to the stylemap storage

Parameters:

  | map | the new stylemap

QString fileName | ( |  | self ) |

The filename of the document

The filename of the document is used internally to identify the files. it should never be empty as this could lead to potential collisions.

Returns:
  The filename of this document

bool isGeoDataDocument | ( |  | self ) |

pack | ( | self, |
|  | QDataStream | stream
| ) |  |  |

removeStyle | ( | self, |
|  | QString | styleId
| ) |  |  |

Add a style to the style storage

Parameters:

  | style | the new style

removeStyleMap | ( | self, |
|  | QString | mapId
| ) |  |  |

remove stylemap from storage

Parameters:

  | mapId | the styleId of the styleMap to be removed

setDocumentRole | ( | self, |
|  | Marble.DocumentRole | role
| ) |  |  |

setFileName | ( | self, |
|  | QString | value
| ) |  |  |

Set a new file name for this document

Parameters:

  | value | the new name

Marble.GeoDataStyle style | ( | self, |
|  | QString | styleId
| ) |  |  |

Return a style in the style storage

Parameters:

  | styleId | the id of the style

Marble.GeoDataStyleMap styleMap | ( | self, |
|  | QString | styleId
| ) |  |  |

Return a style in the style storage

Parameters:

  | styleId | the id of the style

[Marble.GeoDataStyleMap] styleMaps | ( |  | self ) |

dump a Vector of all styles

[Marble.GeoDataStyle] styles | ( |  | self ) |

dump a Vector of all styles

unpack | ( | self, |
|  | QDataStream | stream
| ) |  |  |