kformula/flake

ElementFactory.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2003 Ulrich Kuettler <ulrich.kuettler@gmx.de>
00003    Copyright (C) 2006 Martin Pfeiffer <hubipete@gmx.net>
00004    Copyright (C) 2006 Alfredo Beaumont Sainz <alfredo.beaumont@gmail.com>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this library; see the file COPYING.LIB.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019    Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #ifndef ELEMENTFACTORY_H
00023 #define ELEMENTFACTORY_H
00024 
00025 #include <QString>
00026 #include "kformula_export.h"
00027 
00028 class BasicElement;
00029 
00030 enum ElementType {
00031     Basic,
00032     Formula,
00033     Row,
00034     Identifier,
00035     Number,
00036     Operator,
00037     Space,
00038     Fraction,
00039     Table,
00040     TableRow,
00041     TableEntry,
00042     Under,
00043     Over,
00044     UnderOver,
00045     MultiScript,
00046     SupScript,
00047     SubScript,
00048     SubSupScript,
00049     Root,
00050     SquareRoot,
00051     Text,
00052     Style,
00053     Padded,
00054     Error,
00055     Fenced,
00056     Glyph,
00057     String,
00058     Enclose,
00059     Phantom,
00060     Action,
00061     Unknown,
00062     Empty
00063 };
00064 
00065 
00077 class KOFORMULA_EXPORT ElementFactory {
00078 public:
00080     ElementFactory();
00081 
00088     static BasicElement* createElement( const QString& tagName, BasicElement* parent );
00089 
00095     static QString elementName( ElementType type );
00096 };
00097 
00098 #endif // ELEMENTFACTORY_H