20#include "creationstrategy.h"
21#include "actionelement.h"
23KFORMULA_NAMESPACE_BEGIN
30bool ActionElement::readAttributesFromMathMLDom(
const TQDomElement& element)
36 m_actionType = element.attribute(
"actiontype" );
37 TQString selectionStr = element.attribute(
"selection" );
38 if ( ! selectionStr.isNull() ) {
40 m_selection = selectionStr.toUInt( &ok );
41 if ( ! ok ) m_selection = 0;
47int ActionElement::buildChildrenFromMathMLDom(TQPtrList<BasicElement>& list, TQDomNode n)
49 if ( ! n.isElement() )
51 TQDomElement e = n.toElement();
52 TQString tag = e.tagName().lower();
53 BasicElement* child = getCreationStrategy()->createElement( tag, e );
56 child->setParent(
this );
66void ActionElement::writeMathMLAttributes( TQDomElement& element )
const
68 if ( ! m_actionType.isNull() ) {
69 element.setAttribute(
"actiontype", m_actionType );
72 element.setAttribute(
"selection", TQString(
"%1" ).arg( m_selection ) );
Basis of every formula element.
virtual bool readAttributesFromMathMLDom(const TQDomElement &element)
Reads our attributes from the MathML element.
int buildFromMathMLDom(TQDomElement element)
Set this element attribute, build children and call their builFromMathMLDom.
The element that contains a number of children.
virtual void parse()
Parses the sequence and generates a new syntax tree.