lib

oasiscreationstrategy.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2006 Alfredo Beaumont Sainz <alfredo.beaumont@gmail.com>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 
00021 #ifndef OASISCREATIONSTRATEGY_H
00022 #define OASISCREATIONSTRATEGY_H
00023 
00024 
00025 #include <qstring.h>
00026 
00027 #include "kformuladefs.h"
00028 #include "creationstrategy.h"
00029 
00030 KFORMULA_NAMESPACE_BEGIN
00031 
00032 class BasicElement;
00033 class BracketElement;
00034 class EmptyElement;
00035 class FractionElement;
00036 class IndexElement;
00037 class MatrixElement;
00038 class MultilineElement;
00039 class NameSequence;
00040 class OverlineElement;
00041 class RootElement;
00042 class SpaceElement;
00043 class SymbolElement;
00044 class TextElement;
00045 class UnderlineElement;
00046 
00050 class OasisCreationStrategy : public ElementCreationStrategy {
00051 public:
00052     virtual BasicElement* createElement( QString type, const QDomElement& element );
00053 
00054     virtual TextElement* createTextElement( const QChar& ch, bool symbol=false );
00055     virtual EmptyElement* createEmptyElement();
00056     virtual NameSequence* createNameSequence();
00057     virtual BracketElement* createBracketElement( SymbolType lhs, SymbolType rhs );
00058     virtual OverlineElement* createOverlineElement();
00059     virtual UnderlineElement* createUnderlineElement();
00060     virtual MultilineElement* createMultilineElement();
00061     virtual SpaceElement* createSpaceElement( SpaceWidth width );
00062     virtual FractionElement* createFractionElement();
00063     virtual RootElement* createRootElement();
00064     virtual SymbolElement* createSymbolElement( SymbolType type );
00065     virtual MatrixElement* createMatrixElement( uint rows, uint columns );
00066     virtual IndexElement* createIndexElement();
00067     virtual IdentifierElement* createIdentifierElement();
00068     virtual OperatorElement* createOperatorElement();
00069     virtual NumberElement* createNumberElement();
00070     virtual QString type() const { return "Oasis"; }
00071 
00072     BasicElement* createOperatorElement( const QDomElement& element );
00073 };
00074 
00075 KFORMULA_NAMESPACE_END
00076 
00077 #endif // OASISCREATIONSTRATEGY_H
KDE Home | KDE Accessibility Home | Description of Access Keys