24 #include "ui/objecteditor.h" |
24 #include "ui/objecteditor.h" |
25 |
25 |
26 EditorTabWidget::EditorTabWidget( |
26 EditorTabWidget::EditorTabWidget( |
27 Model* model, |
27 Model* model, |
28 DocumentManager* documents, |
28 DocumentManager* documents, |
29 const ldraw::ColorTable& colorTable, |
29 const ColorTable& colorTable, |
30 QWidget* parent) : |
30 QWidget* parent) : |
31 QWidget{parent}, |
31 QWidget{parent}, |
32 colorTable{colorTable}, |
32 colorTable{colorTable}, |
33 canvas{new Canvas{model, this, documents, colorTable, this}}, |
33 canvas{new Canvas{model, this, documents, colorTable, this}}, |
34 model{model}, |
34 model{model}, |
198 Triangle{ |
198 Triangle{ |
199 .p1 = this->drawState.polygon[0], |
199 .p1 = this->drawState.polygon[0], |
200 .p2 = this->drawState.polygon[1], |
200 .p2 = this->drawState.polygon[1], |
201 .p3 = this->drawState.polygon[2], |
201 .p3 = this->drawState.polygon[2], |
202 }, |
202 }, |
203 ldraw::MAIN_COLOR, |
203 MAIN_COLOR, |
204 } |
204 } |
205 }); |
205 }); |
206 break; |
206 break; |
207 case 4: |
207 case 4: |
208 Q_EMIT this->modelAction(AppendToModel{ |
208 Q_EMIT this->modelAction(AppendToModel{ |
211 .p1 = this->drawState.polygon[0], |
211 .p1 = this->drawState.polygon[0], |
212 .p2 = this->drawState.polygon[1], |
212 .p2 = this->drawState.polygon[1], |
213 .p3 = this->drawState.polygon[2], |
213 .p3 = this->drawState.polygon[2], |
214 .p4 = this->drawState.polygon[3], |
214 .p4 = this->drawState.polygon[3], |
215 }, |
215 }, |
216 ldraw::MAIN_COLOR, |
216 MAIN_COLOR, |
217 } |
217 } |
218 }); |
218 }); |
219 break; |
219 break; |
220 } |
220 } |
221 } |
221 } |