71 }; |
71 }; |
72 this->renderer->handleSelectionChange(resolve(selected), resolve(deselected)); |
72 this->renderer->handleSelectionChange(resolve(selected), resolve(deselected)); |
73 this->selectionChanged(resolve(this->ui.listView->selectionModel()->selection())); |
73 this->selectionChanged(resolve(this->ui.listView->selectionModel()->selection())); |
74 }); |
74 }); |
75 connect(this->model, &Model::dataChanged, this->renderer, qOverload<>(&Canvas::update)); |
75 connect(this->model, &Model::dataChanged, this->renderer, qOverload<>(&Canvas::update)); |
76 connect(this->renderer, &Canvas::mouseClick, this, [this](Canvas* canvas) |
76 connect(this->renderer, &Canvas::mouseClick, this, [this](Canvas* canvas, QMouseEvent* event) |
77 { |
77 { |
78 Q_EMIT this->mouseClick(this, canvas); |
78 Q_EMIT this->mouseClick(this, canvas, event); |
79 }); |
79 }); |
80 connect(this->renderer, &Canvas::mouseMove, this, [this](Canvas* canvas) |
80 connect(this->renderer, &Canvas::mouseMove, this, [this](Canvas* canvas, QMouseEvent* event) |
81 { |
81 { |
82 Q_EMIT this->mouseMove(this, canvas); |
82 Q_EMIT this->mouseMove(this, canvas, event); |
83 }); |
83 }); |
84 connect(&this->vertexMap, &VertexMap::verticesChanged, [&]() |
84 connect(&this->vertexMap, &VertexMap::verticesChanged, [&]() |
85 { |
85 { |
86 this->renderer->rebuildVertices(this); |
86 this->renderer->rebuildVertices(this); |
87 }); |
87 }); |