lib Library API Documentation

SequenceElement Class Reference

The element that contains a number of children. More...

#include <sequenceelement.h>

Inheritance diagram for SequenceElement:

BasicElement FormulaElement NameSequence List of all members.

Public Types

typedef ChildIterator iterator

Public Member Functions

 SequenceElement (BasicElement *parent=0)
 SequenceElement (const SequenceElement &)
virtual SequenceElementclone ()
virtual bool accept (ElementVisitor *visitor)
virtual bool readOnly (const FormulaCursor *) const
virtual bool isTextOnly () const
virtual BasicElementgoToPos (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)
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 BasicElementgetChild (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)
BasicElementgetChild (uint i)
int childPos (BasicElement *child)
int childPos (const BasicElement *child) const
iterator begin ()
iterator end ()

Static Public Member Functions

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 BasicElementcreateElement (QString type)
luPixel getChildPosition (const ContextStyle &context, uint child)
virtual bool isFirstOfToken (BasicElement *child)

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.


Member Function Documentation

bool SequenceElement::accept ElementVisitor visitor  )  [virtual]
 

Visit this element.

An implementation of the visitor pattern.

Implements BasicElement.

Reimplemented in NameSequence.

Definition at line 94 of file sequenceelement.cc.

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

Referenced by accept().

bool SequenceElement::readOnly const FormulaCursor  )  const [virtual]
 

Returns:
whether its prohibited to change the sequence with this cursor.

Reimplemented in FormulaElement.

Definition at line 100 of file sequenceelement.cc.

References BasicElement::readOnly(), and readOnly().

Referenced by FormulaCursor::isReadOnly(), and readOnly().

virtual bool SequenceElement::isTextOnly  )  const [inline, virtual]
 

Returns:
true if the sequence contains only text.

Definition at line 63 of file sequenceelement.h.

Referenced by IndexElement::calcSizes(), BracketElement::calcSizes(), BracketElement::draw(), IndexElement::getCharacter(), and SingleContentElement::getCharacter().

BasicElement * SequenceElement::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.

Definition at line 109 of file sequenceelement.cc.

References countChildren(), BasicElement::getWidth(), BasicElement::getX(), BasicElement::goToPos(), goToPos(), and FormulaCursor::setTo().

Referenced by SymbolElement::goToPos(), goToPos(), RootElement::goToPos(), IndexElement::goToPos(), FractionElement::goToPos(), BracketElement::goToPos(), and SingleContentElement::goToPos().

void SequenceElement::setSizeReduction const ContextStyle context  ) 
 

Tells the sequence to have a smaller size than its parant.

bool SequenceElement::isEmpty  ) 
 

Returns:
true if there is no visible element in the sequence. Please note that there might be phantom elements.

Definition at line 155 of file sequenceelement.cc.

References BasicElement::isInvisible().

Referenced by calcSizes(), and draw().

void SequenceElement::calcSizes const ContextStyle style,
ContextStyle::TextStyle  tstyle,
ContextStyle::IndexStyle  istyle
[virtual]
 

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

Implements BasicElement.

Reimplemented in FormulaElement.

Definition at line 172 of file sequenceelement.cc.

References BasicElement::calcSizes(), calcSizes(), BasicElement::getBaseline(), BasicElement::getElementType(), BasicElement::getHeight(), ElementType::getSpaceBefore(), BasicElement::getWidth(), isEmpty(), isFirstOfToken(), BasicElement::isInvisible(), setChildrenPositions(), and BasicElement::setX().

Referenced by SymbolElement::calcSizes(), calcSizes(), RootElement::calcSizes(), MatrixElement::calcSizes(), IndexElement::calcSizes(), FractionElement::calcSizes(), UnderlineElement::calcSizes(), OverlineElement::calcSizes(), and BracketElement::calcSizes().

void SequenceElement::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.

Reimplemented in FormulaElement.

Definition at line 248 of file sequenceelement.cc.

References BasicElement::draw(), draw(), ElementType::end(), BasicElement::getElementType(), isEmpty(), BasicElement::isInvisible(), and ElementType::start().

Referenced by SymbolElement::draw(), draw(), RootElement::draw(), IndexElement::draw(), FractionElement::draw(), UnderlineElement::draw(), OverlineElement::draw(), and BracketElement::draw().

void SequenceElement::dispatchFontCommand FontCommand cmd  )  [virtual]
 

Dispatch this FontCommand to all our TextElement children.

Reimplemented from BasicElement.

Definition at line 301 of file sequenceelement.cc.

References BasicElement::dispatchFontCommand(), and dispatchFontCommand().

Referenced by SymbolElement::dispatchFontCommand(), dispatchFontCommand(), RootElement::dispatchFontCommand(), IndexElement::dispatchFontCommand(), FractionElement::dispatchFontCommand(), and SingleContentElement::dispatchFontCommand().

void SequenceElement::drawCursor QPainter painter,
const ContextStyle context,
FormulaCursor cursor,
bool  smallCursor
[virtual]
 

If the cursor is inside a sequence it needs to be drawn.

Reimplemented in NameSequence.

Definition at line 372 of file sequenceelement.cc.

References FormulaCursor::cursorSize, drawCursor(), FormulaCursor::getCursorPoint(), FormulaCursor::getCursorSize(), ContextStyle::getLineWidth(), FormulaCursor::isSelection(), KoZoomHandler::layoutUnitToPixelX(), and KoZoomHandler::layoutUnitToPixelY().

Referenced by FormulaCursor::draw(), and drawCursor().

void SequenceElement::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 440 of file sequenceelement.cc.

References BasicElement::formula(), FormulaCursor::getPos(), FormulaCursor::isSelectionMode(), moveLeft(), FormulaElement::moveOutLeft(), FormulaCursor::setMark(), FormulaCursor::setTo(), and FormulaElement::tell().

Referenced by SymbolElement::goToPos(), RootElement::goToPos(), IndexElement::goToPos(), FractionElement::goToPos(), RootElement::insert(), FractionElement::insert(), SymbolElement::moveDown(), IndexElement::moveDown(), SymbolElement::moveLeft(), moveLeft(), RootElement::moveLeft(), IndexElement::moveLeft(), FractionElement::moveLeft(), SingleContentElement::moveLeft(), RootElement::moveToIndex(), SymbolElement::moveUp(), IndexElement::moveUp(), moveWordLeft(), SymbolElement::normalize(), RootElement::normalize(), IndexElement::normalize(), and SingleContentElement::normalize().

void SequenceElement::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 496 of file sequenceelement.cc.

References BasicElement::formula(), FormulaCursor::getPos(), FormulaCursor::isSelectionMode(), FormulaElement::moveOutRight(), moveRight(), FormulaCursor::setMark(), FormulaCursor::setTo(), and FormulaElement::tell().

Referenced by SymbolElement::goToPos(), RootElement::insert(), FractionElement::insert(), SymbolElement::moveDown(), moveDown(), RootElement::moveDown(), IndexElement::moveDown(), FractionElement::moveDown(), SymbolElement::moveRight(), moveRight(), RootElement::moveRight(), IndexElement::moveRight(), FractionElement::moveRight(), SingleContentElement::moveRight(), RootElement::moveToIndex(), SymbolElement::moveUp(), moveUp(), RootElement::moveUp(), IndexElement::moveUp(), FractionElement::moveUp(), moveWordRight(), SymbolElement::normalize(), RootElement::normalize(), IndexElement::normalize(), and SingleContentElement::normalize().

void SequenceElement::moveWordLeft FormulaCursor cursor  )  [virtual]
 

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 549 of file sequenceelement.cc.

References FormulaCursor::getPos(), moveLeft(), moveWordLeft(), FormulaCursor::setTo(), and ElementType::start().

Referenced by moveWordLeft().

void SequenceElement::moveWordRight FormulaCursor cursor  )  [virtual]
 

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 564 of file sequenceelement.cc.

References ElementType::end(), FormulaCursor::getPos(), moveRight(), moveWordRight(), and FormulaCursor::setTo().

Referenced by moveWordRight().

void SequenceElement::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 584 of file sequenceelement.cc.

References BasicElement::formula(), FormulaElement::moveOutAbove(), moveRight(), and moveUp().

Referenced by moveUp().

void SequenceElement::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 604 of file sequenceelement.cc.

References BasicElement::formula(), moveDown(), FormulaElement::moveOutBelow(), and moveRight().

Referenced by moveDown().

void SequenceElement::moveHome FormulaCursor cursor  )  [virtual]
 

Moves the cursor to the first position in this sequence.

(That is before the first child.)

Reimplemented from BasicElement.

Definition at line 623 of file sequenceelement.cc.

References FormulaCursor::getElement(), BasicElement::getParent(), FormulaCursor::isSelectionMode(), moveHome(), FormulaCursor::setMark(), and FormulaCursor::setTo().

Referenced by moveHome().

void SequenceElement::moveEnd FormulaCursor cursor  )  [virtual]
 

Moves the cursor to the last position in this sequence.

(That is behind the last child.)

Reimplemented from BasicElement.

Definition at line 641 of file sequenceelement.cc.

References FormulaCursor::getElement(), BasicElement::getParent(), FormulaCursor::isSelectionMode(), moveEnd(), FormulaCursor::setMark(), and FormulaCursor::setTo().

Referenced by moveEnd().

void SequenceElement::goInside FormulaCursor cursor  )  [virtual]
 

Sets the cursor inside this element to its start position.

For most elements that is the main child.

Reimplemented from BasicElement.

Definition at line 665 of file sequenceelement.cc.

References goInside(), FormulaCursor::setSelection(), and FormulaCursor::setTo().

Referenced by buildCommand(), FormulaCursor::FormulaCursor(), FormulaCursor::formulaLoaded(), goInside(), and FormulaCursor::replaceSelectionWith().

void SequenceElement::insert FormulaCursor ,
QPtrList< BasicElement > &  ,
Direction 
[virtual]
 

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 704 of file sequenceelement.cc.

References FormulaElement::changed(), BasicElement::formula(), FormulaCursor::getPos(), insert(), parse(), BasicElement::setParent(), and FormulaCursor::setTo().

Referenced by insert().

void SequenceElement::remove FormulaCursor ,
QPtrList< BasicElement > &  ,
Direction 
[virtual]
 

Removes all selected children and returns them.

Places the cursor to where the children have been.

Reimplemented from BasicElement.

Definition at line 733 of file sequenceelement.cc.

References FormulaElement::changed(), FormulaElement::elementRemoval(), BasicElement::formula(), FormulaCursor::getPos(), FormulaCursor::getSelectionEnd(), FormulaCursor::getSelectionStart(), BasicElement::isInvisible(), FormulaCursor::isSelection(), parse(), remove(), FormulaCursor::setSelection(), and FormulaCursor::setTo().

Referenced by remove(), and FormulaCursor::remove().

void SequenceElement::normalize FormulaCursor cursor,
Direction 
[virtual]
 

Moves the cursor to a normal place where new elements might be inserted.

Reimplemented from BasicElement.

Definition at line 806 of file sequenceelement.cc.

References normalize(), and FormulaCursor::setSelection().

Referenced by normalize().

BasicElement * SequenceElement::getChild FormulaCursor ,
Direction  = beforeCursor
[virtual]
 

Returns the child at the cursor.

Does not care about the selection.

Reimplemented from BasicElement.

Definition at line 816 of file sequenceelement.cc.

References getChild(), and FormulaCursor::getPos().

Referenced by getChild(), and ElementType::text().

void SequenceElement::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 836 of file sequenceelement.cc.

References selectChild(), and FormulaCursor::setTo().

Referenced by FormulaCursor::getActiveMatrixElement(), and selectChild().

void SequenceElement::childWillVanish FormulaCursor cursor,
BasicElement child
[virtual]
 

Moves the cursor away from the given child.

The cursor is guaranteed to be inside this element.

Reimplemented from BasicElement.

Definition at line 844 of file sequenceelement.cc.

References childWillVanish(), FormulaCursor::getMark(), FormulaCursor::getPos(), and FormulaCursor::setTo().

Referenced by childWillVanish().

int SequenceElement::countChildren  )  const [inline]
 

Returns:
the number of children we have.

Definition at line 240 of file sequenceelement.h.

Referenced by buildCommand(), goToPos(), FormulaElement::goToPos(), Container::isEmpty(), FormulaCursor::isEnd(), NameSequence::moveWordRight(), FormulaCursor::remove(), FormulaCursor::replaceByMainChildContent(), and NameSequence::writeMathML().

bool SequenceElement::isChildNumber uint  pos,
BasicElement child
[inline]
 

Returns:
whether the child has the given number.

Definition at line 245 of file sequenceelement.h.

References isChildNumber().

Referenced by isChildNumber(), and isFirstOfToken().

void SequenceElement::selectAllChildren FormulaCursor cursor  ) 
 

Selects all children.

The cursor is put behind, the mark before them.

Definition at line 864 of file sequenceelement.cc.

References selectAllChildren(), and FormulaCursor::setTo().

Referenced by FormulaCursor::replaceByMainChildContent(), and selectAllChildren().

KCommand * SequenceElement::buildCommand Container ,
Request * 
[virtual]
 

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.

Returns:
the command that performs the requested action with the containers active cursor.

Reimplemented from BasicElement.

Reimplemented in FormulaElement, and NameSequence.

Definition at line 885 of file sequenceelement.cc.

References Container::activeCursor(), FontCommand::addElement(), KFCAdd::addElement(), buildCommand(), countChildren(), ElementCreationStrategy::createBracketElement(), ElementCreationStrategy::createEmptyElement(), ElementCreationStrategy::createFractionElement(), ElementCreationStrategy::createIndexElement(), ElementCreationStrategy::createMatrixElement(), ElementCreationStrategy::createMultilineElement(), ElementCreationStrategy::createNameSequence(), ElementCreationStrategy::createOverlineElement(), ElementCreationStrategy::createRootElement(), ElementCreationStrategy::createSpaceElement(), ElementCreationStrategy::createSymbolElement(), ElementCreationStrategy::createTextElement(), ElementCreationStrategy::createUnderlineElement(), FormulaElement::cursorHasMoved(), Container::document(), BasicElement::formula(), FormulaCursor::getActiveTextElement(), TextElement::getCharacter(), IndexElement::getIndex(), IndexElement::getMainChild(), FormulaCursor::getPos(), FormulaCursor::getSelectionEnd(), FormulaCursor::getSelectionStart(), Document::getSymbolTable(), goInside(), SymbolTable::greekLetters(), MatrixDialog::h, FormulaCursor::isReadOnly(), FormulaCursor::isSelection(), TextElement::isSymbol(), FormulaCursor::moveEnd(), FormulaCursor::moveLeft(), FormulaCursor::moveRight(), FormulaCursor::normal(), FormulaCursor::selectActiveElement(), KFCAddReplacing::setElement(), FormulaCursor::setSelection(), FractionElement::showLine(), FormulaElement::tell(), SymbolTable::unicodeFromSymbolFont(), and MatrixDialog::w.

Referenced by buildCommand(), and input().

KCommand * SequenceElement::input Container container,
QChar  ch
[virtual]
 

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 1229 of file sequenceelement.cc.

References buildCommand(), Container::document(), input(), Document::leftBracketChar(), and Document::rightBracketChar().

Referenced by input().

KCommand * SequenceElement::input Container container,
QKeyEvent event
[virtual]
 

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 1152 of file sequenceelement.cc.

References Container::activeCursor(), buildCommand(), FormulaElement::cursorHasMoved(), BasicElement::formula(), input(), FormulaCursor::moveDown(), FormulaCursor::moveEnd(), FormulaCursor::moveHome(), FormulaCursor::moveLeft(), FormulaCursor::moveRight(), and FormulaCursor::moveUp().

void SequenceElement::parse  )  [virtual]
 

Parses the sequence and generates a new syntax tree.

Has to be called after each modification.

Definition at line 1373 of file sequenceelement.cc.

References BasicElement::formula(), BasicElement::getCharacter(), BasicElement::getParent(), FormulaElement::getSymbolTable(), SequenceParser::parse(), and BasicElement::setElementType().

Referenced by buildChildrenFromDom(), insert(), remove(), and NameSequence::setElementType().

void SequenceElement::getChildrenDom QDomDocument  doc,
QDomElement  elem,
uint  from,
uint  to
 

Stores the given childrens dom in the element.

Definition at line 1284 of file sequenceelement.cc.

References getChildrenDom().

Referenced by FormulaCursor::copy(), getChildrenDom(), and writeDom().

bool SequenceElement::buildChildrenFromDom QPtrList< BasicElement > &  list,
QDomNode  n
 

Builds elements from the given node and its siblings and puts them into the list.

Returns false if an error occures.

Definition at line 1299 of file sequenceelement.cc.

References buildChildrenFromDom(), BasicElement::buildFromDom(), createElement(), parse(), and BasicElement::setParent().

Referenced by buildChildrenFromDom(), FormulaCursor::buildElementsFromDom(), and readContentFromDom().

QString SequenceElement::toLatex  )  [virtual]
 

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

Reimplemented from BasicElement.

Reimplemented in FormulaElement.

Definition at line 1415 of file sequenceelement.cc.

References isFirstOfToken(), and BasicElement::toLatex().

Referenced by SymbolElement::toLatex(), RootElement::toLatex(), IndexElement::toLatex(), FractionElement::toLatex(), UnderlineElement::toLatex(), OverlineElement::toLatex(), and BracketElement::toLatex().

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

Same as above, just MathML.

Reimplemented from BasicElement.

Reimplemented in FormulaElement, and NameSequence.

Definition at line 1447 of file sequenceelement.cc.

References BasicElement::getElementType(), ElementType::getPrev(), and writeMathML().

Referenced by SymbolElement::writeMathML(), writeMathML(), RootElement::writeMathML(), IndexElement::writeMathML(), FractionElement::writeMathML(), and SingleContentElement::writeMathML().

BasicElement* SequenceElement::getChild uint  i  )  [inline]
 

Returns:
the child at position i.

Definition at line 306 of file sequenceelement.h.

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

Returns the tag name of this element type.

Reimplemented from BasicElement.

Reimplemented in FormulaElement, and NameSequence.

Definition at line 363 of file sequenceelement.h.

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

Appends our attributes to the dom element.

Reimplemented from BasicElement.

Reimplemented in FormulaElement.

Definition at line 1337 of file sequenceelement.cc.

References getChildrenDom(), and writeDom().

Referenced by writeDom().

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

Reads our attributes from the element.

Returns false if it failed.

Reimplemented from BasicElement.

Reimplemented in FormulaElement.

Definition at line 1350 of file sequenceelement.cc.

References readAttributesFromDom().

Referenced by readAttributesFromDom().

bool SequenceElement::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.

Reimplemented in FormulaElement.

Definition at line 1363 of file sequenceelement.cc.

References buildChildrenFromDom(), and readContentFromDom().

Referenced by readContentFromDom().

void SequenceElement::setChildrenPositions  )  [protected, virtual]
 

Sets the childrens' positions after their size has been calculated.

See also:
calcSizes

Definition at line 233 of file sequenceelement.cc.

References BasicElement::getBaseline(), and BasicElement::setY().

Referenced by calcSizes().

BasicElement * SequenceElement::createElement QString  type  )  [protected, virtual]
 

Creates a new element with the given type.

Parameters:
type the desired type of the element

Reimplemented in NameSequence.

Definition at line 1329 of file sequenceelement.cc.

References ElementCreationStrategy::createElement(), and createElement().

Referenced by buildChildrenFromDom(), and createElement().

luPixel SequenceElement::getChildPosition const ContextStyle context,
uint  child
[protected]
 

Returns:
the position where the child starts.
Parameters:
child the child's number

Definition at line 411 of file sequenceelement.cc.

References getChildPosition(), and KoZoomHandler::ptToLayoutUnitPixX().

Referenced by getChildPosition().

bool SequenceElement::isFirstOfToken BasicElement child  )  [protected, virtual]
 

Returns:
whether the child is the first element of its token.

Reimplemented in NameSequence.

Definition at line 1409 of file sequenceelement.cc.

References BasicElement::getElementType(), isChildNumber(), isFirstOfToken(), and ElementType::start().

Referenced by calcSizes(), isFirstOfToken(), and toLatex().


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.5.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Nov 17 06:54:23 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003