3 #include "document.h" |
3 #include "document.h" |
4 #include "canvas.h" |
4 #include "canvas.h" |
5 |
5 |
6 Canvas::Canvas( |
6 Canvas::Canvas( |
7 Model* model, |
7 Model* model, |
8 EditorTabWidget *document, |
8 EditTools *document, |
9 DocumentManager* documents, |
9 DocumentManager* documents, |
10 const ColorTable& colorTable, |
10 const ColorTable& colorTable, |
11 QWidget* parent) : |
11 QWidget* parent) : |
12 PartRenderer{model, documents, colorTable, parent}, |
12 PartRenderer{model, documents, colorTable, parent}, |
13 document{document} |
13 document{document} |
31 |
31 |
32 /** |
32 /** |
33 * @brief Updates vertex rendering |
33 * @brief Updates vertex rendering |
34 * @param document Document to get vertices from |
34 * @param document Document to get vertices from |
35 */ |
35 */ |
36 void Canvas::rebuildVertices(EditorTabWidget* document) |
36 void Canvas::rebuildVertices(VertexMap* vertexMap) |
37 { |
37 { |
38 if (this->vertexProgram.has_value()) |
38 if (this->vertexProgram.has_value()) |
39 { |
39 { |
40 this->vertexProgram->build(document); |
40 this->vertexProgram->build(vertexMap); |
41 this->update(); |
41 this->update(); |
42 } |
42 } |
43 } |
43 } |
44 |
44 |
45 void Canvas::mouseMoveEvent(QMouseEvent* event) |
45 void Canvas::mouseMoveEvent(QMouseEvent* event) |