diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2021-07-14 11:49:10 +1200 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2021-07-14 11:49:10 +1200 |
commit | d24f813f3f2a05c112e803e4256b53535895fc98 (patch) | |
tree | 601e6ae9a1cd44bcfdcf91739a5ca36aedd827c9 /src/main-view/FieldContentCodec.h |
Diffstat (limited to 'src/main-view/FieldContentCodec.h')
-rw-r--r-- | src/main-view/FieldContentCodec.h | 28 |
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 + |