30 #include "debugheader.h"
34 #include "../core/size.h"
35 #include "../core/point.h"
37 #include "../core/maptype.h"
39 #include "QThreadPool"
50 #include "../core/geodecoderstatus.h"
51 #include "../core/tlmaps.h"
52 #include "../core/diagnostics.h"
59 #include "../core/corecommon.h"
69 class TLMAPWIDGET_EXPORT
Core:
public QObject,
public QRunnable
73 friend class mapcontrol::TLMapControl;
145 void SetZoom(
int const& value);
152 void SetMapType(MapType::Types
const& value);
154 void SetUserImageHorizontalScale(
double hScale);
155 void SetUserImageVerticalScale(
double vScale);
156 void SetUserImageLocation(QString mapLocation);
160 void UpdateCenterTileXYLocation();
162 void OnMapSizeChanged(
int const& width,
int const& height);
166 GeoCoderStatusCode::Types SetCurrentPositionByKeywords(QString
const& keys);
170 PointLatLng FromLocalToLatLng(qint64
const&
x, qint64
const&
y);
172 Point FromLatLngToLocal(
PointLatLng const& latlng);
174 int GetMaxZoomToFitRect(
RectLatLng const& rect);
182 void GoToCurrentPosition();
188 void CancelAsyncTasks();
192 void UpdateGroundResolution();
202 double GetElevationFromCoordinates(
PointLatLng coord, GeoCoderStatusCode::Types &status);
205 void OnTileLoadComplete();
206 void OnTilesStillToLoad(
int number);
207 void OnTileLoadStart();
209 void OnMapZoomChanged();
210 void OnMapTypeChanged(MapType::Types type);
212 void OnNeedInvalidation();
216 bool MouseWheelZooming;
231 MouseWheelZoomType::Types mousewheelzoomtype;
233 QString userImageLocation;
234 float userImageHorizontalScale;
235 float userImageVerticalScale;
245 QQueue<LoadTask> tileLoadQueue;
253 QMutex MtileLoadQueue;
257 QMutex MtileDrawingList;
260 static qlonglong debugcounter;
262 Size TooltipTextPadding;
264 MapType::Types mapType;
266 QSemaphore loaderLimit;
268 QThreadPool ProcessLoadTaskCallback;
273 QMutex MrunningThreads;
287 void GoToCurrentPositionOnZoom();
The main graphicsItem used on the widget, contains the map and map logic.