filters

formula.h

00001 /* A TEXT IS A SET OF TITLES, A (SET OF) PARAGRAPHS OR LISTS */
00002 /*
00003 ** Header file for inclusion with kword_xml2latex.c
00004 **
00005 ** Copyright (C) 2000 Robert JACOLIN
00006 **
00007 ** This library is free software; you can redistribute it and/or
00008 ** modify it under the terms of the GNU Library General Public
00009 ** License as published by the Free Software Foundation; either
00010 ** version 2 of the License, or (at your option) any later version.
00011 **
00012 ** This library is distributed in the hope that it will be useful,
00013 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 ** Library General Public License for more details.
00016 **
00017 ** To receive a copy of the GNU Library General Public License, write to the
00018 ** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020 **
00021 */
00022 
00023 #ifndef __KWORD_LATEXFORMULA__
00024 #define __KWORD_LATEXFORMULA__
00025 
00026 #include "element.h"
00027 #include <qstring.h>
00028 #include <qtextstream.h>
00029 
00030 /***********************************************************************/
00031 /* Class: Formula                                                      */
00032 /***********************************************************************/
00033 
00038 class Formula: public Element
00039 {
00040     /* DATA MARKUP */
00041     int      _left,
00042          _top,
00043          _right,
00044          _bottom;
00045     TAround  _runaround;
00046     double   _runaroundGap;
00047     TCreate  _autoCreate;
00048     TNFrame  _newFrameBehaviour;
00049     TSide   _sheetSide;
00050 
00051     /* CHILDREN MARKUPS */
00052     QString  _formula;
00053 
00054     public:
00060         Formula();
00061 
00062         /* 
00063          * Destructor
00064          *
00065          * Nothing to do.
00066          */
00067         virtual ~Formula() {
00068             kdDebug(30522) << "Destruction of a formula" << endl; }
00069 
00073         /*bool    hasColor      () const;
00074         bool    hasUline      () const;*/
00075         TAround getRunAround  () const { return _runaround;         }
00076         double  getAroundGap  () const { return _runaroundGap;      }
00077         TCreate getAutoCreate () const { return _autoCreate;        }
00078         TNFrame getNewFrame   () const { return _newFrameBehaviour; }
00079         TSide   getSheetSide  () const { return _sheetSide;         }
00080 
00081         void getFormula(QDomNode, int);
00082 
00086         void setRunAround (const int a)    { _runaround = (TAround) a;  }
00087         void setAroundGap (const double r) { _runaroundGap = r;         }
00088         void setAutoCreate(const int a)    { _autoCreate = (TCreate) a; }
00089         void setNewFrame  (const int n)    { _newFrameBehaviour = (TNFrame) n; }
00090         void setSheetSide (const int s)    { _sheetSide = (TSide) s;    }
00091 
00100         void analyse(const QDomNode);
00101 
00105         void generate(QTextStream&);
00106 
00107     private:
00108         void analyseParamFrame(const QDomNode);
00109 };
00110 
00111 #endif /* __KWORD_LATEXFORMULA_H__ */
KDE Home | KDE Accessibility Home | Description of Access Keys