kformula/flake
SubSupElement Class Reference
Implementation of the msub, msup, msubsup elements. More...
#include <SubSupElement.h>

Public Member Functions | |
| SubSupElement (BasicElement *parent=0, ElementType elementType=SubSupScript) | |
| ~SubSupElement () | |
| QString | attributesDefaultValue (const QString &attribute) const |
| const QList< BasicElement * > | childElements () const |
| ElementType | elementType () const |
| virtual int | endPosition () const |
| void | layout (const AttributeManager *am) |
| virtual bool | moveCursor (FormulaCursor &newcursor, FormulaCursor &oldcursor) |
| void | paint (QPainter &painter, AttributeManager *am) |
| virtual bool | setCursorTo (FormulaCursor &cursor, QPointF point) |
Protected Member Functions | |
| bool | readMathMLContent (const KoXmlElement &element) |
| void | writeMathMLContent (KoXmlWriter *writer) const |
Detailed Description
Implementation of the msub, msup, msubsup elements.
Definition at line 30 of file SubSupElement.h.
Constructor & Destructor Documentation
| SubSupElement::SubSupElement | ( | BasicElement * | parent = 0, |
|
| ElementType | elementType = SubSupScript | |||
| ) |
The standard constructor.
Definition at line 29 of file SubSupElement.cpp.
| SubSupElement::~SubSupElement | ( | ) |
The destructor.
Definition at line 45 of file SubSupElement.cpp.
Member Function Documentation
Insert a new child at the cursor position.
- Parameters:
-
cursor The cursor holding the position where to insert child A BasicElement to insert
- Returns:
- The default value of the attribute for this element
Reimplemented from BasicElement.
Definition at line 121 of file SubSupElement.cpp.
| const QList< BasicElement * > SubSupElement::childElements | ( | ) | const [virtual] |
Obtain a list of all child elements of this element.
- Returns:
- a QList with pointers to all child elements
Reimplemented from BasicElement.
Definition at line 109 of file SubSupElement.cpp.
| ElementType SubSupElement::elementType | ( | ) | const [virtual] |
- Returns:
- The element's ElementType
Reimplemented from BasicElement.
Definition at line 127 of file SubSupElement.cpp.
| int SubSupElement::endPosition | ( | ) | const [virtual] |
- Returns:
- The last cusor position (number of available cursor positions - 1)
Reimplemented from FixedElement.
Definition at line 168 of file SubSupElement.cpp.
| void SubSupElement::layout | ( | const AttributeManager * | am | ) | [virtual] |
Calculate the size of the element and the positions of its children.
- Parameters:
-
am The AttributeManager providing information about attributes values
Reimplemented from BasicElement.
Definition at line 63 of file SubSupElement.cpp.
| bool SubSupElement::moveCursor | ( | FormulaCursor & | newcursor, | |
| FormulaCursor & | oldcursor | |||
| ) | [virtual] |
Move the cursor in the direction specified in cursor.
- Parameters:
-
newcursor the cursor we move around oldcursor the former cursor position
- Returns:
- true, if we moved the cursor
Reimplemented from BasicElement.
Definition at line 190 of file SubSupElement.cpp.
| void SubSupElement::paint | ( | QPainter & | painter, | |
| AttributeManager * | am | |||
| ) | [virtual] |
Render the element to the given QPainter.
- Parameters:
-
painter The QPainter to paint the element to am AttributeManager containing style info
Reimplemented from BasicElement.
Definition at line 56 of file SubSupElement.cpp.
| bool SubSupElement::readMathMLContent | ( | const KoXmlElement & | element | ) | [protected, virtual] |
Read all content from the node.
Reimplemented from BasicElement.
Definition at line 132 of file SubSupElement.cpp.
| bool SubSupElement::setCursorTo | ( | FormulaCursor & | cursor, | |
| QPointF | point | |||
| ) | [virtual] |
place the cursor at the the given point the point should be placed a the position in the element (or it's child) that is closest to the point in particular the point doesn't have to be within boundingBox()
- Parameters:
-
cursor The FormulaCursor to modify point The point in coordinates relative to the elements local coordinate system
- Returns:
- true, iff the cursor could be placed
Reimplemented from BasicElement.
Definition at line 174 of file SubSupElement.cpp.
| void SubSupElement::writeMathMLContent | ( | KoXmlWriter * | writer | ) | const [protected, virtual] |
Write all content to the KoXmlWriter.
Reimplemented from BasicElement.
Definition at line 155 of file SubSupElement.cpp.
The documentation for this class was generated from the following files:
