summaryrefslogtreecommitdiff
path: root/src/main-view/FieldContentCodec.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/main-view/FieldContentCodec.h')
-rw-r--r--src/main-view/FieldContentCodec.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main-view/FieldContentCodec.h b/src/main-view/FieldContentCodec.h
new file mode 100644
index 0000000..8a13dba
--- /dev/null
+++ b/src/main-view/FieldContentCodec.h
@@ -0,0 +1,28 @@
+#ifndef FIELD_CONTENT_CODEC_H
+#define FIELD_CONTENT_CODEC_H
+
+#include <QtCore>
+
+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
+