5 #include <dtkCoreSupport/dtkAbstractData.h>
6 #include <dtkCoreSupport/dtkAbstractDataFactory.h>
20 return "axlCompositeCurveWriter";
24 return "axlCompositeCurveWriter";
28 return QStringList() <<
"axlCompositeCurve";
44 return !this->
accept(data);
51 QDomElement curElement = doc->createElement(
"composite_curve");
52 curElement.setAttribute(
"name", comCur->name());
55 curElement.setAttribute(
"size", QString::number(comCur->
size()));
58 QColor qcolor = comCur->
color();
60 QTextStream(&color) << QString::number(qcolor.red()) <<
" "
61 << QString::number(qcolor.green()) <<
" "
62 << QString::number(qcolor.blue()) <<
" "
63 << QString::number(comCur->
opacity());
64 curElement.setAttribute(
"color", color);
67 QString shader = comCur->
shader();
68 QFileInfo shaderFileInfo(shader);
69 curElement.setAttribute(
"shader", shaderFileInfo.fileName());
75 QDomElement curveElement = doc->createElement(
"curve");
79 curveElement.appendChild(subCurveElement);
81 curElement.appendChild(curveElement);
89 QDomElement axlCompositeCurveWriter::elementByWriter(
axlAbstractDataWriter *axl_writer, QDomDocument *doc, dtkAbstractData *data) {
95 if(!axl_writer->
accept(data))
98 element = axl_writer->
write(doc, data);
QStringList handled(void) const
axlCompositeCurveWriter(void)
QString description(void) const
bool reject(dtkAbstractData *data)
virtual bool accept(dtkAbstractData *data)=0
int count_curve(void) const
axlAbstractCurve * get_pt_curve_at_id(int id) const
QString identifier(void) const
virtual ~axlCompositeCurveWriter(void)
bool accept(dtkAbstractData *data)
QDomElement write(QDomDocument *doc, dtkAbstractData *data)
dtkAbstractDataWriter * createaxlCompositeCurveWriter(void)
virtual QDomElement write(QDomDocument *doc, dtkAbstractData *data)=0
static bool registered(void)