GeoDataTreeModel Class Reference
from PyKDE4.marble import *
Inherits: QAbstractItemModel → QObject
Namespace: Marble
Detailed Description
The representation of GeoData in a model
This class represents all available data given by kml-data files.
Signals |
| | added (Marble.GeoDataObject object) |
| | removed (Marble.GeoDataObject object) |
Methods |
| | __init__ (self, QObject parent=0) |
| int | addDocument (self, Marble.GeoDataDocument document) |
| int | addFeature (self, Marble.GeoDataContainer parent, Marble.GeoDataFeature feature) |
| int | columnCount (self, QModelIndex parent=QModelIndex()) |
| QVariant | data (self, QModelIndex index, int role) |
| Qt::ItemFlags | flags (self, QModelIndex index) |
| bool | hasChildren (self, QModelIndex parent) |
| QVariant | headerData (self, int section, Qt::Orientation orientation, int role=Qt.DisplayRole) |
| QModelIndex | index (self, int row, int column, QModelIndex parent=QModelIndex()) |
| QModelIndex | index (self, Marble.GeoDataObject object) |
| QModelIndex | parent (self, QModelIndex index) |
| | removeDocument (self, int index) |
| | removeDocument (self, Marble.GeoDataDocument document) |
| bool | removeFeature (self, Marble.GeoDataContainer parent, int index) |
| bool | removeFeature (self, Marble.GeoDataFeature feature) |
| | reset (self) |
| Marble.GeoDataDocument | rootDocument (self) |
| int | rowCount (self, QModelIndex parent=QModelIndex()) |
| bool | setData (self, QModelIndex index, QVariant value, int role=Qt.EditRole) |
| | setRootDocument (self, Marble.GeoDataDocument document) |
| | update (self) |
| | updateFeature (self, Marble.GeoDataFeature feature) |
Signal Documentation
- Signal syntax:
QObject.connect(source, SIGNAL("added(Marble::GeoDataObject*)"), target_slot)
- Signal syntax:
QObject.connect(source, SIGNAL("removed(Marble::GeoDataObject*)"), target_slot)
Method Documentation
| __init__ |
( |
self, |
|
|
|
QObject |
parent=0 |
|
) |
|
|
|
Creates a new GeoDataTreeModel.
- Parameters:
-
| parent | The parent object.
|
| int columnCount |
( |
self, |
|
|
|
QModelIndex |
parent=QModelIndex() |
|
) |
|
|
|
| QVariant data |
( |
self, |
|
|
|
QModelIndex |
index, |
|
|
int |
role |
|
) |
|
|
|
| bool hasChildren |
( |
self, |
|
|
|
QModelIndex |
parent |
|
) |
|
|
|
| QVariant headerData |
( |
self, |
|
|
|
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role=Qt.DisplayRole |
|
) |
|
|
|
| QModelIndex index |
( |
self, |
|
|
|
int |
row, |
|
|
int |
column, |
|
|
QModelIndex |
parent=QModelIndex() |
|
) |
|
|
|
| QModelIndex parent |
( |
self, |
|
|
|
QModelIndex |
index |
|
) |
|
|
|
| removeDocument |
( |
self, |
|
|
|
int |
index |
|
) |
|
|
|
| int rowCount |
( |
self, |
|
|
|
QModelIndex |
parent=QModelIndex() |
|
) |
|
|
|
Return the number of Items in the Model.
| bool setData |
( |
self, |
|
|
|
QModelIndex |
index, |
|
|
QVariant |
value, |
|
|
int |
role=Qt.EditRole |
|
) |
|
|
|
Sets the root document to use. This replaces previously loaded data, if any.
- Parameters:
-
| document | The new root document. Ownership retains with the caller,
i.e. GeoDataTreeModel will not delete the passed document at its destruction.
|