lib
FormulaElement Class Reference
#include <formulaelement.h>
Inheritance diagram for FormulaElement:

Detailed Description
The main element.A formula consists of a FormulaElement and its children. The only element that has no parent.
Definition at line 40 of file formulaelement.h.
Public Member Functions | |
FormulaElement (FormulaDocument *container) | |
virtual FormulaElement * | clone () |
BasicElement * | goToPos (FormulaCursor *, const LuPixelPoint &point) |
virtual bool | readOnly (const BasicElement *) const |
virtual bool | readOnly (const FormulaCursor *) const |
virtual FormulaElement * | formula () |
virtual const FormulaElement * | formula () const |
void | elementRemoval (BasicElement *child) |
virtual void | changed () |
void | cursorHasMoved (FormulaCursor *) |
void | moveOutLeft (FormulaCursor *) |
void | moveOutRight (FormulaCursor *) |
void | moveOutBelow (FormulaCursor *) |
void | moveOutAbove (FormulaCursor *) |
void | tell (const QString &msg) |
void | removeFormula (FormulaCursor *) |
void | insertFormula (FormulaCursor *) |
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) |
void | calcSizes (ContextStyle &context) |
void | draw (QPainter &painter, const LuPixelRect &r, ContextStyle &context) |
virtual KCommand * | buildCommand (Container *, Request *) |
const SymbolTable & | getSymbolTable () const |
virtual QString | toLatex () |
int | getBaseSize () const |
void | setBaseSize (int size) |
bool | hasOwnBaseSize () const |
virtual KCommand * | input (Container *container, QKeyEvent *event) |
virtual void | writeMathML (QDomDocument &doc, QDomNode parent, bool oasisFormat=false) |
virtual void | writeDom (QDomElement element) |
QDomElement | emptyFormulaElement (QDomDocument &doc) |
Protected Member Functions | |
virtual QString | getTagName () const |
virtual bool | readAttributesFromDom (QDomElement element) |
virtual bool | readContentFromDom (QDomNode &node) |
Constructor & Destructor Documentation
|
The container this FormulaElement belongs to must not be 0, except you really know what you are doing.
Definition at line 34 of file formulaelement.cc. |
Member Function Documentation
|
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 170 of file formulaelement.cc. |
|
Calculates the formulas sizes and positions.
Definition at line 140 of file formulaelement.cc. |
|
Calculates our width and height and our children's parentPosition.
Reimplemented from SequenceElement. Definition at line 119 of file formulaelement.cc. |
|
Gets called whenever something changes and we need to recalc.
Definition at line 74 of file formulaelement.cc. |
|
Gets called when a request has the side effect of moving the cursor. In the end any operation that moves the cursor should call this. Definition at line 79 of file formulaelement.cc. |
|
Draws the whole thing.
Definition at line 156 of file formulaelement.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. Reimplemented from SequenceElement. Definition at line 127 of file formulaelement.cc. |
|
Gets called just before the child is removed from the element tree.
Definition at line 69 of file formulaelement.cc. |
|
For copy&paste we need to create an empty XML element.
Definition at line 187 of file formulaelement.cc. |
|
Provide fast access to the rootElement for each child.
Reimplemented from BasicElement. Definition at line 75 of file formulaelement.h. |
|
Provide fast access to the rootElement for each child.
Reimplemented from BasicElement. Definition at line 70 of file formulaelement.h. |
|
Definition at line 181 of file formulaelement.cc. |
|
Returns the tag name of this element type.
Reimplemented from SequenceElement. Definition at line 190 of file formulaelement.h. |
|
Returns the element the point is in.
Definition at line 56 of file formulaelement.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 SequenceElement. Definition at line 199 of file formulaelement.cc. |
|
Reads our attributes from the element. Returns false if it failed. Reimplemented from SequenceElement. Definition at line 235 of file formulaelement.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 SequenceElement. Definition at line 268 of file formulaelement.cc. |
|
Reimplemented from SequenceElement. Definition at line 65 of file formulaelement.h. |
|
Ordinary formulas are not write protected.
Reimplemented from BasicElement. Definition at line 60 of file formulaelement.h. |
|
Gets called when the formula wants to vanish. The one who holds it should create an appropriate command and execute it. Definition at line 109 of file formulaelement.cc. |
|
Tell the user something has happened.
Definition at line 104 of file formulaelement.cc. |
|
Reimplemented from SequenceElement. Definition at line 308 of file formulaelement.cc. |
|
Appends our attributes to the dom element.
Reimplemented from SequenceElement. Definition at line 222 of file formulaelement.cc. |
|
Same as above, just MathML.
Reimplemented from SequenceElement. Definition at line 313 of file formulaelement.cc. |
The documentation for this class was generated from the following files: