19#include "bezierarea.h"
20#include "pencilerror.h"
22#include <QXmlStreamWriter>
25BezierArea::BezierArea()
38 while (i >= mVertex.
size() )
40 i = i - mVertex.
size();
44 i = i + mVertex.
size();
49void BezierArea::setSelected(
bool YesOrNo)
60 int errorLocation = -1;
61 for (
int i = 0; i < mVertex.
size(); i++ )
67 if ( errorLocation < 0 && xmlStream.
hasError() )
75 if ( xmlStream.
hasError() && errorLocation >= 0 )
78 debugInfo <<
"BezierArea::createDomElement";
79 debugInfo <<
QString(
"colorNumber = %1").
arg(mColorNumber);
80 debugInfo <<
QString(
"- mVertex[%1] has failed to write").
arg(errorLocation);
81 debugInfo <<
QString(
" curve = %1").
arg(mVertex.
at(errorLocation).curveNumber);
82 debugInfo <<
QString(
" vertex = %1 ").
arg(mVertex.
at(errorLocation).vertexNumber);
84 return Status( Status::FAIL, debugInfo );
90void BezierArea::loadDomElement(
const QDomElement& element)
95 while (!vertexTag.
isNull())
98 if (!vertexElement.
isNull())
100 if (vertexElement.
tagName() ==
"vertex")
QString attribute(const QString &name, const QString &defValue) const const
QString tagName() const const
QDomNode firstChild() const const
bool isNull() const const
QDomNode nextSibling() const const
QDomElement toElement() const const
void append(const T &value)
const T & at(int i) const const
QString arg(qlonglong a, int fieldWidth, int base, QChar fillChar) const const
QString number(int n, int base)
int toInt(bool *ok, int base) const const
bool hasError() const const
void writeAttribute(const QString &qualifiedName, const QString &value)
void writeEmptyElement(const QString &qualifiedName)
void writeStartElement(const QString &qualifiedName)