kformula/flake

FractionElement Class Reference

Implementation of the MathML mfrac element. More...

#include <FractionElement.h>

Inheritance diagram for FractionElement:

List of all members.

Public Member Functions

 FractionElement (BasicElement *parent=0)
 ~FractionElement ()
QString attributesDefaultValue (const QString &attribute) const
const QList< BasicElement * > childElements () const
virtual QList< BasicElement * > elementsBetween (int pos1, int pos2) const
ElementType elementType () const
virtual int endPosition () const
void layout (const AttributeManager *am)
virtual bool moveCursor (FormulaCursor &newcursor, FormulaCursor &oldcursor)
void paint (QPainter &painter, AttributeManager *am)
virtual int positionOfChild (BasicElement *child) const
virtual bool replaceChild (BasicElement *oldelement, BasicElement *newelement)
virtual bool setCursorTo (FormulaCursor &cursor, QPointF point)

Protected Member Functions

bool readMathMLContent (const KoXmlElement &parent)
void writeMathMLContent (KoXmlWriter *writer) const

Detailed Description

Implementation of the MathML mfrac element.

The mfrac element is specified in the MathML spec section 3.3.2. The FractionElement holds two child elements that are the numerator and the denominator.

Definition at line 37 of file FractionElement.h.


Constructor & Destructor Documentation

FractionElement::FractionElement ( BasicElement parent = 0  ) 

The standard constructor.

Definition at line 31 of file FractionElement.cpp.

FractionElement::~FractionElement (  ) 

The standard destructor.

Definition at line 38 of file FractionElement.cpp.


Member Function Documentation

QString FractionElement::attributesDefaultValue ( const QString attribute  )  const [virtual]

inherited from BasicElement

Returns:
The default value of the attribute for this element

Reimplemented from BasicElement.

Definition at line 248 of file FractionElement.cpp.

const QList< BasicElement * > FractionElement::childElements (  )  const [virtual]

Obtain a list of all child elements of this element.

Returns:
a QList with pointers to all child elements

Reimplemented from BasicElement.

Definition at line 133 of file FractionElement.cpp.

QList< BasicElement * > FractionElement::elementsBetween ( int  pos1,
int  pos2 
) const [virtual]

Reimplemented from BasicElement.

Definition at line 171 of file FractionElement.cpp.

ElementType FractionElement::elementType (  )  const [virtual]
Returns:
The element's ElementType

Reimplemented from BasicElement.

Definition at line 286 of file FractionElement.cpp.

int FractionElement::endPosition (  )  const [virtual]

inherited from BasicElement

Reimplemented from FixedElement.

Definition at line 140 of file FractionElement.cpp.

void FractionElement::layout ( const AttributeManager am  )  [virtual]

Calculate the size of the element and the positions of its children.

Parameters:
am The AttributeManager providing information about attributes values

Reimplemented from BasicElement.

Definition at line 58 of file FractionElement.cpp.

bool FractionElement::moveCursor ( FormulaCursor newcursor,
FormulaCursor oldcursor 
) [virtual]

inherited from BasicElement

Reimplemented from BasicElement.

Definition at line 194 of file FractionElement.cpp.

void FractionElement::paint ( QPainter painter,
AttributeManager am 
) [virtual]

Render the element to the given QPainter.

Parameters:
painter The QPainter to paint the element to

Reimplemented from BasicElement.

Definition at line 44 of file FractionElement.cpp.

int FractionElement::positionOfChild ( BasicElement child  )  const [virtual]

inherited from BasicElement

Reimplemented from FixedElement.

Definition at line 184 of file FractionElement.cpp.

bool FractionElement::readMathMLContent ( const KoXmlElement &  parent  )  [protected, virtual]

Read all content from the node - reimplemented by child elements.

Reimplemented from BasicElement.

Definition at line 260 of file FractionElement.cpp.

bool FractionElement::replaceChild ( BasicElement oldelement,
BasicElement newelement 
) [virtual]

inherited from BasicElement

Definition at line 232 of file FractionElement.cpp.

bool FractionElement::setCursorTo ( FormulaCursor cursor,
QPointF  point 
) [virtual]

inherited from BasicElement

Reimplemented from BasicElement.

Definition at line 206 of file FractionElement.cpp.

void FractionElement::writeMathMLContent ( KoXmlWriter *  writer  )  const [protected, virtual]

Write all content to the KoXmlWriter - reimplemented by the child elements.

Reimplemented from BasicElement.

Definition at line 280 of file FractionElement.cpp.


The documentation for this class was generated from the following files: