diff -r 47e7773c7841 -r 01bdac75994a src/addObjectDialog.cc --- a/src/addObjectDialog.cc Tue Jan 07 08:53:27 2014 +0200 +++ b/src/addObjectDialog.cc Tue Jan 07 11:56:26 2014 +0200 @@ -64,7 +64,7 @@ switch (type) { - case LDObject::Comment: + case LDObject::EComment: { le_comment = new QLineEdit; @@ -74,28 +74,28 @@ le_comment->setMinimumWidth (384); } break; - case LDObject::Line: + case LDObject::ELine: { coordCount = 6; } break; - case LDObject::Triangle: + case LDObject::ETriangle: { coordCount = 9; } break; - case LDObject::Quad: - case LDObject::CondLine: + case LDObject::EQuad: + case LDObject::ECondLine: { coordCount = 12; } break; - case LDObject::Vertex: + case LDObject::EVertex: { coordCount = 3; } break; - case LDObject::BFC: + case LDObject::EBFC: { rb_bfcType = new RadioGroup ("Statement", {}, 0, Qt::Vertical); @@ -112,7 +112,7 @@ rb_bfcType->setValue ( (int) static_cast (obj)->type); } break; - case LDObject::Subfile: + case LDObject::ESubfile: { coordCount = 3; tw_subfileList = new QTreeWidget(); @@ -169,7 +169,7 @@ if (obj != null) colnum = obj->getColor(); else - colnum = (type == LDObject::CondLine || type == LDObject::Line) ? edgecolor : maincolor; + colnum = (type == LDObject::ECondLine || type == LDObject::ELine) ? edgecolor : maincolor; pb_color = new QPushButton; setButtonBackground (pb_color, colnum); @@ -189,10 +189,10 @@ switch (type) { - case LDObject::Line: - case LDObject::CondLine: - case LDObject::Triangle: - case LDObject::Quad: + case LDObject::ELine: + case LDObject::ECondLine: + case LDObject::ETriangle: + case LDObject::EQuad: // Apply coordinates if (obj) @@ -204,15 +204,15 @@ break; - case LDObject::Comment: + case LDObject::EComment: layout->addWidget (le_comment, 0, 1); break; - case LDObject::BFC: + case LDObject::EBFC: layout->addWidget (rb_bfcType, 0, 1); break; - case LDObject::Subfile: + case LDObject::ESubfile: layout->addWidget (tw_subfileList, 1, 1, 1, 2); layout->addWidget (lb_subfileName, 2, 1); layout->addWidget (le_subfileName, 2, 2); @@ -229,7 +229,7 @@ QLabel* lb_matrix = new QLabel ("Matrix:"); le_matrix = new QLineEdit; // le_matrix->setValidator (new QDoubleValidator); - matrix defaultMatrix = g_identity; + Matrix defaultMatrix = g_identity; if (mo) { @@ -328,14 +328,14 @@ setlocale (LC_ALL, "C"); // FIXME: Redirect to Edit Raw - if (obj && obj->getType() == LDObject::Error) + if (obj && obj->getType() == LDObject::EError) return; - if (type == LDObject::Empty) + if (type == LDObject::EEmpty) return; // Nothing to edit with empties const bool newObject = (obj == null); - matrix transform = g_identity; + Matrix transform = g_identity; AddObjectDialog dlg (type, obj); assert (!obj || obj->getType() == type); @@ -343,7 +343,7 @@ if (dlg.exec() == false) return; - if (type == LDObject::Subfile) + if (type == LDObject::ESubfile) { QStringList matrixstrvals = dlg.le_matrix->text().split (" ", QString::SkipEmptyParts); @@ -355,30 +355,30 @@ for (str val : matrixstrvals) matrixvals[i++] = val.toFloat(); - transform = matrix (matrixvals); + transform = Matrix (matrixvals); } } switch (type) { - case LDObject::Comment: + case LDObject::EComment: { LDComment* comm = initObj (obj); comm->text = dlg.le_comment->text(); } break; - case LDObject::Line: - case LDObject::Triangle: - case LDObject::Quad: - case LDObject::CondLine: + case LDObject::ELine: + case LDObject::ETriangle: + case LDObject::EQuad: + case LDObject::ECondLine: { if (!obj) obj = LDObject::getDefault (type); for (int i = 0; i < obj->vertices(); ++i) { - vertex v; + Vertex v; for_axes (ax) v[ax] = dlg.dsb_coords[ (i * 3) + ax]->value(); @@ -387,13 +387,13 @@ } } break; - case LDObject::BFC: + case LDObject::EBFC: { LDBFC* bfc = initObj (obj); bfc->type = (LDBFC::Type) dlg.rb_bfcType->value(); } break; - case LDObject::Vertex: + case LDObject::EVertex: { LDVertex* vert = initObj (obj); @@ -402,7 +402,7 @@ } break; - case LDObject::Subfile: + case LDObject::ESubfile: { str name = dlg.le_subfileName->text();