F:/KPlato/koffice/libs/kformula/UnderOverElement.h

Aller à la documentation de ce fichier.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2006 Martin Pfeiffer <hubipete@gmx.net>
00003    Copyright (C) 2006 Alfredo Beaumont Sainz <alfredo.beaumont@gmail.com>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018    Boston, MA 02110-1301, USA.
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 } // namespace KFormula
00094 
00095 #endif // UNDEROVERELEMENT_H

Généré le Wed Nov 22 23:41:01 2006 pour KPlato par  doxygen 1.5.1-p1