TextElement Class Reference
An element that represents one char. More...
#include <textelement.h>
Inheritance diagram for TextElement:


Public Member Functions | |
TextElement (QChar ch= ' ', bool beSymbol=false, BasicElement *parent=0) | |
TextElement (const TextElement &) | |
virtual TextElement * | clone () |
virtual bool | accept (ElementVisitor *visitor) |
virtual TokenType | getTokenType () const |
virtual bool | isInvisible () const |
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 void | dispatchFontCommand (FontCommand *cmd) |
CharStyle | getCharStyle () const |
void | setCharStyle (CharStyle cs) |
CharFamily | getCharFamily () const |
void | setCharFamily (CharFamily cf) |
char | format () const |
bool | isSymbol () const |
virtual QString | toLatex () |
virtual QString | formulaString () |
Protected Member Functions | |
virtual QString | getTagName () const |
virtual void | writeDom (QDomElement element) |
virtual bool | readAttributesFromDom (QDomElement element) |
virtual bool | readContentFromDom (QDomNode &node) |
QChar | getRealCharacter (const ContextStyle &context) |
QFont | getFont (const ContextStyle &context) |
void | setUpPainter (const ContextStyle &context, QPainter &painter) |
const SymbolTable & | getSymbolTable () const |
Detailed Description
An element that represents one char.
Definition at line 37 of file textelement.h.
Member Function Documentation
|
Visit this element. An implementation of the visitor pattern. Implements BasicElement. Definition at line 57 of file textelement.cc. References ElementVisitor::visit(). |
|
Reimplemented from BasicElement. Definition at line 63 of file textelement.cc. References SymbolTable::charClass(), and isSymbol(). |
|
Reimplemented from BasicElement. Definition at line 98 of file textelement.cc. References BasicElement::getElementType(), and ElementType::isInvisible(). |
|
Reimplemented from BasicElement. Definition at line 65 of file textelement.h. Referenced by SequenceElement::buildCommand(). |
|
Calculates our width and height and our children's parentPosition.
Implements BasicElement. Definition at line 111 of file textelement.cc. References ContextStyle::getAdjustedSize(), ContextStyle::getEmptyRectHeight(), ContextStyle::getEmptyRectWidth(), getFont(), getRealCharacter(), KoTextZoomHandler::layoutUnitPtToPt(), and KoTextZoomHandler::ptToLayoutUnitPt(). |
|
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 149 of file textelement.cc. References ContextStyle::axisHeight(), ContextStyle::getAdjustedSize(), BasicElement::getElementType(), ContextStyle::getErrorColor(), getFont(), ContextStyle::getLineWidth(), getRealCharacter(), KoZoomHandler::layoutUnitToFontSize(), KoZoomHandler::layoutUnitToPixelX(), KoZoomHandler::layoutUnitToPixelY(), setUpPainter(), and ElementType::text(). |
|
Dispatch this FontCommand to all our TextElement children.
Reimplemented from BasicElement. Definition at line 225 of file textelement.cc. References FontCommand::addTextElement(). |
|
Definition at line 113 of file textelement.h. Referenced by SequenceElement::buildCommand(), getFont(), getRealCharacter(), getTokenType(), and toLatex(). |
|
Reimplemented from BasicElement. Definition at line 443 of file textelement.cc. References isSymbol(), and SymbolTable::name(). |
|
Reimplemented from BasicElement. Definition at line 130 of file textelement.h. |
|
Appends our attributes to the dom element.
Reimplemented from BasicElement. Definition at line 328 of file textelement.cc. References BasicElement::writeDom(). |
|
Reads our attributes from the element. Returns false if it failed. Reimplemented from BasicElement. Definition at line 357 of file textelement.cc. References BasicElement::readAttributesFromDom(), and SymbolTable::unicodeFromSymbolFont(). |
|
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 438 of file textelement.cc. References BasicElement::readContentFromDom(). |
|
Definition at line 242 of file textelement.cc. References FontStyle::alphaTable(), SymbolTable::character(), AlphaTable::entry(), ContextStyle::fontStyle(), isSymbol(), AlphaTableEntry::pos, and AlphaTableEntry::valid(). Referenced by calcSizes(), and draw(). |
|
Definition at line 263 of file textelement.cc. References FontStyle::alphaTable(), AlphaTable::entry(), SymbolTable::font(), AlphaTableEntry::font, ContextStyle::fontStyle(), ContextStyle::getDefaultFont(), BasicElement::getElementType(), ElementType::getFont(), isSymbol(), ContextStyle::symbolTable(), and AlphaTableEntry::valid(). Referenced by calcSizes(), and draw(). |
|
Sets up the painter to be used for drawing.
Definition at line 309 of file textelement.cc. References BasicElement::getElementType(), and ElementType::setUpPainter(). Referenced by draw(). |
The documentation for this class was generated from the following files: