FixedImageOverlay Class Reference

Draws a fixed image into the map. More...

#include <fixedimageoverlay.h>

Inheritance diagram for FixedImageOverlay:

ImagePoint Point Geometry

List of all members.

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
QPointF coordinate () const
 returns the coordinate of the point
bool Equals (Geometry *geom)
 FixedImageOverlay (qreal x_upperleft, qreal y_upperleft, qreal x_lowerright, qreal y_lowerright, QPixmap *pixmap, QString name=QString())
 Creates an image overlay which displays the given image.
 FixedImageOverlay (qreal x_upperleft, qreal y_upperleft, qreal x_lowerright, qreal y_lowerright, QString filename, QString name=QString())
 Creates an image overlay which loads and displays the given image file.
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
GeometryparentGeometry () 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
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


Detailed Description

Draws a fixed image into the map.

This class draws a image overlay onto a map, whose upper left and lower right corners lay always on the given coordinates. The methods setBaselevel, setMaxsize and setMinsize have no effect for this class.

Author:
Kai Winter <kaiwinter@gmx.de>

Member Enumeration Documentation

enum Alignment [inherited]

sets where the point should be aligned

Enumerator:
TopLeft  Align on TopLeft
TopRight  Align on TopRight
BottomLeft  Align on BottomLeft
BottomRight  Align on BottomRight
Middle  Align on Middle


Constructor & Destructor Documentation

FixedImageOverlay ( qreal  x_upperleft,
qreal  y_upperleft,
qreal  x_lowerright,
qreal  y_lowerright,
QString  filename,
QString  name = QString() 
)

Creates an image overlay which loads and displays the given image file.

Use this contructor to load the given image file and let the point display it. When you want multiple points to display the same image, use the other contructor and pass a pointer to that image.

Parameters:
x_upperleft the coordinate of the upper left corner where the image should be aligned
y_upperleft the coordinate of the upper left corner where the image should be aligned
x_lowerright the coordinate of the lower right corner where the image should be aligned
y_lowerright the coordinate of the lower right corner where the image should be aligned
filename the file which should be loaded and displayed
name the name of the image point

FixedImageOverlay ( qreal  x_upperleft,
qreal  y_upperleft,
qreal  x_lowerright,
qreal  y_lowerright,
QPixmap *  pixmap,
QString  name = QString() 
)

Creates an image overlay which displays the given image.

Use this contructor to display the given image.

Parameters:
x_upperleft the coordinate of the upper left corner where the image should be aligned
y_upperleft the coordinate of the upper left corner where the image should be aligned
x_lowerright the coordinate of the lower right corner where the image should be aligned
y_lowerright the coordinate of the lower right corner where the image should be aligned
pixmap pointer to the image pixmap
name the name of the image point


Member Function Documentation

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

Returns:
the bounding box of the point

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

Returns:
the coordinate of a point

Referenced by MapControl::setView(), and Point::Touches().

bool Equals ( Geometry geom  )  [inherited]

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, 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

Parameters:
geometry The clicked Geometry
point -unused-

Referenced by Point::Touches().

bool isVisible (  )  const [inherited]

returns true if this Geometry is visible

Returns:
true if this Geometry is visible

Referenced by Point::Touches().

qreal latitude (  )  const [inherited]

returns the latitude of the point

Returns:
the latitude of the point

Referenced by LineString::boundingBox(), and Point::Touches().

qreal longitude (  )  const [inherited]

returns the longitude of the point

Returns:
the longitude of the point

Referenced by LineString::boundingBox(), and Point::Touches().

QString name (  )  const [inherited]

returns the name of this Geometry

Returns:
the name of this Geometry

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

Returns:
the parent Geometry of this Geometry

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.

Returns:
the QPen which is used for drawing

QPixmap * pixmap (  )  [inherited]

returns the pixmap of the point

Returns:
the pixmap of the point

void positionChanged ( Geometry geom  )  [signal, inherited]

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

Parameters:
geom the Geometry

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

See also:
setMinsize, setMaxsize
Parameters:
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.

See also:
setBaselevel
Parameters:
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.

See also:
setBaselevel
Parameters:
minsize the minimal size which the pixmap should have

void setName ( QString  name  )  [inherited]

sets the name of the geometry

Parameters:
name the new name of the geometry

void setVisible ( bool  visible  )  [virtual, slot, inherited]

if visible is true, the layer is made visible

Parameters:
visible if the layer should be visible

Reimplemented from Geometry.

QString toString (  )  [inherited]

returns a String representation of this Geometry

not implemented yet!

Returns:
a String representation of this Geometry

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.

Parameters:
geom the other point which should be tested on collision
mapadapter the mapadapter which is used for calculations
Returns:

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

Returns:
the widget of the point


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