Difference between revisions of "Marble/ModelView"

Jump to: navigation, search
m (Ochurlaud moved page Projects/Marble/ModelView to Marble/ModelView)
(Page moved to community wiki)
 
Line 1: Line 1:
= ModelView framework in Marble =
+
{{ Moved To Community }}
 
+
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.
+
 
+
The Model-View framework is designed to hide the details of the model content, and to present it in a standardised way to views. The advantage of this solution is that the View need not know much about the data it presents.
+
 
+
The multiple models and proxies in Marble each fit the purpose of feeding some GeoData classes to interested widgets. Those models are fed by the {{class|FileManager|kdeedu|4.x}}.
+
 
+
Here is the list of Model and Proxy classes, and a description of how they are used.
+
 
+
=== GeoDataTreeModel ===
+
The {{class|GeoDataTreeModel|kdeedu|4.x}} represents the list of all {{class|GeoDataDocument|kdeedu|4.x}} registered through the {{class|FileManager|kdeedu|4.x}}.
+
 
+
It has signals/slots to react to files being added or removed in the FileManager.
+
 
+
It is used as the base model for GeoDataDocuments.
+
 
+
The {{class|GeometryLayer|kdeedu|4.x}} renders all {{class|GeoDataGeometry|kdeedu|4.x}} related placemarks.
+
 
+
=== FileViewModel ===
+
The {{class|FileViewModel|kdeedu|4.x}} represents the list of opened files. The {{class|FileManager|kdeedu|4.x}} appends the documents it opens.
+
It is used by the {{class|FileViewFloatItem|kdeedu|4.x}}.
+
 
+
=== KDescendantsProxyModel ===
+
The {{class|KDescendantsProxyModel|kdeedu|4.x}} is used to flatten the tree of GeoData features. It represents the list of all Placemarks of all opened files.
+
 
+
The {{class|MarbleControlBox|kdeedu|4.X}} uses that proxy model to provide the list of placemarks to search for, and the {{class|PlacemarkLayout|kdeedu|4.x}} uses it also to determine layouting on the map.
+

Latest revision as of 04:46, 26 October 2016

This page is now on the community wiki.


This page was last modified on 26 October 2016, at 04:46. Content is available under Creative Commons License SA 4.0 unless otherwise noted.