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

Aller à la documentation de ce fichier.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2001 Andrea Rizzi <rizzi@kde.org>
00003    Copyright (C) 2001 Ulrich Kuettler <ulrich.kuettler@mailbox.tu-dresden.de>
00004    Copyright (C) 2006 Martin Pfeiffer <hubipete@gmx.net>
00005    Copyright (C) 2006 Alfredo Beaumont Sainz <alfredo.beaumont@gmail.com>
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    You should have received a copy of the GNU Library General Public License
00018    along with this library; see the file COPYING.LIB.  If not, write to
00019    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020    Boston, MA 02110-1301, USA.
00021 */
00022 
00023 #ifndef MATRIXROWELEMENT_H
00024 #define MATRIXROWELEMENT_H
00025 
00026 #include "BasicElement.h"
00027 
00028 
00029 #include "contextstyle.h"
00030 
00031 namespace KFormula {
00032         
00033 class MatrixEntryElement;
00034 
00038 class MatrixRowElement : public BasicElement {
00039     friend class KFCNewLine;
00040 
00041 public:
00043     MatrixRowElement( BasicElement* parent = 0 );
00044 
00046     ~MatrixRowElement();
00047 
00052     const QList<BasicElement*> childElements();
00053  
00055     int positionOfEntry( BasicElement* entry ) const;
00056 
00058     MatrixEntryElement* entryAt( int pos );
00059 
00065     void moveLeft( FormulaCursor* cursor, BasicElement* from );
00066 
00072     void moveRight( FormulaCursor* cursor, BasicElement* from );
00073 
00079     void moveUp( FormulaCursor* cursor, BasicElement* from );
00080 
00086     void moveDown( FormulaCursor* cursor, BasicElement* from );
00087     
00089     void readMathML( const QDomElement& element );
00090     
00092     void writeMathML( KoXmlWriter* writer, bool oasisFormat = false );
00093 
00094 
00095 
00096 
00097 
00102     virtual void goInside(FormulaCursor* cursor);
00103 
00104 
00106     virtual void calcSizes( const ContextStyle& context,
00107                             ContextStyle::TextStyle tstyle,
00108                             ContextStyle::IndexStyle istyle,
00109                             StyleAttributes& style );
00110 
00116     virtual void draw( QPainter& painter, const LuPixelRect& r,
00117                        const ContextStyle& context,
00118                        ContextStyle::TextStyle tstyle,
00119                        ContextStyle::IndexStyle istyle,
00120                        StyleAttributes& style,
00121                        const LuPixelPoint& parentOrigin );
00122 
00123     virtual void insert(FormulaCursor*, QList<BasicElement*>&, Direction);
00124     virtual void remove(FormulaCursor*, QList<BasicElement*>&, Direction);
00125 
00130     virtual void selectChild(FormulaCursor* cursor, BasicElement* child);
00131 
00132 
00133 protected:
00135     virtual QString getTagName() const { return "MULTILINE"; }
00136 
00138     virtual void writeDom(QDomElement element);
00139 
00141     virtual bool readAttributesFromDom(QDomElement element);
00142 
00147     virtual bool readContentFromDom( QDomNode& node );
00148 
00149 private:
00151     QList<MatrixEntryElement*> m_matrixEntryElements;
00152 };
00153 
00154 } // namespace KFormula
00155 
00156 #endif
00157 

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