NameSequence Class Reference
The sequence thats a name. More...
#include <sequenceelement.h>
Inheritance diagram for NameSequence:

Public Member Functions | |
NameSequence (BasicElement *parent=0) | |
virtual NameSequence * | clone () |
virtual bool | accept (ElementVisitor *visitor) |
virtual QChar | getCharacter () const |
virtual TokenType | getTokenType () const |
virtual SequenceElement * | getMainChild () |
virtual void | calcCursorSize (const ContextStyle &context, FormulaCursor *cursor, bool smallCursor) |
virtual void | drawCursor (QPainter &painter, const ContextStyle &context, FormulaCursor *cursor, bool smallCursor) |
virtual void | moveWordLeft (FormulaCursor *cursor) |
virtual void | moveWordRight (FormulaCursor *cursor) |
virtual KCommand * | buildCommand (Container *, Request *) |
virtual KCommand * | input (Container *container, QChar ch) |
virtual void | setElementType (ElementType *t) |
BasicElement * | replaceElement (const SymbolTable &table) |
virtual void | writeMathML (QDomDocument doc, QDomNode parent) |
Static Public Member Functions | |
bool | isValidSelection (FormulaCursor *cursor) |
Protected Member Functions | |
virtual QString | getTagName () const |
virtual BasicElement * | createElement (QString type) |
virtual bool | isFirstOfToken (BasicElement *) |
Detailed Description
The sequence thats a name.Actually the purpose is to be able to insert any element by keyboard.
Definition at line 442 of file sequenceelement.h.
Member Function Documentation
|
Visit this element. An implementation of the visitor pattern. Reimplemented from SequenceElement. Definition at line 1494 of file sequenceelement.cc. References accept(), and ElementVisitor::visit(). Referenced by accept(). |
|
Reimplemented from BasicElement. Definition at line 464 of file sequenceelement.h. |
|
Reimplemented from BasicElement. Definition at line 470 of file sequenceelement.h. |
|
We are our own main child. This causes interessting effects. Reimplemented from BasicElement. Definition at line 475 of file sequenceelement.h. |
|
If the cursor is inside a sequence it needs to be drawn.
Reimplemented from SequenceElement. Definition at line 1511 of file sequenceelement.cc. References drawCursor(), ContextStyle::getEmptyColor(), ContextStyle::getLineWidth(), KoZoomHandler::layoutUnitToPixelX(), KoZoomHandler::layoutUnitToPixelY(), KoZoomHandler::ptToLayoutUnitPixX(), KoZoomHandler::ptToLayoutUnitPixY(), and BasicElement::widgetPos(). Referenced by drawCursor(). |
|
Moves to the beginning of this word or if we are there already to the beginning of the previous.
Reimplemented from SequenceElement. Definition at line 1527 of file sequenceelement.cc. References FormulaCursor::getPos(), moveWordLeft(), and FormulaCursor::setTo(). Referenced by moveWordLeft(). |
|
Moves to the end of this word or if we are there already to the end of the next.
Reimplemented from SequenceElement. Definition at line 1538 of file sequenceelement.cc. References SequenceElement::countChildren(), FormulaCursor::getPos(), moveWordRight(), and FormulaCursor::setTo(). Referenced by moveWordRight(). |
|
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 SequenceElement. Definition at line 1563 of file sequenceelement.cc. References buildCommand(). Referenced by buildCommand(), and input(). |
|
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 SequenceElement. Definition at line 1585 of file sequenceelement.cc. References buildCommand(), and input(). Referenced by input(). |
|
Sets a new type. This is done during parsing. Reimplemented from BasicElement. Definition at line 1624 of file sequenceelement.cc. References SequenceElement::parse(), and setElementType(). Referenced by setElementType(). |
|
Definition at line 1630 of file sequenceelement.cc. References replaceElement(), FractionElement::showLine(), and SymbolTable::unicode(). Referenced by replaceElement(). |
|
Tests whether the selected elements can be inserted in a name sequence.
Definition at line 1685 of file sequenceelement.cc. References isValidSelection(), FormulaCursor::normal(), and SequenceElement::onlyTextSelected(). Referenced by isValidSelection(). |
|
Same as above, just MathML.
Reimplemented from SequenceElement. Definition at line 1694 of file sequenceelement.cc. References SequenceElement::countChildren(), BasicElement::getCharacter(), and writeMathML(). Referenced by writeMathML(). |
|
Returns the tag name of this element type.
Reimplemented from SequenceElement. Definition at line 539 of file sequenceelement.h. |
|
Creates a new element with the given type.
Reimplemented from SequenceElement. Definition at line 1661 of file sequenceelement.cc. References createElement(). Referenced by createElement(). |
|
Reimplemented from SequenceElement. Definition at line 559 of file sequenceelement.h. |
The documentation for this class was generated from the following files: