00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef UNDEROVERELEMENT_H
00022 #define UNDEROVERELEMENT_H
00023
00024 #include "BasicElement.h"
00025
00026 namespace KFormula {
00027
00035 class UnderOverElement : public BasicElement {
00036 public:
00038 UnderOverElement( BasicElement* parent = 0 );
00039
00041 virtual ~UnderOverElement();
00042
00047 virtual const QList<BasicElement*> childElements();
00048
00049 void insertInBaseElement( int index, BasicElement* element );
00050 void insertInUnderElement( int index, BasicElement* element );
00051 void insertInOverElement( int index, BasicElement* element );
00052
00053 void readMathML( const QDomElement& element );
00054
00056 void writeMathML( KoXmlWriter* writer, bool oasisFormat = false );
00057
00058 virtual void calcSizes( const ContextStyle& context,
00059 ContextStyle::TextStyle tstyle,
00060 ContextStyle::IndexStyle istyle,
00061 StyleAttributes& style );
00062
00063 virtual void draw( QPainter& painter, const LuPixelRect& r,
00064 const ContextStyle& context,
00065 ContextStyle::TextStyle tstyle,
00066 ContextStyle::IndexStyle istyle,
00067 StyleAttributes& style,
00068 const LuPixelPoint& parentOrigin );
00069
00070 private:
00071 virtual QString getElementName() const ;
00072 virtual void writeMathMLAttributes( QDomElement& element ) const ;
00073 virtual void writeMathMLContent( QDomDocument& doc,
00074 QDomElement& element,
00075 bool oasisFormat ) const ;
00076
00077 virtual bool readAttributesFromMathMLDom( const QDomElement& element );
00084 virtual int readContentFromMathMLDom( QDomNode& node );
00085
00086 BasicElement* m_baseElement;
00087
00088 BasicElement* m_underElement;
00089
00090 BasicElement* m_overElement;
00091 };
00092
00093 }
00094
00095 #endif // UNDEROVERELEMENT_H