| 414 | } |
| 415 | |
| 416 | MapEditorTool* MapEditorController::getDefaultDrawToolForSymbol(const Symbol* symbol) |
| 417 | { |
| 418 | if (!symbol) |
| 419 | return new EditPointTool(this, edit_tool_act); |
| 420 | else if (symbol->getType() == Symbol::Point) |
| 421 | return new DrawPointTool(this, draw_point_act); |
| 422 | else if (symbol->getType() == Symbol::Line || symbol->getType() == Symbol::Area || symbol->getType() == Symbol::Combined) |
| 423 | return new DrawPathTool(this, draw_path_act, false, true); |
| 424 | else if (symbol->getType() == Symbol::Text) |
| 425 | return new DrawTextTool(this, draw_text_act); |
| 426 | else |
| 427 | Q_ASSERT(false); |
| 428 | return nullptr; |
| 429 | } |
| 430 | |
| 431 | |
| 432 | void MapEditorController::setEditingInProgress(bool value) |
no test coverage detected