lib
Document Class Reference
#include <kformuladocument.h>
Detailed Description
A document that can contain a lot of formulas (container).The relationship between the document and its formulas is an open one. The document sure owns the formulas and when it vanishes the formulas will be destroyed, too. But the user will most often work with those formulas directly and not bother to ask the document. It's legal to directly create or destroy a Container object.
Definition at line 68 of file kformuladocument.h.
Public Member Functions | |
Document (QObject *parent=0, const char *name=0, const QStringList &args=QStringList()) | |
~Document () | |
virtual Container * | createFormula (int pos=-1, bool registerMe=true) |
virtual void | registerFormula (Container *, int pos=-1) |
virtual void | unregisterFormula (Container *) |
virtual void | evaluateFormulas () |
virtual void | enableEvaluation (bool) |
bool | loadXML (const QDomDocument &doc) |
bool | loadOasis (const QDomDocument &doc) |
bool | loadDocumentPart (QDomElement node) |
QDomDocument | saveXML () |
QDomElement | saveDocumentPart (QDomDocument &doc) |
ContextStyle & | getContextStyle (bool edit=false) |
void | setZoomAndResolution (int zoom, int dpiX, int dpiY) |
void | newZoomAndResolution (bool updateViews, bool forPrint) |
void | setZoomAndResolution (int zoom, double zoomX, double zoomY, bool updateViews=false, bool forPrint=false) |
double | getXResolution () const |
double | getYResolution () const |
void | activate (Container *formula) |
void | setEnabled (bool enabled) |
KoCommandHistory * | getHistory () const |
const SymbolTable & | getSymbolTable () const |
void | updateConfig () |
QDomDocument | createMathMLDomDocument () |
void | setCreationStrategy (QString strategy) |
QPtrListIterator< Container > | formulas () |
SymbolType | leftBracketChar () |
SymbolType | rightBracketChar () |
DocumentWrapper * | wrapper () |
Static Public Member Functions | |
static QDomDocument | createDomDocument () |
Protected Member Functions | |
int | formulaPos (Container *formula) |
Container * | formulaAt (uint pos) |
int | formulaCount () |
void | sortFormulaList () |
Friends | |
class | DocumentWrapper |
class | Container |
Constructor & Destructor Documentation
Document::Document | ( | QObject * | parent = 0 , |
|
const char * | name = 0 , |
|||
const QStringList & | args = QStringList() | |||
) |
Member Function Documentation
Container * Document::createFormula | ( | int | pos = -1 , |
|
bool | registerMe = true | |||
) | [virtual] |
void Document::registerFormula | ( | Container * | , | |
int | pos = -1 | |||
) | [virtual] |
Registers a new formula to be part of this document.
Each formula must be part of exactly one document.
Definition at line 237 of file kformuladocument.cc.
void Document::unregisterFormula | ( | Container * | ) | [virtual] |
Removes a formula from this document.
The formula will stay alive and might be registered again.
Definition at line 250 of file kformuladocument.cc.
virtual void Document::evaluateFormulas | ( | ) | [inline, virtual] |
Triggers the evaluation of the whole document.
This obviously required evaluation support.
Definition at line 104 of file kformuladocument.h.
bool Document::loadXML | ( | const QDomDocument & | doc | ) |
Load a kformula DomDocument with all its formulas.
This must only be called on a virgin document.
Definition at line 125 of file kformuladocument.cc.
bool Document::loadOasis | ( | const QDomDocument & | doc | ) |
bool Document::loadDocumentPart | ( | QDomElement | node | ) |
QDomDocument Document::saveXML | ( | ) |
QDomElement Document::saveDocumentPart | ( | QDomDocument & | doc | ) |
ContextStyle & Document::getContextStyle | ( | bool | edit = false |
) |
void Document::setZoomAndResolution | ( | int | zoom, | |
int | dpiX, | |||
int | dpiY | |||
) |
Change the zoom factor to z
(e.g.
150 for 150%) and/or change the resolution, given in DPI. Uses the KoTextZoomHandler.
Definition at line 299 of file kformuladocument.cc.
void Document::setZoomAndResolution | ( | int | zoom, | |
double | zoomX, | |||
double | zoomY, | |||
bool | updateViews = false , |
|||
bool | forPrint = false | |||
) |
Sets the zoom by hand.
This is to be used in paintContent
.
Definition at line 311 of file kformuladocument.cc.
void Document::activate | ( | Container * | formula | ) |
void Document::setEnabled | ( | bool | enabled | ) |
KoCommandHistory * Document::getHistory | ( | ) | const |
- Returns:
- our undo stack so the formulas can use it.
Definition at line 338 of file kformuladocument.cc.
const SymbolTable & Document::getSymbolTable | ( | ) | const |
void Document::updateConfig | ( | ) |
Gets called when the configuration changed.
(Maybe we can find a better solution.)
Definition at line 354 of file kformuladocument.cc.
QDomDocument Document::createDomDocument | ( | ) | [static] |
QDomDocument Document::createMathMLDomDocument | ( | ) |
Create a MathML Dom Document, deprecates KFO Dom Document for internal layout TODO: Shouldn't this go to KoDocument ?
Definition at line 206 of file kformuladocument.cc.
void Document::setCreationStrategy | ( | QString | strategy | ) |
Set formula creation strategy: old KFormula or MathML/ODF.
This tells which tags are valid during formula constructions
- Parameters:
-
strategy -- "Ordinary" for old Kformula, "Oasis" for MathML/ODF
Definition at line 225 of file kformuladocument.cc.
QPtrListIterator< Container > Document::formulas | ( | ) |
- Returns:
- an iterator for the collection of formulas.
Definition at line 101 of file kformuladocument.cc.
int Document::formulaPos | ( | Container * | formula | ) | [protected] |
- Returns:
- the internal position of this formula or -1 if it doesn't belong to us.
Definition at line 107 of file kformuladocument.cc.
Container * Document::formulaAt | ( | uint | pos | ) | [protected] |
int Document::formulaCount | ( | ) | [protected] |
- Returns:
- the number of formulas in this document.
Definition at line 119 of file kformuladocument.cc.
void Document::sortFormulaList | ( | ) | [protected] |
Sorts the list of formulas according to their screen positions.
Definition at line 264 of file kformuladocument.cc.
The documentation for this class was generated from the following files: