diff --git a/src/ui/MapWidget.cc b/src/ui/MapWidget.cc index a060baf0b36db2244f43341ffc6406ca0109f3d3..37d1b8e6020381cd419c65cf07ce140216bdbc90 100644 --- a/src/ui/MapWidget.cc +++ b/src/ui/MapWidget.cc @@ -198,6 +198,7 @@ MapWidget::MapWidget(QWidget *parent) : connect(createPath, SIGNAL(clicked(bool)), this, SLOT(createPathButtonClicked(bool))); + connect(geomLayer, SIGNAL(geometryClicked(Geometry*,QPoint)), this, SLOT(captureGeometryClick(Geometry*, QPoint))); @@ -372,7 +373,7 @@ void MapWidget::captureMapClick(const QMouseEvent* event, const QPointF coordina } } -void MapWidget::captureGeometryClick(qmapcontrol::Geometry* geom, QPoint point){ +void MapWidget::captureGeometryClick(Geometry* geom, QPoint point){ Q_UNUSED(geom); Q_UNUSED(point); @@ -381,7 +382,7 @@ void MapWidget::captureGeometryClick(qmapcontrol::Geometry* geom, QPoint point){ } -void MapWidget::captureGeometryDrag(qmapcontrol::Geometry* geom, QPointF coordinate){ +void MapWidget::captureGeometryDrag(Geometry* geom, QPointF coordinate){ Q_UNUSED(coordinate); // Refresh the screen @@ -409,7 +410,7 @@ void MapWidget::captureGeometryDrag(qmapcontrol::Geometry* geom, QPointF coordin } -void MapWidget::captureGeometryEndDrag(qmapcontrol::Geometry* geom, QPointF coordinate) +void MapWidget::captureGeometryEndDrag(Geometry* geom, QPointF coordinate) { mc->setMouseMode(qmapcontrol::MapControl::Panning); diff --git a/src/ui/MapWidget.h b/src/ui/MapWidget.h index c9748efafbd3c1b64a52f46718efcd78e4691bf8..35afb70dea023429e67ebf0993c048029f878695 100644 --- a/src/ui/MapWidget.h +++ b/src/ui/MapWidget.h @@ -44,6 +44,8 @@ namespace Ui { class MapWidget; } + using namespace qmapcontrol; + /** * @brief 2D Moving map * @@ -105,10 +107,10 @@ protected: protected slots: void captureMapClick (const QMouseEvent* event, const QPointF coordinate); void createPathButtonClicked(bool checked); - void captureGeometryClick(qmapcontrol::Geometry*, QPoint); + void captureGeometryClick(Geometry*, QPoint); void mapproviderSelected(QAction* action); - void captureGeometryDrag(qmapcontrol::Geometry* geom, QPointF coordinate); - void captureGeometryEndDrag(qmapcontrol::Geometry* geom, QPointF coordinate); + void captureGeometryDrag(Geometry* geom, QPointF coordinate); + void captureGeometryEndDrag(Geometry* geom, QPointF coordinate); diff --git a/src/ui/map3D/Q3DWidget.h b/src/ui/map3D/Q3DWidget.h index 756cdcb60eb08a0dbf49c2f0ba86f709b848f42c..01193d4c464075d5dad4f4b6aef7d8f0196afb6c 100644 --- a/src/ui/map3D/Q3DWidget.h +++ b/src/ui/map3D/Q3DWidget.h @@ -165,7 +165,7 @@ protected: float r2d(float angle); float d2r(float angle); - void Q3DWidget::wireSphere(double radius, int slices, int stacks); + void wireSphere(double radius, int slices, int stacks); void solidSphere(double radius, int slices, int stacks); void wireCone(double base, double height, int slices, int stacks); void solidCone(double base, double height, int slices, int stacks); diff --git a/src/ui/map3D/QMap3DWidget.cc b/src/ui/map3D/QMap3DWidget.cc index eeb0b91344108cbdcb20f8a1b74196cd1572e786..119835821310d464e479c4c3302f572f584a4df2 100644 --- a/src/ui/map3D/QMap3DWidget.cc +++ b/src/ui/map3D/QMap3DWidget.cc @@ -54,9 +54,6 @@ QMap3DWidget::QMap3DWidget(QWidget* parent) initialize(10, 10, 1000, 900, 15.0f); setCameraParams(0.05f, 0.5f, 0.01f, 0.5f, 30.0f, 0.01f, 400.0f); - int32_t argc = 0; - //glutInit(&argc, NULL); - setDisplayFunc(display, this); setMouseFunc(mouse, this); addTimerFunc(100, timer, this);