#include <circlepoint.h>

Public Types | |
| enum | Alignment { TopLeft, TopRight, BottomLeft, BottomRight, Middle } |
| sets where the point should be aligned More... | |
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 () |
| returns the bounding box of the point | |
| CirclePoint (qreal x, qreal y, int radius=10, QString name=QString(), Alignment alignment=Middle, QPen *pen=0) | |
| CirclePoint (qreal x, qreal y, QString name=QString(), Alignment alignment=Middle, QPen *pen=0) | |
| QPointF | coordinate () const |
| returns the coordinate of the point | |
| bool | Equals (Geometry *geom) |
| bool | isVisible () const |
| returns true if this Geometry is visible | |
| qreal | latitude () const |
| returns the latitude of the point | |
| qreal | longitude () const |
| returns the longitude of the point | |
| QString | name () const |
| returns the name of this Geometry | |
| Geometry * | parentGeometry () const |
| returns the parent Geometry of this Geometry | |
| QPen * | pen () const |
| returns the QPen which is used on drawing | |
| QPixmap * | pixmap () |
| returns the pixmap of the point | |
| void | setBaselevel (int zoomlevel) |
| Sets the zoom level on which the point�s pixmap gets displayed on full size. | |
| void | setMaxsize (QSize maxsize) |
| sets a maximal size for the pixmap | |
| void | setMinsize (QSize minsize) |
| sets a minimal size for the pixmap | |
| void | setName (QString name) |
| sets the name of the geometry | |
| virtual void | setPen (QPen *pen) |
| sets the QPen which is used for drawing the circle | |
| QString | toString () |
| returns a String representation of this Geometry | |
| QWidget * | widget () |
| returns the widget of the point | |
Protected Member Functions | |
| virtual bool | Touches (Point *geom, const MapAdapter *mapadapter) |
| returns true if the given Point touches this Point | |
This is a conveniece class for Point. It configures the pixmap of a Point to draw a circle. A QPen could be used to change the color or line-width of the circle
enum Alignment [inherited] |
| CirclePoint | ( | qreal | x, | |
| qreal | y, | |||
| QString | name = QString(), |
|||
| Alignment | alignment = Middle, |
|||
| QPen * | pen = 0 | |||
| ) |
| x | longitude | |
| y | latitude | |
| name | name of the circle point | |
| alignment | alignment (Middle or TopLeft) | |
| pen | QPen for drawing |
| CirclePoint | ( | qreal | x, | |
| qreal | y, | |||
| int | radius = 10, |
|||
| QString | name = QString(), |
|||
| Alignment | alignment = Middle, |
|||
| QPen * | pen = 0 | |||
| ) |
| x | longitude | |
| y | latitude | |
| radius | the radius of the circle | |
| name | name of the circle point | |
| alignment | alignment (Middle or TopLeft) | |
| pen | QPen for drawing |
| QRectF boundingBox | ( | ) | [virtual, inherited] |
returns the bounding box of the point
The Bounding contains the coordinate of the point and its size. The size is set, if the point contains a pixmap or a widget
Implements Geometry.
| QPointF coordinate | ( | ) | const [inherited] |
returns the coordinate of the point
The x component of the returned QPointF is the longitude value, the y component the latitude
Referenced by MapControl::setView(), and Point::Touches().
| bool Equals | ( | Geometry * | geom | ) | [inherited] |
| void geometryClicked | ( | Geometry * | geometry, | |
| QPoint | point | |||
| ) | [signal, inherited] |
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
| geometry | The clicked Geometry | |
| point | -unused- |
Referenced by Point::Touches().
| bool isVisible | ( | ) | const [inherited] |
returns true if this Geometry is visible
Referenced by Point::Touches().
| qreal latitude | ( | ) | const [inherited] |
returns the latitude of the point
Referenced by LineString::boundingBox(), and Point::Touches().
| qreal longitude | ( | ) | const [inherited] |
returns the longitude of the point
Referenced by LineString::boundingBox(), and Point::Touches().
| QString name | ( | ) | const [inherited] |
| Geometry * parentGeometry | ( | ) | const [inherited] |
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
| QPen * pen | ( | ) | const [inherited] |
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.
| QPixmap * pixmap | ( | ) | [inherited] |
returns the pixmap of the point
| void positionChanged | ( | Geometry * | geom | ) | [signal, inherited] |
| void setBaselevel | ( | int | zoomlevel | ) | [inherited] |
Sets the zoom level on which the point�s pixmap gets displayed on full size.
Use this method to set a zoom level on which the pixmap gets displayed with its real size. On zoomlevels below it will be displayed smaller, and on zoom levels thereover it will be displayed larger
| zoomlevel | the zoomlevel on which the point will be displayed on full size |
| void setMaxsize | ( | QSize | maxsize | ) | [inherited] |
sets a maximal size for the pixmap
When the point´s pixmap should change its size on zooming, this method sets the maximal size.
| maxsize | the maximal size which the pixmap should have |
| void setMinsize | ( | QSize | minsize | ) | [inherited] |
sets a minimal size for the pixmap
When the point's pixmap should change its size on zooming, this method sets the minimal size.
| minsize | the minimal size which the pixmap should have |
| void setName | ( | QString | name | ) | [inherited] |
sets the name of the geometry
| name | the new name of the geometry |
| void setPen | ( | QPen * | pen | ) | [virtual] |
sets the QPen which is used for drawing the circle
A QPen can be used to modify the look of the drawn circle
| pen | the QPen which should be used for drawing |
Reimplemented from Geometry.
| void setVisible | ( | bool | visible | ) | [virtual, slot, inherited] |
if visible is true, the layer is made visible
| visible | if the layer should be visible |
Reimplemented from Geometry.
| QString toString | ( | ) | [inherited] |
| bool Touches | ( | Point * | geom, | |
| const MapAdapter * | mapadapter | |||
| ) | [protected, virtual, inherited] |
returns true if the given Point touches this Point
The collision detection checks for the bounding rectangulars.
| geom | the other point which should be tested on collision | |
| mapadapter | the mapadapter which is used for calculations |
Implements Geometry.
References Point::BottomLeft, Point::BottomRight, Point::coordinate(), MapAdapter::coordinateToDisplay(), MapAdapter::displayToCoordinate(), Geometry::geometryClicked(), Geometry::isVisible(), Point::latitude(), Point::longitude(), Point::Middle, Point::TopLeft, and Point::TopRight.
| QWidget * widget | ( | ) | [inherited] |
returns the widget of the point
1.5.9