KDE 4.2 PyKDE API Reference for Marble

- KDE's Python API

# GeoDataContainer Class Reference

`from PyKDE4.marble import *`

Inherits: Marble.GeoDataFeature → Marble.GeoDataObject → Marble.GeoNode
Subclasses: Marble.GeoDataFolder
Namespace: Marble

## Detailed Description

A base class that can hold GeoDataFeatures

GeoDataContainer is the base class for the GeoData container classes GeoDataFolder and GeoDataDocument. It is never instantiated by itself, but is always used as part of a derived class.

It is based on GeoDataFeature, and it only adds a QVector<GeodataFeature *> to it, making it a Feature that can hold other Features.

See also:
  GeoDataFolder

See also:
  GeoDataDocument

## Methods
| __init__ (self, Marble.GeoDataObject parent=0)
| __init__ (self, Marble.GeoDataContainer a0)
| addFeature (self, Marble.GeoDataFeature feature, bool setChild=1)
Marble.GeoDataObject | child (self, int a0)
int | childCount (self)
int | childPosition (self, Marble.GeoDataObject a0)
QVector | features (self)
QVector | folders (self)
| pack (self, QDataStream stream)
QVector | placemarks (self)
| removeFeature (self, Marble.GeoDataFeature feature)
| unpack (self, QDataStream stream)

## Method Documentation

__init__ | ( | self, |
|  | Marble.GeoDataObject | parent=0
| ) |  |  |

Default constructor

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

addFeature | ( | self, |
|  | Marble.GeoDataFeature | feature,
|  | bool | setChild=1
| ) |  |  |

Add a feature to the container

Parameters:

  |  | feature the new feature

Marble.GeoDataObject child | ( | self, |
|  | int | a0
| ) |  |  |

returns the requested child item

int childCount | ( |  | self ) |

returns the number of items in the list

int childPosition | ( | self, |
|  | Marble.GeoDataObject | a0
| ) |  |  |

returns the position of an item in the list

QVector | ( |  | self ) |

A convenience function that returns all features in this container.

Returns:
  A QVector of GeoDataFeature*

See also:
  GeoDataFeature

QVector | ( |  | self ) |

A convenience function that returns all folders in this container.

Returns:
  A QVector of GeoDataFolder*

See also:
  GeoDataFolder

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

Serialize the container to a stream.

Parameters:

  |  | stream the stream

QVector | ( |  | self ) |

A convenience function that returns all placemarks in this container.

Returns:
  A QVector of GeoDataPlacemark*

See also:
  GeoDataPlacemark

See also:
  PlaceMarkContainer

removeFeature | ( | self, |
|  | Marble.GeoDataFeature | feature
| ) |  |  |

Remove a feature given by its pointer

Parameters:

  | feature | the feature which needs to be removed

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

Unserialize the container from a stream

Parameters:

  |  | stream the stream