Commit 14db071c authored by lm's avatar lm

Added menu for multiple map sources

parent e0085289
This diff is collapsed.
...@@ -38,6 +38,8 @@ This file is part of the QGROUNDCONTROL project ...@@ -38,6 +38,8 @@ This file is part of the QGROUNDCONTROL project
#include "qmapcontrol.h" #include "qmapcontrol.h"
#include "UASInterface.h" #include "UASInterface.h"
class QMenu;
namespace Ui { namespace Ui {
class MapWidget; class MapWidget;
} }
...@@ -61,20 +63,29 @@ protected: ...@@ -61,20 +63,29 @@ protected:
void keyPressEvent(QKeyEvent *event); void keyPressEvent(QKeyEvent *event);
void resizeEvent(QResizeEvent* event); void resizeEvent(QResizeEvent* event);
QAction* osmAction;
QAction* yahooActionMap;
QAction* yahooActionSatellite;
QAction* yahooActionOverlay;
QAction* googleActionMap;
QAction* googleSatAction;
QPushButton* followgps; QPushButton* followgps;
QPushButton* createPath; QPushButton* createPath;
QLabel* gpsposition; QLabel* gpsposition;
QMenu* mapMenu;
MapControl* mc; QPushButton* mapButton;
MapControl* mc; ///< QMapControl widget
MapAdapter* mapadapter; ///< Adapter to load the map data
qmapcontrol::Layer* l; ///< Current map layer (background)
qmapcontrol::Layer* overlay; ///< Street overlay (foreground)
qmapcontrol::GeometryLayer* geomLayer; ///< Layer for waypoints
int zoomLevel; int zoomLevel;
int detailZoom; ///< Steps zoomed in further than qMapControl allows int detailZoom; ///< Steps zoomed in further than qMapControl allows
static const int scrollStep = 40; ///< Scroll n pixels per keypress static const int scrollStep = 40; ///< Scroll n pixels per keypress
static const int maxZoom = 50; static const int maxZoom = 50; ///< Maximum zoom level
TileMapAdapter* osmAdapter;
GoogleSatMapAdapter* gSatAdapter;
Layer* osmLayer;
Layer* geomLayer;
//Layer* gSatLayer; //Layer* gSatLayer;
...@@ -87,6 +98,7 @@ protected: ...@@ -87,6 +98,7 @@ protected:
void captureMapClick (const QMouseEvent* event, const QPointF coordinate); void captureMapClick (const QMouseEvent* event, const QPointF coordinate);
void createPathButtonClicked(); void createPathButtonClicked();
void captureGeometryClick(Geometry*, QPoint); void captureGeometryClick(Geometry*, QPoint);
void mapproviderSelected(QAction* action);
private: private:
Ui::MapWidget *m_ui; Ui::MapWidget *m_ui;
QList<Point*> wps; QList<Point*> wps;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment