Marble/ModelView: Difference between revisions

From KDE TechBase
(Filling in the status on the GpxFileModel)
No edit summary
Line 6: Line 6:


=== QAbstractItemModel ===
=== QAbstractItemModel ===
* {{class|GeoDataDebugModel|kdeedu}}
* {{class|GeoDataDebugModel|kdeedu|4.x}}
It represents a data file, parsed into a {{class|GeoDataDocument|kdeedu}} tree structure.
It represents a data file, parsed into a {{class|GeoDataDocument|kdeedu|4.x}} tree structure.


It is used by the {{class|DataViewPlugin|kdeedu}} debug plugin (and is broken atm)
It is used by the {{class|DataViewPlugin|kdeedu|4.x}} debug plugin (and is broken atm)


* {{class|GpxFileModel|kdeedu|4.x}}
* {{class|GpxFileModel|kdeedu|4.x}}
Line 17: Line 17:
The model that is in the GpsLayer is currently only being used as a collection class and is deprecated. This, along with the whole current GPX implementation, needs to be removed and updated to the current concepts in Marble. See [[Projects/Marble/GPXStatus|Gpx Status]]
The model that is in the GpsLayer is currently only being used as a collection class and is deprecated. This, along with the whole current GPX implementation, needs to be removed and updated to the current concepts in Marble. See [[Projects/Marble/GPXStatus|Gpx Status]]


* {{class|MarbleGeometryModel|kdeedu}}
* {{class|MarbleGeometryModel|kdeedu|4.x}}
It represents the {{class|GeoDataGeometry|kdeedu}} and the {{class|GeoDataFeature|kdeedu}} items of the {{class|GeoDataDocument|kdeedu}} which contains all Placemarks.
It represents the {{class|GeoDataGeometry|kdeedu}} and the {{class|GeoDataFeature|kdeedu|4.x}} items of the {{class|GeoDataDocument|kdeedu|4.x}} which contains all Placemarks.


It is used by the {{class|GeoRenderPlugin|kdeedu}} to access the list of placemarks.
It is used by the {{class|GeoRenderPlugin|kdeedu|4.x}} to access the list of placemarks.


=== QAbstractListModel ===
=== QAbstractListModel ===
* {{class|FileViewModel|kdeedu}}
* {{class|FileViewModel|kdeedu|4.x}}
It represents the list of files opened. The {{class|PlacemarkManager|kdeedu}} appends the documents it opens, and the {{class|MarbleWidget|kdeedu}} appends the gpx files it opens.
It represents the list of files opened. The {{class|PlacemarkManager|kdeedu|4.x}} appends the documents it opens, and the {{class|MarbleWidget|kdeedu}} appends the gpx files it opens.


It is used by the {{class|FileViewFloatItem|kdeedu}} and manipulated by the {{class|PlaceMarkManager|kdeedu}} and the {{class|MarbleModel|kdeedu}}.
It is used by the {{class|FileViewFloatItem|kdeedu|4.x}} and manipulated by the {{class|PlaceMarkManager|kdeedu|4.x}} and the {{class|MarbleModel|kdeedu|4.x}}.


* {{class|MarbleGeoDataModel|kdeedu}}
* {{class|MarbleGeoDataModel|kdeedu|4.x}}
It represents a list of {{class|GeoDataDocuments|kdeedu}}. Only the {{class|PlacemarksPlugin|kdeedu}} uses it
It represents a list of {{class|GeoDataDocuments|kdeedu|4.x}}. Only the {{class|PlacemarksPlugin|kdeedu|4.x}} uses it


It is used by no other code.
It is used by no other code.


* {{class|MarblePlacemarkModel|kdeedu}}
* {{class|MarblePlacemarkModel|kdeedu|4.x}}
It represents
It represents


It is used by
It is used by

Revision as of 20:48, 28 July 2009

ModelView framework in Marble

Marble uses Qt's Model/View framework as a way to signal updates to a model to interested parts. In that respect, a Model class can wrap any possible data.

Here is the list of Model class, and a description of how they are used.

QAbstractItemModel

  • Expression error: Unrecognized word "x".

It represents a data file, parsed into a Expression error: Unrecognized word "x". tree structure.

It is used by the Expression error: Unrecognized word "x". debug plugin (and is broken atm)

  • Expression error: Unrecognized word "x".

It represents a list of gpx data file represented as Expression error: Unrecognized word "x".

This was originally intended to but used as the model for the File List View ( which is accessible by running marble with --enableFileView ) but has since been replaced by another, more centralised, File Model. This new File Model is located in Expression error: Unrecognized word "x".. The model that is in the GpsLayer is currently only being used as a collection class and is deprecated. This, along with the whole current GPX implementation, needs to be removed and updated to the current concepts in Marble. See Gpx Status

  • Expression error: Unrecognized word "x".

It represents the GeoDataGeometry and the Expression error: Unrecognized word "x". items of the Expression error: Unrecognized word "x". which contains all Placemarks.

It is used by the Expression error: Unrecognized word "x". to access the list of placemarks.

QAbstractListModel

  • Expression error: Unrecognized word "x".

It represents the list of files opened. The Expression error: Unrecognized word "x". appends the documents it opens, and the MarbleWidget appends the gpx files it opens.

It is used by the Expression error: Unrecognized word "x". and manipulated by the Expression error: Unrecognized word "x". and the Expression error: Unrecognized word "x"..

  • Expression error: Unrecognized word "x".

It represents a list of Expression error: Unrecognized word "x".. Only the Expression error: Unrecognized word "x". uses it

It is used by no other code.

  • Expression error: Unrecognized word "x".

It represents

It is used by