src/guiutilities.cpp

changeset 1406
37fffb682d2f
parent 1397
5d5c11af0268
child 1432
4cc687851fbb
equal deleted inserted replaced
1405:d2bf2e59a3ef 1406:37fffb682d2f
25 #include "lddocument.h" 25 #include "lddocument.h"
26 #include "dialogs/colorselector.h" 26 #include "dialogs/colorselector.h"
27 #include "mainwindow.h" 27 #include "mainwindow.h"
28 #include "linetypes/modelobject.h" 28 #include "linetypes/modelobject.h"
29 #include "linetypes/comment.h" 29 #include "linetypes/comment.h"
30 #include "linetypes/circularprimitive.h"
30 #include "dialogs/subfilereferenceeditor.h" 31 #include "dialogs/subfilereferenceeditor.h"
32 #include "dialogs/circularprimitiveeditor.h"
31 #include "widgets/vertexobjecteditor.h" 33 #include "widgets/vertexobjecteditor.h"
32 34
33 GuiUtilities::GuiUtilities (QObject* parent) : 35 GuiUtilities::GuiUtilities (QObject* parent) :
34 QObject (parent), 36 QObject (parent),
35 HierarchyElement (parent) {} 37 HierarchyElement (parent) {}
177 if (object->type() == LDObjectType::SubfileReference) 179 if (object->type() == LDObjectType::SubfileReference)
178 { 180 {
179 LDSubfileReference* reference = static_cast<LDSubfileReference*>(object); 181 LDSubfileReference* reference = static_cast<LDSubfileReference*>(object);
180 SubfileReferenceEditor editor {reference, parent}; 182 SubfileReferenceEditor editor {reference, parent};
181 editor.setPrimitivesTree(parent->primitives()); 183 editor.setPrimitivesTree(parent->primitives());
184 editor.exec();
185 }
186 else if (object->type() == LDObjectType::CircularPrimitive)
187 {
188 LDCircularPrimitive* primitive = static_cast<LDCircularPrimitive*>(object);
189 CircularPrimitiveEditor editor {primitive, parent};
182 editor.exec(); 190 editor.exec();
183 } 191 }
184 else if (object->type() == LDObjectType::Comment) 192 else if (object->type() == LDObjectType::Comment)
185 { 193 {
186 LDComment* comment = static_cast<LDComment*>(object); 194 LDComment* comment = static_cast<LDComment*>(object);

mercurial