00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef FORMULASHAPE_H
00021 #define FORMULASHAPE_H
00022
00023 #include <KoShape.h>
00024 #include <QDomDocument>
00025 class KoXmlWriter;
00026
00027 #define FormulaShape_SHAPEID "FormulaShapeID"
00028
00029 namespace KFormula {
00030
00031 class BasicElement;
00032
00038 class KOFORMULA_EXPORT FormulaShape : public KoShape {
00039 public:
00041 FormulaShape();
00042
00044 ~FormulaShape();
00045
00047 void paint( QPainter &painter, KoViewConverter &converter );
00048
00050 void paintDecorations( QPainter &painter, const KoViewConverter &converter,
00051 bool selected );
00052
00054 BasicElement* elementAt( const QPointF& p );
00055
00057 void resize( const QSizeF &size );
00058
00060 QSizeF size() const;
00061
00063 QRectF boundingRect() const;
00064
00066 BasicElement* formulaElement() const;
00067
00073 void loadMathML( const QDomDocument &doc, bool oasisFormat = false );
00074
00080 void saveMathML( KoXmlWriter* writer, bool oasisFormat = false );
00081
00082 private:
00084 BasicElement* m_formulaElement;
00085 };
00086
00087 }
00088
00089 #endif // FORMULASHAPE_H