29 #include "qmapcontrol_global.h"
30 #include "layermanager.h"
32 #include "mapadapter.h"
34 #include "imagemanager.h"
89 MapControl ( QSize size, MouseMode mousemode = Panning,
bool showScale =
false,
bool showCrosshairs =
true,
QWidget * parent = 0, Qt::WindowFlags windowFlags = 0);
98 void addLayer (
Layer* layer );
105 void removeLayer (
Layer* layer );
112 Layer* layer (
const QString& layername )
const;
118 QList<QString> layers()
const;
124 int numberOfLayers()
const;
130 QPointF currentCoordinate()
const;
136 int currentZoom()
const;
139 void updateView()
const;
145 void enableMouseWheelEvents(
bool enabled =
true );
151 bool mouseWheelEventsEnabled();
157 void setView (
const QPointF& coordinate )
const;
163 void setView (
const QList<QPointF> coordinates )
const;
171 void setViewAndZoomIn (
const QList<QPointF> coordinates )
const;
178 void setView (
const Point* point )
const;
185 void followGeometry (
const Geometry* geometry )
const;
196 void stopFollowing (
const Geometry* geometry )
const;
202 void moveTo ( QPointF coordinate );
213 void setMouseMode ( MouseMode mousemode );
233 void enablePersistentCache (
int tileExpiry = -1,
const QDir& path= QDir::homePath() +
"/QMapControl.cache" );
244 void setProxy(QString host,
int port,
const QString username = QString(),
const QString password = QString());
251 void showScale (
bool visible );
253 void showCrosshairs (
bool visible );
260 void setUseBoundingBox(
bool usebounds );
267 bool isBoundingBoxEnabled();
274 void setBoundingBox( QRectF &rect );
281 QRectF getBoundingBox();
288 QRectF getViewport();
296 bool isGeometryVisible(
Geometry * geometry);
303 int loadingQueueSize();
306 LayerManager* layermanager;
307 QPoint screen_middle;
310 QPoint current_mouse_pos;
314 bool mouse_wheel_events;
316 MouseMode mymousemode;
318 bool crosshairsVisible;
326 QPointF clickToWorldCoordinate ( QPoint click );
331 void paintEvent ( QPaintEvent* evnt );
332 void mousePressEvent ( QMouseEvent* evnt );
333 void mouseReleaseEvent ( QMouseEvent* evnt );
334 void mouseMoveEvent ( QMouseEvent* evnt );
335 void wheelEvent( QWheelEvent* evnt );
348 void mouseEventCoordinate ( const QMouseEvent* evnt, const QPointF coordinate );
356 void boxDragged ( const QRectF );
363 void geometryClicked (
Geometry* geometry, QPoint coord_px );
370 void viewChanged ( const QPointF &coordinate,
int zoom ) const;
383 void setZoom (
int zoomlevel );
386 void scrollLeft (
int pixel=10 );
389 void scrollRight (
int pixel=10 );
392 void scrollUp (
int pixel=10 );
395 void scrollDown (
int pixel=10 );
398 void scroll ( const QPoint scroll );
404 void updateRequest ( QRect rect );
410 void updateRequestNew();
416 void resize(const QSize newSize);
420 void loadingFinished();
421 void positionChanged (
Geometry* geom );
Main class for objects that should be painted in maps.
Definition: geometry.h:48
MouseMode
Declares what actions mouse movements have on the map.
Definition: mapcontrol.h:60
Definition: mapcontrol.h:63
The control element of the widget and also the widget itself.
Definition: mapcontrol.h:54
A geometric point to draw objects into maps.
Definition: point.h:66
Layer class.
Definition: layer.h:60
Definition: mapcontrol.h:62
QMapControl namespace.
Definition: arrowpoint.cpp:28