Logo Search packages:      
Sourcecode: qmk-groundstation version File versions  Download package

qmapcontrol::LayerManager Class Reference

#include <layermanager.h>

List of all members.

Detailed Description

Handles Layers and viewport related settings.

This class handles internally all layers which were added to the MapControl. It also stores values for scrolling. It initiates the creation of a new offscreen image and on zooming the zoom images gets here created.

Kai Winter <kaiwinter@gmx.de>

Definition at line 51 of file layermanager.h.

Public Slots

void resize (QSize newSize)
void updateRequest ()
void updateRequest (QRectF rect)

Public Member Functions

void addLayer (Layer *layer)
 adds a layer
QPointF currentCoordinate () const
 returns the coordinate of the center of the map
int currentZoom () const
 returns the current zoom level
void drawGeoms (QPainter *painter)
void drawImage (QPainter *painter)
void forceRedraw ()
QPixmap getImage () const
 returns the current offscreen image
QPoint getMapmiddle_px () const
 returns the middle of the map in projection coordinates
QRectF getViewport () const
 The Viewport of the display.
Layerlayer () const
 returns the base layer
Layerlayer (const QString &) const
 returns the layer with the given name
 LayerManager (MapControl *, QSize)
QList< QString > layers () const
 returns the names of all layers
void mouseEvent (const QMouseEvent *evnt)
 forwards mouseevents to the layers
void removeZoomImage ()
void scrollView (const QPoint &offset)
 scrolls the view
void setView (const QList< QPointF > coordinates)
 sets the view, so all coordinates are visible
void setView (const QPointF &coordinate)
 sets the middle of the map to the given coordinate
void setViewAndZoomIn (const QList< QPointF > coordinates)
 sets the view and zooms in, so all coordinates are visible
void setZoom (int zoomlevel)
 sets the given zoomlevel
void zoomIn ()
 zooms in one step
void zoomOut ()
 zooms out one step

Private Member Functions

bool checkOffscreen () const
bool containsAll (QList< QPointF > coordinates) const
 LayerManager (const LayerManager &old)
void moveWidgets ()
void newOffscreenImage (bool clearImage=true, bool showZoomImage=true)
 This method have to be invoked to draw a new offscreen image.
LayerManageroperator= (const LayerManager &rhs)
void setMiddle (QList< QPointF > coordinates)

Private Attributes

QPixmap composedOffscreenImage
QPixmap composedOffscreenImage2
QPointF mapmiddle
QPoint mapmiddle_px
QList< Layer * > mylayers
QSize offSize
QMutex refreshMutex
QPoint screenmiddle
QPoint scroll
QMutex scrollMutex
QSize size
QPoint whilenewscroll
QPixmap zoomImage
QPoint zoomImageScroll

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

Generated by  Doxygen 1.6.0   Back to index