#ifndef FIELD_CONTENT_CODEC_H #define FIELD_CONTENT_CODEC_H #include class FieldContentPainter; class FieldContentCodec { public: FieldContentCodec(FieldContentPainter* painter); void parse(const QString& text); private: void initLoopParams(); int findNextImage(); void drawTextChunk(int len); void drawImage(); private: FieldContentPainter* painter; QString text; QRegExp imageRx; int textPos; int prevTextPos; }; #endif