Changeset 15 in flair-src for trunk/tools/FlairGCS/src/mapwidget.h
- Timestamp:
- Apr 8, 2016, 3:40:57 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/FlairGCS/src/mapwidget.h
r10 r15 57 57 using namespace QtMobility; 58 58 59 class MapWidget : public QGraphicsView 60 { 61 Q_OBJECT 59 class MapWidget : public QGraphicsView { 60 Q_OBJECT 62 61 63 64 MapWidget(Map* map,QWidget *parent = 0);65 66 67 68 69 70 QList<Landmark*>*Landmarks(void);71 72 73 74 75 62 public: 63 MapWidget(Map *map, QWidget *parent = 0); 64 void setMap(QtMobility::QGraphicsGeoMap *geoMap); 65 QGraphicsScene *scene() const; 66 bool IsUptodate(void); 67 void SetUptodate(void); 68 void Reset(void); 69 QList<Landmark *> *Landmarks(void); 70 bool LandmarkToSend(int index); 71 void AddLandmark(const QGeoCoordinate &coordinate); 72 void RemoveLandmarks(void); 73 void AddLandmarks(QGraphicsGeoMap *geoMap); 74 void AddPoint(QString name); 76 75 77 78 76 signals: 77 void positionChanged(const QGeoCoordinate &coordinate); 79 78 80 81 82 83 84 85 86 79 protected: 80 void mousePressEvent(QMouseEvent *event); 81 void mouseMoveEvent(QMouseEvent *event); 82 void mouseReleaseEvent(QMouseEvent *event); 83 void resizeEvent(QResizeEvent *event); 84 void wheelEvent(QWheelEvent *event); 85 void mouseDoubleClickEvent(QMouseEvent *event); 87 86 88 89 87 private slots: 88 void initDrag(); 90 89 91 92 93 94 95 96 90 private: 91 QGraphicsGeoMap *geoMap; 92 bool dragging; 93 QPoint dragStartPosition; 94 bool pressed; 95 bool is_uptodate; 97 96 98 99 QList<Landmark*> *landmarks;100 QList<Landmark*> *landmarks_old;101 102 103 Map*map;97 QGraphicsScene *m_scene; 98 QList<Landmark *> *landmarks; 99 QList<Landmark *> *landmarks_old; 100 QList<QString> points; 101 Landmark *landmark_match; 102 Map *map; 104 103 }; 105 104
Note:
See TracChangeset
for help on using the changeset viewer.