forked from zeroch/OpenStreetMap-Qt-Plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMapQuickItem.h
45 lines (38 loc) · 1001 Bytes
/
MapQuickItem.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// reference from MarbleQuickItem.
// #include "GeoDataPlacemark.h"
// #include "MarbleGlobal.h"
#ifndef MAPQUICKITEM_H
#define MAPQUICKITEM_H
namespace pasa
{
//TODO, MARBLE_EXPORT link
class MapQuickItem : public QQuickPaintedItem
{
Q_OBJECT
public:
MapQuickItem(QQuickItem *parent = 0);
~MapQuickItem();
public slots:
// void goHome();
// void setZoom();
// void centerOn(const GeoDataPlacemark& placemark, bool animated = false);
void zoomIn(FlyToMode mode = Automatic);
void zoomOut(FlyToMode mode = Automatic);
public:
void paint(QPainter *painter);
void classBegin();
void componentComplete();
protected:
MapModel* model();
const MapModel* model() const;
Map* map();
const Map* map() const;
QObject *getEventFilter() const;
void pinch(QPointF center, qreal scale, Qt::GestureState state);
private:
typedef QSharedPointer<MapQuickItemPrivate> MapQuickItemPrivatePtr;
MapQuickItemPrivatePtr p;
friend class MapQuickItemPrivate;
};
}
#endif