QMapControl
0.9.7.4
|
#include <maplayer.h>
Public Types | |
enum | LayerType { MapLayer, GeometryLayer } |
sets the type of a layer, see Layer class doc for further information More... | |
Public Slots | |
void | setVisible (bool visible) |
if visible is true, the layer is made visible More... | |
Signals | |
void | geometryClicked (Geometry *geometry, QPoint point) |
This signal is emitted when a Geometry is clicked. More... | |
Public Member Functions | |
void | addGeometry (Geometry *geometry) |
adds a Geometry object to this Layer More... | |
void | clearGeometries (bool qDeleteObject=false) |
removes all Geometry objects from this Layer More... | |
bool | containsGeometry (Geometry *geometry) |
returns true if Layer contains geometry More... | |
QList< Geometry * > & | getGeometries () |
returns all Geometry objects from this Layer More... | |
bool | isVisible () const |
return true if the layer is visible More... | |
QString | layername () const |
returns the layer's name More... | |
Layer::LayerType | layertype () const |
returns the LayerType of the Layer More... | |
MapAdapter * | mapadapter () |
returns the layer´s MapAdapter More... | |
MapLayer (QString layername, MapAdapter *mapadapter, bool takeevents=true) | |
MapLayer constructor. More... | |
void | removeGeometry (Geometry *geometry, bool qDeleteObject=false) |
removes the Geometry object from this Layer More... | |
void | sendGeometryToBack (Geometry *geometry) |
allow moving a geometry to the top of the list (drawing last) More... | |
void | sendGeometryToFront (Geometry *geometry) |
allow moving a geometry to the top of the list (drawing last) More... | |
MapLayer class.
There are two different layer types:
MapLayers also can display Geometry objects. The difference to the GeometryLayer is the repainting. Objects that are added to a MapLayer are "baken" on the map. This means, when you change it´s position for example the changes are not visible until a new offscreen image has been drawn. If you have "static" Geometries which won´t change their position this is fine. But if you want to change the objects position or pen you should use a GeometryLayer. Those are repainted immediately on changes.
|
inherited |
sets the type of a layer, see Layer class doc for further information
Enumerator | |
---|---|
MapLayer |
uses the MapAdapter to display maps, only gets refreshed when a new offscreen image is needed |
GeometryLayer |
gets refreshed everytime when a geometry changes |
MapLayer | ( | QString | layername, |
MapAdapter * | mapadapter, | ||
bool | takeevents = true |
||
) |
MapLayer constructor.
This is used to construct a map layer.
layername | The name of the Layer |
mapadapter | The MapAdapter which does coordinate translation and Query-String-Forming |
takeevents | Should the Layer receive MouseEvents? This is set to true by default. Setting it to false could be something like a "speed up hint" |
|
inherited |
adds a Geometry object to this Layer
Please notice the different LayerTypes (MapLayer and GeometryLayer) and the differences
geometry | the new Geometry |
References Geometry::boundingBox(), and Layer::containsGeometry().
|
inherited |
|
inherited |
returns true if Layer contains geometry
This method returns if a Geometry objects is on this Layer.
Referenced by Layer::addGeometry().
|
signalinherited |
|
inherited |
|
inherited |
return true if the layer is visible
|
inherited |
returns the layer's name
|
inherited |
returns the LayerType of the Layer
There are two LayerTypes: MapLayer and GeometryLayer
|
inherited |
returns the layer´s MapAdapter
This method returns the MapAdapter of this Layer, which can be useful to do coordinate transformations.
|
inherited |
removes the Geometry object from this Layer
This method removes a Geometry object from this Layer. NOTE: this method does not delete the object unless qDeleteObject is set
qDeleteObject | cleans up memory of object after removal |
References Geometry::boundingBox().
|
inherited |
allow moving a geometry to the top of the list (drawing last)
This method re-order the Geometry objects so the desired geometry is drawn first and under all other geometries
|
inherited |
allow moving a geometry to the top of the list (drawing last)
This method re-order the Geometry objects so the desired geometry is drawn last and visible above all geometries
|
slotinherited |
if visible is true, the layer is made visible
visible | if the layer should be visible |