lib
SingleContentElement Class Reference
#include <bracketelement.h>
Inheritance diagram for SingleContentElement:

Detailed Description
The base of (all) elements that contain just one content element.(No indexes.)
Definition at line 39 of file bracketelement.h.
Public Member Functions | |
SingleContentElement (BasicElement *parent=0) | |
~SingleContentElement () | |
SingleContentElement (const SingleContentElement &) | |
virtual QChar | getCharacter () const |
virtual BasicElement * | goToPos (FormulaCursor *, bool &handled, const LuPixelPoint &point, const LuPixelPoint &parentOrigin) |
virtual void | dispatchFontCommand (FontCommand *cmd) |
virtual void | moveLeft (FormulaCursor *cursor, BasicElement *from) |
virtual void | moveRight (FormulaCursor *cursor, BasicElement *from) |
virtual void | moveUp (FormulaCursor *cursor, BasicElement *from) |
virtual void | moveDown (FormulaCursor *cursor, BasicElement *from) |
virtual void | remove (FormulaCursor *, QPtrList< BasicElement > &, Direction) |
virtual void | normalize (FormulaCursor *, Direction) |
virtual SequenceElement * | getMainChild () |
virtual void | selectChild (FormulaCursor *cursor, BasicElement *child) |
Protected Member Functions | |
virtual void | writeDom (QDomElement element) |
virtual void | writeMathMLContent (QDomDocument &doc, QDomElement &element, bool oasisFormat) const |
virtual bool | readContentFromDom (QDomNode &node) |
virtual int | readContentFromMathMLDom (QDomNode &node) |
SequenceElement * | getContent () |
Member Function Documentation
QChar SingleContentElement::getCharacter | ( | ) | const [virtual] |
- Returns:
- the character that represents this element.
Used for parsing a sequence. This is guaranteed to be QChar::null for all non-text elements.
Reimplemented from BasicElement.
Definition at line 59 of file bracketelement.cc.
BasicElement * SingleContentElement::goToPos | ( | FormulaCursor * | , | |
bool & | handled, | |||
const LuPixelPoint & | point, | |||
const LuPixelPoint & | parentOrigin | |||
) | [virtual] |
Sets the cursor and returns the element the point is in.
The handled flag shows whether the cursor has been set. This is needed because only the innermost matching element is allowed to set the cursor.
Reimplemented from BasicElement.
Reimplemented in BracketElement.
Definition at line 70 of file bracketelement.cc.
void SingleContentElement::dispatchFontCommand | ( | FontCommand * | cmd | ) | [virtual] |
Dispatch this FontCommand to all our TextElement children.
Reimplemented from BasicElement.
Definition at line 87 of file bracketelement.cc.
void SingleContentElement::moveLeft | ( | FormulaCursor * | cursor, | |
BasicElement * | from | |||
) | [virtual] |
Enters this element while moving to the left starting inside the element `from'.
Searches for a cursor position inside this element or to the left of it.
Reimplemented from BasicElement.
Definition at line 92 of file bracketelement.cc.
void SingleContentElement::moveRight | ( | FormulaCursor * | cursor, | |
BasicElement * | from | |||
) | [virtual] |
Enters this element while moving to the right starting inside the element `from'.
Searches for a cursor position inside this element or to the right of it.
Reimplemented from BasicElement.
Definition at line 108 of file bracketelement.cc.
void SingleContentElement::moveUp | ( | FormulaCursor * | cursor, | |
BasicElement * | from | |||
) | [virtual] |
Enters this element while moving up starting inside the element `from'.
Searches for a cursor position inside this element or above it.
Reimplemented from BasicElement.
Definition at line 124 of file bracketelement.cc.
void SingleContentElement::moveDown | ( | FormulaCursor * | cursor, | |
BasicElement * | from | |||
) | [virtual] |
Enters this element while moving down starting inside the element `from'.
Searches for a cursor position inside this element or below it.
Reimplemented from BasicElement.
Definition at line 129 of file bracketelement.cc.
void SingleContentElement::remove | ( | FormulaCursor * | , | |
QPtrList< BasicElement > & | , | |||
Direction | ||||
) | [virtual] |
Removes all selected children and returns them.
Places the cursor to where the children have been.
We remove ourselve if we are requested to remove our content.
Reimplemented from BasicElement.
Definition at line 134 of file bracketelement.cc.
void SingleContentElement::normalize | ( | FormulaCursor * | , | |
Direction | ||||
) | [virtual] |
Moves the cursor to a normal place where new elements might be inserted.
Reimplemented from BasicElement.
Definition at line 146 of file bracketelement.cc.
SequenceElement * SingleContentElement::getMainChild | ( | ) | [virtual] |
Removes the child.
If this was the main child this element might request its own removal. The cursor is the one that caused the removal. It has to be moved to the place any user expects the cursor after that particular element has been removed.
Reimplemented from BasicElement.
Definition at line 156 of file bracketelement.cc.
void SingleContentElement::selectChild | ( | FormulaCursor * | cursor, | |
BasicElement * | child | |||
) | [virtual] |
Sets the cursor to select the child.
The mark is placed before, the position behind it.
Reimplemented from BasicElement.
Definition at line 161 of file bracketelement.cc.
void SingleContentElement::writeDom | ( | QDomElement | element | ) | [protected, virtual] |
Appends our attributes to the dom element.
Reimplemented from BasicElement.
Reimplemented in BracketElement.
Definition at line 168 of file bracketelement.cc.
bool SingleContentElement::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 179 of file bracketelement.cc.
int SingleContentElement::readContentFromMathMLDom | ( | QDomNode & | node | ) | [protected, virtual] |
Reads our content from the MathML node.
Sets the node to the next node that needs to be read. Returns false if it failed.
Reimplemented from BasicElement.
Reimplemented in BracketElement.
Definition at line 194 of file bracketelement.cc.
The documentation for this class was generated from the following files: