qglengine: direct primitive editor

git-svn-id: svn://db.shs.com.ru/libs@687 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
2019-12-12 16:13:16 +00:00
parent c40c08107f
commit bc33d99703
6 changed files with 174 additions and 81 deletions

View File

@@ -87,7 +87,7 @@ Mesh * Primitive::cube(float width, float length, float height) {
} }
Mesh * Primitive::ellipsoid(int segments_wl, int segments_h, float width, float length, float height) { Mesh * Primitive::ellipsoid(int segments_wl, int segments_h, float width, float length, float height, float end_angle) {
Mesh * ret = new Mesh(); Mesh * ret = new Mesh();
QVector<QVector3D> & v(ret->vertices ()); QVector<QVector3D> & v(ret->vertices ());
QVector<QVector3D> & n(ret->normals ()); QVector<QVector3D> & n(ret->normals ());
@@ -96,6 +96,7 @@ Mesh * Primitive::ellipsoid(int segments_wl, int segments_h, float width, float
double hh = height / 2.f; double hh = height / 2.f;
int hseg = segments_h + 1, wlseg = segments_wl + 1; int hseg = segments_h + 1, wlseg = segments_wl + 1;
double crw, crl, a, ch, twl; double crw, crl, a, ch, twl;
double eang = deg2rad * end_angle;
QVector3D cp; QVector3D cp;
for (int i = 0; i <= hseg; i++) { for (int i = 0; i <= hseg; i++) {
@@ -106,10 +107,12 @@ Mesh * Primitive::ellipsoid(int segments_wl, int segments_h, float width, float
crl = twl * length; crl = twl * length;
int cvcnt = wlseg * 2; int cvcnt = wlseg * 2;
for (int j = 0; j < cvcnt; j++) { for (int j = 0; j < cvcnt; j++) {
a = (double)j / (cvcnt - 1) * M_2PI; a = (double)j / (cvcnt - 1) * eang;
cp.setX(crl * cos(a)); cp.setX(crl * cos(a));
cp.setY(crw * sin(a)); cp.setY(crw * sin(a));
v << cp; t << QVector2D((double)j / (cvcnt - 1), ch/2.f + 0.5f); v << cp;
t << QVector2D((double)j / (cvcnt - 1), ch/2.f + 0.5f);
n << (cp / QVector3D(length * length, width * width, height * height)).normalized();
int si = v.size() - 1; int si = v.size() - 1;
if (j > 0 && i > 0) { if (j > 0 && i > 0) {
ind << Vector3i(si - cvcnt - 1, si, si - 1); ind << Vector3i(si - cvcnt - 1, si, si - 1);
@@ -117,16 +120,22 @@ Mesh * Primitive::ellipsoid(int segments_wl, int segments_h, float width, float
} }
} }
} }
if (end_angle < 360.) {
n.resize(v.size()); Mesh * cap = Primitive::disc(segments_h+1, length, height, 180);
for (int i = 0; i < v.size(); i++) cap->rotatePoints(90, 0, 1, 0);
n[i] = v[i].normalized(); cap->rotatePoints(-90, 0, 0, 1);
ret->append(cap);
cap->flipNormals();
cap->rotatePoints(end_angle, 0, 0, 1);
cap->scalePoints(QVector3D((cos(eang)*cos(eang)*width+sin(eang)*sin(eang)*length)/width, (cos(eang)*cos(eang)*length+sin(eang)*sin(eang)*width)/length, 1));
ret->append(cap);
delete cap;
}
return ret; return ret;
} }
Mesh * Primitive::disc(int segments, float width, float length, bool up, float end_angle) { Mesh * Primitive::disc(int segments, float width, float length, float end_angle) {
Mesh * ret = new Mesh(); Mesh * ret = new Mesh();
QVector<QVector3D> & v(ret->vertices ()); QVector<QVector3D> & v(ret->vertices ());
QVector<QVector3D> & n(ret->normals ()); QVector<QVector3D> & n(ret->normals ());
@@ -136,6 +145,7 @@ Mesh * Primitive::disc(int segments, float width, float length, bool up, float e
segments = qMax(segments + 1, 4); segments = qMax(segments + 1, 4);
QVector3D cp; QVector3D cp;
v << QVector3D(); v << QVector3D();
n << QVector3D(0, 0, 1);
t << QVector2D(0.5f, 0.5f); t << QVector2D(0.5f, 0.5f);
end_angle *= deg2rad; end_angle *= deg2rad;
for (int i = 0; i < segments; i++) { for (int i = 0; i < segments; i++) {
@@ -143,20 +153,11 @@ Mesh * Primitive::disc(int segments, float width, float length, bool up, float e
cp.setX(length / 2. * cos(a)); cp.setX(length / 2. * cos(a));
cp.setY(width / 2. * sin(a)); cp.setY(width / 2. * sin(a));
v << cp; v << cp;
n << QVector3D(0, 0, 1);
t << QVector2D(cp.x() / width + 0.5f, cp.y() / length + 0.5f); t << QVector2D(cp.x() / width + 0.5f, cp.y() / length + 0.5f);
int si = v.size() - 1; int si = v.size() - 1;
if (i > 0) { if (i > 0) ind << Vector3i(si - 1, si, 0);
if (up)
ind << Vector3i(si - 1, si, 0);
else
ind << Vector3i(si, si - 1, 0);
}
} }
n.resize(v.size());
for (int i = 0; i < v.size(); i++)
n[i] = QVector3D(0, 0, up ? 1 : -1);
return ret; return ret;
} }
@@ -172,6 +173,8 @@ QVector3D coneNormal(double rx, double ry, double height, double ang) {
norm.setZ(norm.length() * tan(ca)); norm.setZ(norm.length() * tan(ca));
return norm.normalized(); return norm.normalized();
} }
Mesh * Primitive::cone(int segments, float width, float length, float height) { Mesh * Primitive::cone(int segments, float width, float length, float height) {
Mesh * ret = new Mesh(); Mesh * ret = new Mesh();
QVector<QVector3D> & v(ret->vertices ()); QVector<QVector3D> & v(ret->vertices ());
@@ -200,7 +203,8 @@ Mesh * Primitive::cone(int segments, float width, float length, float height) {
ind << Vector3i(si - 1, si - 2, si); ind << Vector3i(si - 1, si - 2, si);
} }
Mesh * cap = Primitive::disc(segments, width, length, false); Mesh * cap = Primitive::disc(segments, width, length);
cap->flipNormals();
ret->append(cap); ret->append(cap);
delete cap; delete cap;
@@ -208,7 +212,7 @@ Mesh * Primitive::cone(int segments, float width, float length, float height) {
} }
Mesh * Primitive::cylinder(int segments, float width, float length, float height) { Mesh * Primitive::cylinder(int segments, float width, float length, float height, float end_angle) {
Mesh * ret = new Mesh(); Mesh * ret = new Mesh();
QVector<QVector3D> & v(ret->vertices ()); QVector<QVector3D> & v(ret->vertices ());
QVector<QVector3D> & n(ret->normals ()); QVector<QVector3D> & n(ret->normals ());
@@ -218,12 +222,14 @@ Mesh * Primitive::cylinder(int segments, float width, float length, float height
int seg = qMax(segments + 1, 4); int seg = qMax(segments + 1, 4);
double rx = width / 2., ry = length / 2.; double rx = width / 2., ry = length / 2.;
QVector3D cp, norm; QVector3D cp, norm;
double eang = deg2rad * end_angle;
for (int i = 0; i < seg; i++) { for (int i = 0; i < seg; i++) {
double a = (double)i / (seg - 1) * M_2PI; double a = (double)i / (seg - 1) * eang;
cp.setX(ry * cos(a)); cp.setX(ry * cos(a));
cp.setY(rx * sin(a)); cp.setY(rx * sin(a));
cp.setZ(0.); cp.setZ(0.);
norm = cp.normalized(); norm = (cp / QVector3D(length * length, width * width, 1)).normalized();
v << cp; v << cp;
cp.setZ(height); cp.setZ(height);
v << cp; v << cp;
@@ -237,14 +243,27 @@ Mesh * Primitive::cylinder(int segments, float width, float length, float height
} }
} }
Mesh * cap = Primitive::disc(segments, width, length, false); Mesh * cap = Primitive::disc(segments, width, length, end_angle);
cap->flipNormals();
ret->append(cap); ret->append(cap);
delete cap;
cap = Primitive::disc(segments, width, length, true);
cap->translatePoints(QVector3D(0., 0., height)); cap->translatePoints(QVector3D(0., 0., height));
cap->flipNormals();
ret->append(cap); ret->append(cap);
delete cap; delete cap;
if (end_angle < 360.) {
Mesh * cap = Primitive::plane(length/2, height);
cap->rotatePoints(90, 1, 0, 0);
//cap->rotatePoints(-90, 0, 0, 1);
cap->translatePoints(length/4, 0, height/2);
ret->append(cap);
cap->flipNormals();
cap->rotatePoints(end_angle, 0, 0, 1);
cap->scalePoints(QVector3D((cos(eang)*cos(eang)*width+sin(eang)*sin(eang)*length)/width, (cos(eang)*cos(eang)*length+sin(eang)*sin(eang)*width)/length, 1));
ret->append(cap);
delete cap;
}
return ret; return ret;
} }
@@ -304,16 +323,14 @@ Mesh * Primitive::torus(int segments_main, int segments_second, float radius_mai
pcnt = v.size(); pcnt = v.size();
} }
if (end_angle < 360.) { if (end_angle < 360.) {
Mesh * cap = Primitive::disc(segments_second-1, radius_second * 2, radius_second * 2, true); Mesh * cap = Primitive::disc(segments_second-1, radius_second * 2, radius_second * 2);
cap->rotatePoints(90, 1, 0, 0); cap->rotatePoints(90, 1, 0, 0);
cap->translatePoints(radius_main, 0, 0); cap->translatePoints(radius_main, 0, 0);
ret->append(cap); ret->append(cap);
delete cap; cap->flipNormals();
cap = Primitive::disc(segments_second-1, radius_second * 2, radius_second * 2, false);
cap->rotatePoints(90, 1, 0, 0);
cap->translatePoints(radius_main, 0, 0);
cap->rotatePoints(end_angle, 0, 0, 1); cap->rotatePoints(end_angle, 0, 0, 1);
ret->append(cap); ret->append(cap);
delete cap;
} }
return ret; return ret;
} }

View File

@@ -29,13 +29,13 @@ Mesh * plane(float width = 1., float length = 1.);
Mesh * cube(float width = 1., float length = 1., float height = 1.); Mesh * cube(float width = 1., float length = 1., float height = 1.);
Mesh * ellipsoid(int segments_wl, int segments_h, float width = 1., float length = 1., float height = 1.); Mesh * ellipsoid(int segments_wl, int segments_h, float width = 1., float length = 1., float height = 1., float end_angle = 360.);
Mesh * disc(int segments, float width = 1., float length = 1., bool up = true, float end_angle = 360.); Mesh * disc(int segments, float width = 1., float length = 1., float end_angle = 360.);
Mesh * cone(int segments, float width = 1., float length = 1., float height = 1.); Mesh * cone(int segments, float width = 1., float length = 1., float height = 1.);
Mesh * cylinder(int segments, float width = 1., float length = 1., float height = 1.); Mesh * cylinder(int segments, float width = 1., float length = 1., float height = 1., float end_angle = 360.);
Mesh * arrow(int segments = 16, float thick = 0.04, float angle = 30.); // length = 1 Mesh * arrow(int segments = 16, float thick = 0.04, float angle = 30.); // length = 1

View File

@@ -79,10 +79,11 @@ RendererService::RendererService(Renderer * r_): r(r_) {
handle_move_mesh = Primitive::arrow(12, 0.06); handle_move_mesh = Primitive::arrow(12, 0.06);
handle_ms_2_mesh = Primitive::torus(8, 12, 0.5, 0.02, 90); handle_ms_2_mesh = Primitive::torus(8, 12, 0.5, 0.02, 90);
Mesh * m = Primitive::disc(8, 1., 1., true, 90); Mesh * m = Primitive::disc(8, 1., 1., 90);
handle_ms_2_mesh->append(m); handle_ms_2_mesh->append(m);
delete m; delete m;
m = Primitive::disc(8, 1., 1., false, 90); m = Primitive::disc(8, 1., 1., 90);
m->flipNormals();
handle_ms_2_mesh->append(m); handle_ms_2_mesh->append(m);
delete m; delete m;

View File

@@ -7,6 +7,7 @@
PrimitiveEditor::PrimitiveEditor(QWidget *parent) : QWidget(parent), ui(new Ui::PrimitiveEditor) { PrimitiveEditor::PrimitiveEditor(QWidget *parent) : QWidget(parent), ui(new Ui::PrimitiveEditor) {
view = 0; view = 0;
can_replace = false;
ui->setupUi(this); ui->setupUi(this);
editors[Plane] << ui->widgetWidth; editors[Plane] << ui->widgetWidth;
editors[Plane] << ui->widgetLength; editors[Plane] << ui->widgetLength;
@@ -18,6 +19,7 @@ PrimitiveEditor::PrimitiveEditor(QWidget *parent) : QWidget(parent), ui(new Ui::
editors[Ellipsoid] << ui->widgetHeight; editors[Ellipsoid] << ui->widgetHeight;
editors[Ellipsoid] << ui->widgetSegments; editors[Ellipsoid] << ui->widgetSegments;
editors[Ellipsoid] << ui->widgetSegments2; editors[Ellipsoid] << ui->widgetSegments2;
editors[Ellipsoid] << ui->widgetAngle;
editors[Disc] << ui->widgetWidth; editors[Disc] << ui->widgetWidth;
editors[Disc] << ui->widgetLength; editors[Disc] << ui->widgetLength;
editors[Disc] << ui->widgetSegments; editors[Disc] << ui->widgetSegments;
@@ -30,6 +32,7 @@ PrimitiveEditor::PrimitiveEditor(QWidget *parent) : QWidget(parent), ui(new Ui::
editors[Cylinder] << ui->widgetLength; editors[Cylinder] << ui->widgetLength;
editors[Cylinder] << ui->widgetHeight; editors[Cylinder] << ui->widgetHeight;
editors[Cylinder] << ui->widgetSegments; editors[Cylinder] << ui->widgetSegments;
editors[Cylinder] << ui->widgetAngle;
editors[Torus] << ui->widgetRadius1; editors[Torus] << ui->widgetRadius1;
editors[Torus] << ui->widgetRadius2; editors[Torus] << ui->widgetRadius2;
editors[Torus] << ui->widgetSegments; editors[Torus] << ui->widgetSegments;
@@ -63,44 +66,70 @@ void PrimitiveEditor::assignQGLView(QGLView * v) {
} }
Mesh * PrimitiveEditor::createMesh() { Mesh * PrimitiveEditor::createMesh(QVariantList & params) {
Mesh * m = 0; Mesh * m = 0;
PrimitiveType pt = (PrimitiveType)ui->comboPrimitives->currentIndex(); PrimitiveType pt = (PrimitiveType)ui->comboPrimitives->currentIndex();
params << pt;
switch (pt) { switch (pt) {
case Plane: case Plane:
m = Primitive::plane(ui->spinWidth->value(), m = Primitive::plane(ui->spinWidth->value(),
ui->spinLength->value()); ui->spinLength->value());
params << ui->spinWidth->value()
<< ui->spinLength->value();
break; break;
case Cube: case Cube:
m = Primitive::cube(ui->spinWidth->value(), m = Primitive::cube(ui->spinWidth->value(),
ui->spinLength->value(), ui->spinLength->value(),
ui->spinHeight->value()); ui->spinHeight->value());
params << ui->spinWidth->value()
<< ui->spinLength->value()
<< ui->spinHeight->value();
break; break;
case Ellipsoid: case Ellipsoid:
m = Primitive::ellipsoid(ui->spinSegments->value(), m = Primitive::ellipsoid(ui->spinSegments->value(),
ui->spinSegments2->value(), ui->spinSegments2->value(),
ui->spinWidth->value(), ui->spinWidth->value(),
ui->spinLength->value(), ui->spinLength->value(),
ui->spinHeight->value()); ui->spinHeight->value(),
ui->spinAngle->value());
params << ui->spinSegments->value()
<< ui->spinSegments2->value()
<< ui->spinWidth->value()
<< ui->spinLength->value()
<< ui->spinHeight->value()
<< ui->spinAngle->value();
break; break;
case Disc: case Disc:
m = Primitive::disc(ui->spinSegments->value(), m = Primitive::disc(ui->spinSegments->value(),
ui->spinWidth->value(), ui->spinWidth->value(),
ui->spinLength->value(), ui->spinLength->value(),
true,
ui->spinAngle->value()); ui->spinAngle->value());
params << ui->spinSegments->value()
<< ui->spinWidth->value()
<< ui->spinLength->value()
<< ui->spinAngle->value();
break; break;
case Cone: case Cone:
m = Primitive::cone(ui->spinSegments->value(), m = Primitive::cone(ui->spinSegments->value(),
ui->spinWidth->value(), ui->spinWidth->value(),
ui->spinLength->value(), ui->spinLength->value(),
ui->spinHeight->value()); ui->spinHeight->value());
params << ui->spinSegments->value()
<< ui->spinWidth->value()
<< ui->spinLength->value()
<< ui->spinHeight->value();
break; break;
case Cylinder: case Cylinder:
m = Primitive::cylinder(ui->spinSegments->value(), m = Primitive::cylinder(ui->spinSegments->value(),
ui->spinWidth->value(), ui->spinWidth->value(),
ui->spinLength->value(), ui->spinLength->value(),
ui->spinHeight->value()); ui->spinHeight->value(),
ui->spinAngle->value());
params << ui->spinSegments->value()
<< ui->spinWidth->value()
<< ui->spinLength->value()
<< ui->spinHeight->value()
<< ui->spinAngle->value();
break; break;
case Torus: case Torus:
m = Primitive::torus(ui->spinSegments->value(), m = Primitive::torus(ui->spinSegments->value(),
@@ -108,9 +137,16 @@ Mesh * PrimitiveEditor::createMesh() {
ui->spinRadius->value(), ui->spinRadius->value(),
ui->spinRadius2->value(), ui->spinRadius2->value(),
ui->spinAngle->value()); ui->spinAngle->value());
params << ui->spinSegments->value()
<< ui->spinSegments2->value()
<< ui->spinRadius->value()
<< ui->spinRadius2->value()
<< ui->spinAngle->value();
break; break;
default: return 0; default: return 0;
} }
params << ui->flipNormals->isChecked();
params << ui->colorButton->color();
if (ui->flipNormals->isChecked()) if (ui->flipNormals->isChecked())
m->flipNormals(); m->flipNormals();
return m; return m;
@@ -126,32 +162,90 @@ void PrimitiveEditor::showEditors() {
void PrimitiveEditor::selectionChanged() { void PrimitiveEditor::selectionChanged() {
ObjectBase * so = view->selectedObject(); ObjectBase * so = view->selectedObject();\
bool has_1 = so; can_replace = false;
ui->buttonReplace->setEnabled(has_1); if (so) {
QVariantList vl = so->property("primitive", &can_replace).toList();
if (can_replace && !vl.isEmpty()) {
PrimitiveType pt = (PrimitiveType)vl.takeFirst().toInt();
ui->comboPrimitives->setCurrentIndex(pt);
switch (pt) {
case Plane:
ui->spinWidth->setValue(vl.takeFirst().toDouble());
ui->spinLength->setValue(vl.takeFirst().toDouble());
break;
case Cube:
ui->spinWidth->setValue(vl.takeFirst().toDouble());
ui->spinLength->setValue(vl.takeFirst().toDouble());
ui->spinHeight->setValue(vl.takeFirst().toDouble());
break;
case Ellipsoid:
ui->spinSegments->setValue(vl.takeFirst().toDouble());
ui->spinSegments2->setValue(vl.takeFirst().toDouble());
ui->spinWidth->setValue(vl.takeFirst().toDouble());
ui->spinLength->setValue(vl.takeFirst().toDouble());
ui->spinHeight->setValue(vl.takeFirst().toDouble());
ui->spinAngle->setValue(vl.takeFirst().toDouble());
break;
case Disc:
ui->spinSegments->setValue(vl.takeFirst().toDouble());
ui->spinWidth->setValue(vl.takeFirst().toDouble());
ui->spinLength->setValue(vl.takeFirst().toDouble());
ui->spinAngle->setValue(vl.takeFirst().toDouble());
break;
case Cone:
ui->spinSegments->setValue(vl.takeFirst().toDouble());
ui->spinWidth->setValue(vl.takeFirst().toDouble());
ui->spinLength->setValue(vl.takeFirst().toDouble());
ui->spinHeight->setValue(vl.takeFirst().toDouble());
break;
case Cylinder:
ui->spinSegments->setValue(vl.takeFirst().toDouble());
ui->spinWidth->setValue(vl.takeFirst().toDouble());
ui->spinLength->setValue(vl.takeFirst().toDouble());
ui->spinHeight->setValue(vl.takeFirst().toDouble());
ui->spinAngle->setValue(vl.takeFirst().toDouble());
break;
case Torus:
ui->spinSegments->setValue(vl.takeFirst().toDouble());
ui->spinSegments2->setValue(vl.takeFirst().toDouble());
ui->spinRadius->setValue(vl.takeFirst().toDouble());
ui->spinRadius2->setValue(vl.takeFirst().toDouble());
ui->spinAngle->setValue(vl.takeFirst().toDouble());
break;
}
ui->flipNormals->setChecked(vl.takeFirst().toBool());
ui->colorButton->setColor(vl.takeFirst().value<QColor>());
}
}
} }
void PrimitiveEditor::replaceMesh() { void PrimitiveEditor::replaceMesh() {
if (!view) return; if (!view) return;
if (!ui->buttonReplace->isEnabled() || !ui->buttonReplace->isChecked()) return; if (!can_replace) return;
ObjectBase * so = view->selectedObject(); ObjectBase * so = view->selectedObject();
if (!so) return; if (!so) return;
Mesh * m = createMesh(); QVariantList params;
Mesh * m = createMesh(params);
if (!m) return; if (!m) return;
so->setMesh(m); so->setMesh(m);
so->setColor(ui->colorButton->color());
so->setName(ui->comboPrimitives->currentText());
so->setProperty("primitive", params);
delete m; delete m;
} }
void PrimitiveEditor::on_buttonAdd_clicked() { void PrimitiveEditor::on_buttonAdd_clicked() {
if (!view) return; if (!view) return;
Mesh * m = createMesh(); QVariantList params;
Mesh * m = createMesh(params);
if (!m) return; if (!m) return;
ObjectBase * o = new ObjectBase(m); ObjectBase * o = new ObjectBase(m);
o->setColor(ui->colorButton->color()); o->setColor(ui->colorButton->color());
o->setName(ui->comboPrimitives->currentText()); o->setName(ui->comboPrimitives->currentText());
o->setProperty("primitive", params);
view->scene()->addObject(o); view->scene()->addObject(o);
view->scene()->selectObject(o); view->scene()->selectObject(o);
delete m; delete m;

View File

@@ -30,13 +30,14 @@ public:
void assignQGLView(QGLView * v); void assignQGLView(QGLView * v);
protected: protected:
Mesh * createMesh(); Mesh * createMesh(QVariantList & params);
void showEditors(); void showEditors();
Ui::PrimitiveEditor *ui; Ui::PrimitiveEditor *ui;
QGLView * view; QGLView * view;
QMap<PrimitiveType, QList<QWidget *> > editors; QMap<PrimitiveType, QList<QWidget *> > editors;
QList<QWidget *> all_editors; QList<QWidget *> all_editors;
bool can_replace;
private slots: private slots:
void selectionChanged(); void selectionChanged();

View File

@@ -384,31 +384,9 @@
<property name="text"> <property name="text">
<string>Add</string> <string>Add</string>
</property> </property>
</widget> <property name="icon">
</item> <iconset resource="../../qad/utils/qad_utils.qrc">
<item> <normaloff>:/icons/list-add.png</normaloff>:/icons/list-add.png</iconset>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="buttonReplace">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Replace</string>
</property>
<property name="checkable">
<bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
@@ -438,7 +416,9 @@
<header>scroll_spin_box.h</header> <header>scroll_spin_box.h</header>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources/> <resources>
<include location="../../qad/utils/qad_utils.qrc"/>
</resources>
<connections> <connections>
<connection> <connection>
<sender>spinWidth</sender> <sender>spinWidth</sender>
@@ -601,18 +581,18 @@
</hints> </hints>
</connection> </connection>
<connection> <connection>
<sender>buttonReplace</sender> <sender>colorButton</sender>
<signal>clicked()</signal> <signal>colorChanged(QColor)</signal>
<receiver>PrimitiveEditor</receiver> <receiver>PrimitiveEditor</receiver>
<slot>replaceMesh()</slot> <slot>replaceMesh()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>340</x> <x>271</x>
<y>529</y> <y>285</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>367</x> <x>179</x>
<y>524</y> <y>267</y>
</hint> </hint>
</hints> </hints>
</connection> </connection>