kformula/flake

Dictionary.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2007 Martin Pfeiffer <hubipete@gmx.net>
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 #ifndef DICTIONARY_H
00021 #define DICTIONARY_H
00022 
00023 #include <QString>
00024 #include <QChar>
00025 
00027 enum Form {
00028     Prefix ,
00029     Infix ,
00030     Postfix ,
00031     InvalidForm
00032 };
00033 
00044 class Dictionary {
00045 public:
00047     Dictionary();
00048 
00050     QChar mapEntity( const QString& entity );
00051 
00052     bool queryOperator( const QString& queriedOperator, Form form );
00053 
00055     Form form() const;
00056 
00058     bool fence() const;
00059 
00061     bool separator() const;
00062 
00064     QString lSpace() const;
00065 
00067     QString rSpace() const;
00068 
00070     bool stretchy() const;
00071 
00073     bool symmetric() const;
00074 
00076     double maxSize() const;
00077 
00079     double minSize() const;
00080     bool largeOp() const;
00081     bool moveableLimits() const;
00082     bool accent() const;
00083 
00084 private:
00086     Form m_form;
00087 
00089     bool m_fence;
00090 
00092     bool m_separator;
00093 
00095     QString m_lspace;
00096 
00098     QString m_rspace;
00099 
00101     bool m_stretchy;
00102 
00104     bool m_symmetric;
00105 
00107     QString m_maxsize;
00108 
00110     QString m_minsize;
00111 
00113     bool m_largeop;
00114 
00116     bool m_movablelimits;
00117 
00119     bool m_accent;
00120 };
00121 
00122 #endif //DICTIONARY_H