| 49 | namespace OpenOrienteering { |
| 50 | |
| 51 | DrawPointGPSTool::DrawPointGPSTool(GPSDisplay* gps_display, MapEditorController* editor, QAction* tool_action) |
| 52 | : MapEditorToolBase(QCursor(QPixmap(QString::fromLatin1(":/images/cursor-draw-point.png")), 11, 11), DrawPoint, editor, tool_action) |
| 53 | , renderables(new MapRenderables(map())) |
| 54 | { |
| 55 | useTouchCursor(false); |
| 56 | |
| 57 | preview_object = nullptr; |
| 58 | if (gps_display->hasValidPosition()) |
| 59 | newGPSPosition(gps_display->getLatestGPSCoord(), gps_display->getLatestGPSCoordAccuracy()); |
| 60 | |
| 61 | connect(gps_display, &GPSDisplay::mapPositionUpdated, this, &DrawPointGPSTool::newGPSPosition); |
| 62 | connect(editor, &MapEditorController::activeSymbolChanged, this, &DrawPointGPSTool::activeSymbolChanged); |
| 63 | connect(map(), &Map::symbolDeleted, this, &DrawPointGPSTool::symbolDeleted); |
| 64 | } |
| 65 | |
| 66 | DrawPointGPSTool::~DrawPointGPSTool() |
| 67 | { |
nothing calls this directly
no test coverage detected