3 // Part of the Architektonas Project
4 // Originally part of QCad Community Edition by Andrew Mustun
5 // Extensively rewritten and refactored by James L. Hammons
6 // Portions copyright (C) 2001-2003 RibbonSoft
7 // Copyright (C) 2010 Underground Software
8 // See the README and GPLv2 files for licensing and warranty information
10 // JLH = James L. Hammons <jlhamm@acm.org>
13 // --- ---------- -----------------------------------------------------------
14 // JLH 06/10/2010 Added this file. :-)
17 #include "dlgspline.h"
22 DlgSpline::DlgSpline(QWidget * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
23 QDialog(parent, flags)
28 DlgSpline::~DlgSpline()
32 void DlgSpline::setSpline(Spline & e)
35 //pen = spline->getPen();
36 ui.wPen->setPen(spline->getPen(false), true, false, "Pen");
37 Drawing * graphic = spline->getGraphic();
38 Layer * lay = spline->getLayer(false);
41 ui.cbLayer->init(*(graphic->getLayerList()), false, false);
44 ui.cbLayer->setLayer(*lay);
47 s.setNum(spline->getDegree());
48 ui.cbDegree->setCurrentIndex(ui.cbDegree->findText(s));
49 // cbDegree->setCurrentIndex(cbDegree->findText(QString("%1").arg(degree)));
51 ui.cbClosed->setChecked(spline->isClosed());
54 void DlgSpline::updateSpline()
56 spline->setDegree(Math::round(Math::eval(ui.cbDegree->currentText())));
57 spline->setClosed(ui.cbClosed->isChecked());
58 spline->setPen(ui.wPen->getPen());
59 spline->setLayer(ui.cbLayer->currentText());