lib
SequenceElement Class Reference
#include <sequenceelement.h>
Inheritance diagram for SequenceElement:

Detailed Description
The element that contains a number of children.The children are aligned in one line.
Definition at line 40 of file sequenceelement.h.
Public Types | |
typedef ChildIterator | iterator |
Public Member Functions | |
SequenceElement (BasicElement *parent=0) | |
~SequenceElement () | |
SequenceElement (const SequenceElement &) | |
virtual SequenceElement * | clone () |
virtual bool | accept (ElementVisitor *visitor) |
virtual bool | readOnly (const FormulaCursor *) const |
virtual bool | isTextOnly () const |
virtual BasicElement * | goToPos (FormulaCursor *, bool &handled, const LuPixelPoint &point, const LuPixelPoint &parentOrigin) |
void | setSizeReduction (const ContextStyle &context) |
bool | isEmpty () |
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) |
virtual void | drawEmptyRect (QPainter &painter, const ContextStyle &context, const LuPixelPoint &upperLeft) |
virtual void | calcCursorSize (const ContextStyle &context, FormulaCursor *cursor, bool smallCursor) |
virtual void | drawCursor (QPainter &painter, const ContextStyle &context, FormulaCursor *cursor, bool smallCursor, bool activeCursor) |
virtual void | moveLeft (FormulaCursor *cursor, BasicElement *from) |
virtual void | moveRight (FormulaCursor *cursor, BasicElement *from) |
virtual void | moveWordLeft (FormulaCursor *cursor) |
virtual void | moveWordRight (FormulaCursor *cursor) |
virtual void | moveUp (FormulaCursor *cursor, BasicElement *from) |
virtual void | moveDown (FormulaCursor *cursor, BasicElement *from) |
virtual void | moveHome (FormulaCursor *cursor) |
virtual void | moveEnd (FormulaCursor *cursor) |
virtual void | goInside (FormulaCursor *cursor) |
virtual void | insert (FormulaCursor *, QPtrList< BasicElement > &, Direction) |
virtual void | remove (FormulaCursor *, QPtrList< BasicElement > &, Direction) |
virtual void | normalize (FormulaCursor *, Direction) |
virtual BasicElement * | getChild (FormulaCursor *, Direction=beforeCursor) |
virtual void | selectChild (FormulaCursor *cursor, BasicElement *child) |
virtual void | childWillVanish (FormulaCursor *cursor, BasicElement *child) |
int | countChildren () const |
bool | isChildNumber (uint pos, BasicElement *child) |
void | selectAllChildren (FormulaCursor *cursor) |
bool | onlyTextSelected (FormulaCursor *cursor) |
virtual KCommand * | buildCommand (Container *, Request *) |
virtual KCommand * | input (Container *container, QChar ch) |
virtual KCommand * | input (Container *container, QKeyEvent *event) |
virtual void | parse () |
void | getChildrenDom (QDomDocument &doc, QDomElement elem, uint from, uint to) |
bool | buildChildrenFromDom (QPtrList< BasicElement > &list, QDomNode n) |
virtual QString | toLatex () |
virtual QString | formulaString () |
virtual void | writeMathML (QDomDocument &doc, QDomNode parent, bool oasisFormat=false) |
BasicElement * | getChild (uint i) |
int | childPos (BasicElement *child) |
int | childPos (const BasicElement *child) const |
iterator | begin () |
iterator | end () |
Static Public Member Functions | |
static void | setCreationStrategy (ElementCreationStrategy *strategy) |
Protected Member Functions | |
virtual QString | getTagName () const |
virtual void | writeDom (QDomElement element) |
virtual bool | readAttributesFromDom (QDomElement element) |
virtual bool | readContentFromDom (QDomNode &node) |
virtual void | setChildrenPositions () |
virtual BasicElement * | createElement (QString type) |
luPixel | getChildPosition (const ContextStyle &context, uint child) |
virtual bool | isFirstOfToken (BasicElement *child) |
Classes | |
class | ChildIterator |
Member Function Documentation
|
Visit this element. An implementation of the visitor pattern. Implements BasicElement. Reimplemented in NameSequence. Definition at line 94 of file sequenceelement.cc. |
|
Builds elements from the given node and its siblings and puts them into the list. Returns false if an error occures. Definition at line 1327 of file sequenceelement.cc. |
|
This is called by the container to get a command depending on the current cursor position (this is how the element gets chosen) and the request.
Reimplemented from BasicElement. Reimplemented in FormulaElement, and NameSequence. Definition at line 887 of file sequenceelement.cc. |
|
Calculates our width and height and our children's parentPosition.
Implements BasicElement. Reimplemented in FormulaElement. Definition at line 172 of file sequenceelement.cc. |
|
Moves the cursor away from the given child. The cursor is guaranteed to be inside this element. Reimplemented from BasicElement. Definition at line 846 of file sequenceelement.cc. |
|
Definition at line 241 of file sequenceelement.h. |
|
Creates a new element with the given type.
Reimplemented in NameSequence. Definition at line 1357 of file sequenceelement.cc. |
|
Dispatch this FontCommand to all our TextElement children.
Reimplemented from BasicElement. Definition at line 301 of file sequenceelement.cc. |
|
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. Reimplemented in FormulaElement. Definition at line 248 of file sequenceelement.cc. |
|
If the cursor is inside a sequence it needs to be drawn.
Reimplemented in NameSequence. Definition at line 372 of file sequenceelement.cc. |
|
Definition at line 307 of file sequenceelement.h. |
|
Returns the child at the cursor. Does not care about the selection. Reimplemented from BasicElement. Definition at line 818 of file sequenceelement.cc. |
|
Definition at line 413 of file sequenceelement.cc. |
|
Stores the given childrens dom in the element.
Definition at line 1312 of file sequenceelement.cc. |
|
Returns the tag name of this element type.
Reimplemented from BasicElement. Reimplemented in FormulaElement, and NameSequence. Definition at line 366 of file sequenceelement.h. |
|
Sets the cursor inside this element to its start position. For most elements that is the main child. Reimplemented from BasicElement. Definition at line 667 of file sequenceelement.cc. |
|
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. Definition at line 109 of file sequenceelement.cc. |
|
Parses the input. It's the container which does create new elements because it owns the undo stack. But only the sequence knows what chars are allowed. Reimplemented from BasicElement. Reimplemented in FormulaElement. Definition at line 1154 of file sequenceelement.cc. |
|
Parses the input. It's the container which does create new elements because it owns the undo stack. But only the sequence knows what chars are allowed. Reimplemented in NameSequence. Definition at line 1231 of file sequenceelement.cc. |
|
Inserts all new children at the cursor position. Places the cursor according to the direction. The inserted elements will be selected. The list will be emptied but stays the property of the caller. Reimplemented from BasicElement. Definition at line 706 of file sequenceelement.cc. |
|
Definition at line 246 of file sequenceelement.h. |
|
Definition at line 155 of file sequenceelement.cc. |
|
Reimplemented in NameSequence. Definition at line 1437 of file sequenceelement.cc. |
|
Definition at line 63 of file sequenceelement.h. |
|
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 606 of file sequenceelement.cc. |
|
Moves the cursor to the last position in this sequence. (That is behind the last child.) Reimplemented from BasicElement. Definition at line 643 of file sequenceelement.cc. |
|
Moves the cursor to the first position in this sequence. (That is before the first child.) Reimplemented from BasicElement. Definition at line 625 of file sequenceelement.cc. |
|
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 442 of file sequenceelement.cc. |
|
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 498 of file sequenceelement.cc. |
|
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 586 of file sequenceelement.cc. |
|
Moves to the beginning of this word or if we are there already to the beginning of the previous.
Reimplemented in NameSequence. Definition at line 551 of file sequenceelement.cc. |
|
Moves to the end of this word or if we are there already to the end of the next.
Reimplemented in NameSequence. Definition at line 566 of file sequenceelement.cc. |
|
Moves the cursor to a normal place where new elements might be inserted.
Reimplemented from BasicElement. Definition at line 808 of file sequenceelement.cc. |
|
Parses the sequence and generates a new syntax tree. Has to be called after each modification. Definition at line 1401 of file sequenceelement.cc. |
|
Reads our attributes from the element. Returns false if it failed. Reimplemented from BasicElement. Reimplemented in FormulaElement. Definition at line 1378 of file sequenceelement.cc. |
|
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. Reimplemented in FormulaElement. Definition at line 1391 of file sequenceelement.cc. |
|
Reimplemented in FormulaElement. Definition at line 100 of file sequenceelement.cc. |
|
Removes all selected children and returns them. Places the cursor to where the children have been. Reimplemented from BasicElement. Definition at line 735 of file sequenceelement.cc. |
|
Selects all children. The cursor is put behind, the mark before them. Definition at line 866 of file sequenceelement.cc. |
|
Sets the cursor to select the child. The mark is placed before, the position behind it. Reimplemented from BasicElement. Definition at line 838 of file sequenceelement.cc. |
|
Sets the childrens' positions after their size has been calculated.
Definition at line 233 of file sequenceelement.cc. |
|
Tells the sequence to have a smaller size than its parant.
|
|
Reimplemented from BasicElement. Reimplemented in FormulaElement. Definition at line 1443 of file sequenceelement.cc. |
|
Appends our attributes to the dom element.
Reimplemented from BasicElement. Reimplemented in FormulaElement. Definition at line 1365 of file sequenceelement.cc. |
|
Same as above, just MathML.
Reimplemented from BasicElement. Reimplemented in FormulaElement, and NameSequence. Definition at line 1473 of file sequenceelement.cc. |
The documentation for this class was generated from the following files: