lib Library API Documentation

SpaceElement Class Reference

A element that represents a space. More...

#include <spaceelement.h>

Inheritance diagram for SpaceElement:

BasicElement List of all members.

Public Member Functions

 SpaceElement (SpaceWidth space=THIN, bool tab=false, BasicElement *parent=0)
 SpaceElement (const SpaceElement &)
virtual SpaceElementclone ()
virtual bool accept (ElementVisitor *visitor)
virtual QChar getCharacter () const
virtual void calcSizes (const ContextStyle &context, ContextStyle::TextStyle tstyle, ContextStyle::IndexStyle istyle)
virtual void draw (QPainter &painter, const LuPixelRect &r, const ContextStyle &context, ContextStyle::TextStyle tstyle, ContextStyle::IndexStyle istyle, const LuPixelPoint &parentOrigin)
virtual QString toLatex ()
virtual void writeMathML (QDomDocument doc, QDomNode parent)

Protected Member Functions

virtual QString getTagName () const
virtual void writeDom (QDomElement element)
virtual bool readAttributesFromDom (QDomElement element)
virtual bool readContentFromDom (QDomNode &node)

Detailed Description

A element that represents a space.

Definition at line 37 of file spaceelement.h.


Member Function Documentation

bool SpaceElement::accept ElementVisitor visitor  )  [virtual]
 

Visit this element.

An implementation of the visitor pattern.

Implements BasicElement.

Definition at line 47 of file spaceelement.cc.

References accept(), and ElementVisitor::visit().

Referenced by accept().

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 60 of file spaceelement.h.

void SpaceElement::calcSizes const ContextStyle context,
ContextStyle::TextStyle  tstyle,
ContextStyle::IndexStyle  istyle
[virtual]
 

Calculates our width and height and our children's parentPosition.

Implements BasicElement.

Definition at line 53 of file spaceelement.cc.

References calcSizes(), and BasicElement::registerTab().

Referenced by calcSizes().

void SpaceElement::draw QPainter painter,
const LuPixelRect r,
const ContextStyle context,
ContextStyle::TextStyle  tstyle,
ContextStyle::IndexStyle  istyle,
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 76 of file spaceelement.cc.

References draw().

Referenced by draw().

QString SpaceElement::toLatex  )  [virtual]
 

Returns:
the latex representation of the element and of the element's children

Reimplemented from BasicElement.

Definition at line 215 of file spaceelement.cc.

void SpaceElement::writeMathML QDomDocument  doc,
QDomNode  parent
[virtual]
 

Same as above, just MathML.

Reimplemented from BasicElement.

Definition at line 166 of file spaceelement.cc.

References writeMathML().

Referenced by writeMathML().

virtual QString SpaceElement::getTagName  )  const [inline, protected, virtual]
 

Returns:
the tag name of this element type.

Reimplemented from BasicElement.

Definition at line 109 of file spaceelement.h.

void SpaceElement::writeDom QDomElement  element  )  [protected, virtual]
 

Appends our attributes to the dom element.

Reimplemented from BasicElement.

Definition at line 105 of file spaceelement.cc.

References writeDom().

Referenced by writeDom().

bool SpaceElement::readAttributesFromDom QDomElement  element  )  [protected, virtual]
 

Reads our attributes from the element.

Returns false if it failed.

Reimplemented from BasicElement.

Definition at line 130 of file spaceelement.cc.

References readAttributesFromDom().

Referenced by readAttributesFromDom().

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 161 of file spaceelement.cc.

References readContentFromDom().

Referenced by readContentFromDom().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for lib Library Version 1.3.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Sep 28 04:04:06 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003