filters
textzone.h
00001 /* A TEXT ZONE IS SOME WORDS WITH A SPECIAL STYLE (ITALIC, ...). 00002 * IT'S NOT USE FOR TITLE (BUT IN THE FUTURE IT WILL BE USED FOR) 00003 * OR FOR SPECIAL PARAG. 00004 */ 00005 /* 00006 ** Header file for inclusion with kword_xml2latex.c 00007 ** 00008 ** Copyright (C) 2000, 2002 Robert JACOLIN 00009 ** 00010 ** This library is free software; you can redistribute it and/or 00011 ** modify it under the terms of the GNU Library General Public 00012 ** License as published by the Free Software Foundation; either 00013 ** version 2 of the License, or (at your option) any later version. 00014 ** 00015 ** This library is distributed in the hope that it will be useful, 00016 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 ** Library General Public License for more details. 00019 ** 00020 ** To receive a copy of the GNU Library General Public License, write to the 00021 ** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00022 * Boston, MA 02110-1301, USA. 00023 ** 00024 */ 00025 00026 #ifndef __KWORD_LATEX_TEXTZONE_H__ 00027 #define __KWORD_LATEX_TEXTZONE_H__ 00028 00029 #include <qtextstream.h> 00030 #include <qstring.h> 00031 #include "textformat.h" 00032 00033 /***********************************************************************/ 00034 /* Class: TextZone */ 00035 /***********************************************************************/ 00036 00040 class TextZone: public TextFormat 00041 { 00042 /* TEXT MARKUP */ 00043 QString _texte; 00044 00045 public: 00046 /* === Constructors ==== */ 00047 00053 TextZone(Para *para = 0); 00061 TextZone(QString text, Para *para = 0); 00062 00063 /* 00064 * Destructor 00065 * 00066 */ 00067 virtual ~TextZone(); 00068 00069 /* ==== Getters ==== */ 00074 bool useFormat() const; 00075 QString getTexte() const { return _texte; } 00076 00077 /* ==== Setters ==== */ 00078 00079 void setTexte(QString texte) { _texte = texte; } 00080 00081 /* ==== Helpfull functions ==== */ 00082 00086 QString escapeLatin1(QString); 00087 00088 void analyse(const QDomNode); 00089 void analyse(); 00090 virtual void generate(QTextStream&); 00091 00092 void generate_format_begin(QTextStream &); 00093 void generate_format_end(QTextStream &); 00094 00095 protected: 00096 void display(QString, QTextStream&); 00097 00098 private: 00102 void convert(QString&, int, const char*); 00103 }; 00104 00105 00106 QString convertSpecialChar(int); 00107 00108 #endif /* __KWORD_LATEX_TEXTZONE_H__ */