68class KOFORMULA_EXPORT
Document :
public TQObject {
80 Document( TQObject *parent=0,
const char *name=0,
81 const TQStringList &args=TQStringList() );
87 virtual Container* createFormula(
int pos=-1,
bool registerMe=
true );
93 virtual void registerFormula(
Container*,
int pos=-1 );
99 virtual void unregisterFormula(
Container* );
106 virtual void enableEvaluation(
bool ) {}
112 bool loadXML(
const TQDomDocument& doc );
118 bool loadOasis(
const TQDomDocument& doc );
123 bool loadDocumentPart( TQDomElement node );
128 TQDomDocument saveXML();
133 TQDomElement saveDocumentPart( TQDomDocument& doc );
146 void setZoomAndResolution(
int zoom,
int dpiX,
int dpiY );
148 void newZoomAndResolution(
bool updateViews,
bool forPrint );
153 void setZoomAndResolution(
int zoom,
double zoomX,
double zoomY,
154 bool updateViews=
false,
bool forPrint=
false );
156 double getXResolution()
const;
157 double getYResolution()
const;
167 void setEnabled(
bool enabled );
188 static TQDomDocument createDomDocument();
194 TQDomDocument createMathMLDomDocument();
202 void setCreationStrategy( TQString strategy );
209 TQPtrListIterator<Container> formulas();
211 SymbolType leftBracketChar();
212 SymbolType rightBracketChar();
237 void sortFormulaList();
303 TDEConfig* config() {
return m_config; }
314 void setEnabled(
bool enabled );
320 void document(
Document* document,
bool init =
true );
322 TDEAction* getAddNegThinSpaceAction() {
return m_addNegThinSpaceAction; }
323 TDEAction* getAddThinSpaceAction() {
return m_addThinSpaceAction; }
324 TDEAction* getAddMediumSpaceAction() {
return m_addMediumSpaceAction; }
325 TDEAction* getAddThickSpaceAction() {
return m_addThickSpaceAction; }
326 TDEAction* getAddQuadSpaceAction() {
return m_addQuadSpaceAction; }
327 TDEAction* getAddBracketAction() {
return m_addBracketAction; }
328 TDEAction* getAddSBracketAction() {
return m_addSBracketAction;}
329 TDEAction* getAddCBracketAction() {
return m_addCBracketAction;}
330 TDEAction* getAddAbsAction() {
return m_addAbsAction;}
331 TDEAction* getAddFractionAction() {
return m_addFractionAction; }
332 TDEAction* getAddRootAction() {
return m_addRootAction; }
333 TDEAction* getAddSumAction() {
return m_addSumAction; }
334 TDEAction* getAddProductAction() {
return m_addProductAction; }
335 TDEAction* getAddIntegralAction() {
return m_addIntegralAction; }
336 TDEAction* getAddMatrixAction() {
return m_addMatrixAction; }
337 TDEAction* getAddOneByTwoMatrixAction(){
return m_addOneByTwoMatrixAction; }
338 TDEAction* getAddUpperLeftAction() {
return m_addUpperLeftAction; }
339 TDEAction* getAddLowerLeftAction() {
return m_addLowerLeftAction; }
340 TDEAction* getAddUpperRightAction() {
return m_addUpperRightAction; }
341 TDEAction* getAddLowerRightAction() {
return m_addLowerRightAction; }
342 TDEAction* getAddGenericUpperAction() {
return m_addGenericUpperAction; }
343 TDEAction* getAddGenericLowerAction() {
return m_addGenericLowerAction; }
344 TDEAction* getAddOverlineAction() {
return m_addOverlineAction; }
345 TDEAction* getAddUnderlineAction() {
return m_addUnderlineAction; }
346 TDEAction* getAddMultilineAction() {
return m_addMultilineAction; }
347 TDEAction* getRemoveEnclosingAction() {
return m_removeEnclosingAction; }
348 TDEAction* getMakeGreekAction() {
return m_makeGreekAction; }
349 TDEAction* getInsertSymbolAction() {
return m_insertSymbolAction; }
351 TDEAction* getAppendColumnAction() {
return m_appendColumnAction; }
352 TDEAction* getInsertColumnAction() {
return m_insertColumnAction; }
353 TDEAction* getRemoveColumnAction() {
return m_removeColumnAction; }
354 TDEAction* getAppendRowAction() {
return m_appendRowAction; }
355 TDEAction* getInsertRowAction() {
return m_insertRowAction; }
356 TDEAction* getRemoveRowAction() {
return m_removeRowAction; }
358 void enableMatrixActions(
bool);
361 SymbolAction* getSymbolNamesAction() {
return m_symbolNamesAction; }
363 {
return m_syntaxHighlightingAction; }
365 TDEToggleAction* getFormatItalicAction() {
return m_formatItalicAction; }
370 SymbolType leftBracketChar()
const {
return m_leftBracketChar; }
371 SymbolType rightBracketChar()
const {
return m_rightBracketChar; }
386 void addNegThinSpace();
388 void addMediumSpace();
389 void addThickSpace();
391 void addDefaultBracket();
392 void addBracket( SymbolType left, SymbolType right );
393 void addParenthesis();
394 void addSquareBracket();
395 void addCurlyBracket();
396 void addLineBracket();
402 void addMatrix( uint rows=0, uint columns=0 );
403 void addOneByTwoMatrix();
404 void addNameSequence();
405 void addLowerLeftIndex();
406 void addUpperLeftIndex();
407 void addLowerRightIndex();
408 void addUpperRightIndex();
409 void addGenericLowerIndex();
410 void addGenericUpperIndex();
414 void removeEnclosing();
417 void insertSymbol( TQString name );
426 void toggleSyntaxHighlighting();
429 void delimiterLeft();
430 void delimiterRight();
439 void initSymbolNamesAction();
442 bool hasFormula() {
return m_document->hasFormula(); }
443 Container* formula() {
return m_document->m_formula; }
489 SymbolAction* m_symbolNamesAction;
494 SymbolType m_leftBracketChar;
495 SymbolType m_rightBracketChar;
496 TQString m_selectedName;
Contains all the style information for the formela.
The command history stores a (user) configurable amount of Commands.