filters
wmlparser.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __WMLPARSER_H
00021 #define __WMLPARSER_H
00022
00023 #include <qvaluelist.h>
00024 #include <qstring.h>
00025
00026 class WMLFormat
00027 {
00028 public:
00029 int pos, len;
00030 bool bold, italic, underline;
00031 enum { Normal, Big, Small } fontsize;
00032 QString link, href;
00033 WMLFormat();
00034 WMLFormat( const WMLFormat& );
00035 WMLFormat& operator= ( const WMLFormat& );
00036 void assign( const WMLFormat& );
00037 };
00038
00039 class WMLLayout
00040 {
00041 public:
00042 enum { Left, Center, Right } align;
00043 WMLLayout();
00044 WMLLayout( const WMLLayout& );
00045 WMLLayout& operator=( const WMLLayout& );
00046 void assign( const WMLLayout& );
00047 };
00048
00049 typedef QValueList<WMLFormat> WMLFormatList;
00050
00051 class WMLParser
00052 {
00053 public:
00054 WMLParser(){};
00055 virtual ~WMLParser(){};
00056 virtual void parse( const char* filename );
00057
00058 virtual bool doOpenDocument();
00059 virtual bool doCloseDocument();
00060 virtual bool doOpenCard( QString id, QString title );
00061 virtual bool doCloseCard();
00062 virtual bool doParagraph( QString, WMLFormatList, WMLLayout );
00063 virtual bool doBeginTable();
00064 virtual bool doTableCell( unsigned row, unsigned col );
00065 virtual bool doEndTable();
00066 };
00067
00068 #endif
|