lib
SpaceElement Class Reference
#include <spaceelement.h>
Inheritance diagram for SpaceElement:

Detailed Description
A element that represents a space.
Definition at line 38 of file spaceelement.h.
Public Member Functions | |
SpaceElement (SpaceWidth space=THIN, bool tab=false, BasicElement *parent=0) | |
SpaceElement (const SpaceElement &) | |
virtual SpaceElement * | clone () |
virtual bool | accept (ElementVisitor *visitor) |
virtual QChar | getCharacter () const |
virtual void | calcSizes (const ContextStyle &cstyle, ContextStyle::TextStyle tstyle, ContextStyle::IndexStyle istyle, StyleAttributes &style) |
virtual void | draw (QPainter &painter, const LuPixelRect &r, const ContextStyle &context, ContextStyle::TextStyle tstyle, ContextStyle::IndexStyle istyle, StyleAttributes &style, const LuPixelPoint &parentOrigin) |
virtual QString | toLatex () |
Protected Member Functions | |
virtual QString | getTagName () const |
virtual void | writeDom (QDomElement element) |
virtual bool | readAttributesFromDom (QDomElement element) |
virtual bool | readContentFromDom (QDomNode &node) |
virtual bool | readAttributesFromMathMLDom (const QDomElement &element) |
Member Function Documentation
bool SpaceElement::accept | ( | ElementVisitor * | visitor | ) | [virtual] |
Visit this element.
An implementation of the visitor pattern.
Implements BasicElement.
Definition at line 78 of file spaceelement.cc.
virtual QChar SpaceElement::getCharacter | ( | ) | const [inline, virtual] |
- Returns:
- the character that represents this element.
Used for parsing a sequence.
Reimplemented from BasicElement.
Definition at line 70 of file spaceelement.h.
void SpaceElement::calcSizes | ( | const ContextStyle & | cstyle, | |
ContextStyle::TextStyle | tstyle, | |||
ContextStyle::IndexStyle | istyle, | |||
StyleAttributes & | style | |||
) | [virtual] |
Calculates our width and height and our children's parentPosition.
Implements BasicElement.
Definition at line 84 of file spaceelement.cc.
void SpaceElement::draw | ( | QPainter & | painter, | |
const LuPixelRect & | r, | |||
const ContextStyle & | context, | |||
ContextStyle::TextStyle | tstyle, | |||
ContextStyle::IndexStyle | istyle, | |||
StyleAttributes & | style, | |||
const LuPixelPoint & | parentOrigin | |||
) | [virtual] |
Draws the whole element including its children.
The `parentOrigin' is the point this element's parent starts. We can use our parentPosition to get our own origin then.
Implements BasicElement.
Definition at line 131 of file spaceelement.cc.
QString SpaceElement::toLatex | ( | ) | [virtual] |
- Returns:
- the latex representation of the element and of the element's children
Reimplemented from BasicElement.
Definition at line 394 of file spaceelement.cc.
virtual QString SpaceElement::getTagName | ( | ) | const [inline, protected, virtual] |
- Returns:
- the tag name of this element type.
Reimplemented from BasicElement.
Definition at line 119 of file spaceelement.h.
void SpaceElement::writeDom | ( | QDomElement | element | ) | [protected, virtual] |
Appends our attributes to the dom element.
Reimplemented from BasicElement.
Definition at line 161 of file spaceelement.cc.
bool SpaceElement::readAttributesFromDom | ( | QDomElement | element | ) | [protected, virtual] |
Reads our attributes from the element.
Returns false if it failed.
Reimplemented from BasicElement.
Definition at line 206 of file spaceelement.cc.
bool SpaceElement::readContentFromDom | ( | QDomNode & | node | ) | [protected, virtual] |
Reads our content from the node.
Sets the node to the next node that needs to be read. Returns false if it failed.
Reimplemented from BasicElement.
Definition at line 237 of file spaceelement.cc.
bool SpaceElement::readAttributesFromMathMLDom | ( | const QDomElement & | element | ) | [protected, virtual] |
Reads our attributes from the MathML element.
Returns false if it failed.
Reimplemented from BasicElement.
Definition at line 242 of file spaceelement.cc.
The documentation for this class was generated from the following files: