7 #include <dtkCoreSupport/dtkAbstractData.h>
8 #include <dtkCoreSupport/dtkAbstractDataFactory.h>
22 return "axlSurfaceRevolutionParametricWriter";
26 return "axlSurfaceRevolutionParametricWriter";
30 return QStringList() <<
"axlSurfaceRevolutionParametric";
46 return !this->
accept(data);
53 QDomElement surElement = doc->createElement(
"surface_revolution_parametric");
54 surElement.setAttribute(
"name", surRev->name());
57 surElement.setAttribute(
"size", QString::number(surRev->
size()));
60 QColor qcolor = surRev->
color();
62 QTextStream(&color) << QString::number(qcolor.red()) <<
" "
63 << QString::number(qcolor.green()) <<
" "
64 << QString::number(qcolor.blue()) <<
" "
65 << QString::number(surRev->
opacity());
66 surElement.setAttribute(
"color", color);
69 QString shader = surRev->
shader();
70 QFileInfo shaderFileInfo(shader);
71 surElement.setAttribute(
"shader", shaderFileInfo.fileName());
74 QDomElement axeElement = doc->createElement(
"axe");
77 QDomElement lineElement = axeWriter->
write(doc, axe);
78 axeElement.appendChild(lineElement);
79 surElement.appendChild(axeElement);
82 QDomElement curveElement = doc->createElement(
"curve");
84 QString curveWriterTag = curve->identifier()+
"Writer";
86 QDomElement subCurveElement = curveWriter->
write(doc, curve);
87 curveElement.appendChild(subCurveElement);
88 curveElement.setAttribute(
"type",curve->identifier());
89 surElement.appendChild(curveElement);
92 QDomElement angleElement = doc->createElement(
"angle");
95 angleElement.setAttribute(
"start_angle",startAngle);
96 angleElement.setAttribute(
"end_angle",endAngle);
97 surElement.appendChild(angleElement);
105 QDomElement axlSurfaceRevolutionParametricWriter::elementByWriter(
axlAbstractDataWriter *axl_writer, QDomDocument *doc, dtkAbstractData *data) {
111 if(!axl_writer->
accept(data))
114 element = axl_writer->
write(doc, data);
virtual ~axlSurfaceRevolutionParametricWriter(void)
Class axlLine defines 3D lines.
QString description(void) const
virtual bool accept(dtkAbstractData *data)=0
dtkAbstractDataWriter * createaxlSurfaceRevolutionParametricWriter(void)
QDomElement write(QDomDocument *doc, dtkAbstractData *data)
QStringList handled(void) const
axlSurfaceRevolutionParametricWriter(void)
axlAbstractCurve * getCurve()
static bool registered(void)
QString identifier(void) const
bool accept(dtkAbstractData *data)
bool reject(dtkAbstractData *data)
virtual QDomElement write(QDomDocument *doc, dtkAbstractData *data)=0