Geometry Class Reference

Main class for objects that should be painted in maps. More...

#include <geometry.h>

Inheritance diagram for Geometry:

Curve Point LineString CirclePoint ImagePoint FixedImageOverlay

List of all members.

Public Slots

virtual void setVisible (bool visible)
 if visible is true, the layer is made visible

Signals

void geometryClicked (Geometry *geometry, QPoint point)
 This signal is emitted when a Geometry is clicked.
void positionChanged (Geometry *geom)
 A Geometry emits this signal, when its position gets changed.

Public Member Functions

virtual QRectF boundingBox ()=0
 returns the BoundingBox
bool Equals (Geometry *geom)
bool isVisible () const
 returns true if this Geometry is visible
QString name () const
 returns the name of this Geometry
GeometryparentGeometry () const
 returns the parent Geometry of this Geometry
QPen * pen () const
 returns the QPen which is used on drawing
void setName (QString name)
 sets the name of the geometry
QString toString ()
 returns a String representation of this Geometry


Detailed Description

Main class for objects that should be painted in maps.

Geometry is the root class of the hierarchy. Geometry is an abstract (non-instantiable) class.

This class and the derived classes Point, Curve and LineString are leant on the Simple Feature Specification of the Open Geospatial Consortium.

See also:
www.opengeospatial.com
Author:
Kai Winter <kaiwinter@gmx.de>

Member Function Documentation

virtual QRectF boundingBox (  )  [pure virtual]

returns the BoundingBox

The bounding box in world coordinates

Returns:
the BoundingBox

Implemented in LineString, and Point.

Referenced by Layer::addGeometry(), and Geometry::setVisible().

bool Equals ( Geometry geom  ) 

returns true if the given Geometry is equal to this Geometry not implemented yet!

Parameters:
geom The Geometry to be tested
Returns:
true if the given Geometry is equal to this

void geometryClicked ( Geometry geometry,
QPoint  point 
) [signal]

This signal is emitted when a Geometry is clicked.

A Geometry is clickable, if the containing layer is clickable. The objects emits a signal if it gets clicked

Parameters:
geometry The clicked Geometry
point -unused-

Referenced by Point::Touches().

bool isVisible (  )  const

returns true if this Geometry is visible

Returns:
true if this Geometry is visible

Referenced by Point::Touches().

QString name (  )  const

returns the name of this Geometry

Returns:
the name of this Geometry

Geometry * parentGeometry (  )  const

returns the parent Geometry of this Geometry

A LineString is a composition of many Points. This methods returns the parent (the LineString) of a Point

Returns:
the parent Geometry of this Geometry

QPen * pen (  )  const

returns the QPen which is used on drawing

The pen is set depending on the Geometry. A CirclePoint for example takes one with the constructor.

Returns:
the QPen which is used for drawing

void positionChanged ( Geometry geom  )  [signal]

A Geometry emits this signal, when its position gets changed.

Parameters:
geom the Geometry

void setName ( QString  name  ) 

sets the name of the geometry

Parameters:
name the new name of the geometry

void setVisible ( bool  visible  )  [virtual, slot]

if visible is true, the layer is made visible

Parameters:
visible if the layer should be visible

Reimplemented in Point.

References Geometry::boundingBox().

QString toString (  ) 

returns a String representation of this Geometry

not implemented yet!

Returns:
a String representation of this Geometry


The documentation for this class was generated from the following files:

Generated on Wed Jul 29 12:38:10 2009 for QMapControl by  doxygen 1.5.9