author | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
---|---|---|
committer | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
commit | 73253e93327cf4ef0932de1b4afb56af22a0f37e (patch) (side-by-side diff) | |
tree | 1c9a7a6dd3341e036a894d348a3372525d29acec /noncore/apps/opie-reader/CEncoding.h | |
parent | e90847c784c48bd21bf8768cb38edb853b832697 (diff) | |
download | opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.zip opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.gz opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.bz2 |
updated source to opie-reader 0.7g
Diffstat (limited to 'noncore/apps/opie-reader/CEncoding.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/CEncoding.h | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/noncore/apps/opie-reader/CEncoding.h b/noncore/apps/opie-reader/CEncoding.h index df0104a..1dfd74d 100644 --- a/noncore/apps/opie-reader/CEncoding.h +++ b/noncore/apps/opie-reader/CEncoding.h @@ -10,10 +10,23 @@ class CEncoding : public CCharacterSource friend class CFilterChain; protected: - CExpander* parent; - linkType hyperlink(unsigned int n, QString& t) { return parent->hyperlink(n,t); } + CExpander_Interface* parent; + linkType hyperlink(unsigned int n, unsigned int noff, QString& t, QString& nm) { return parent->hyperlink(n, noff, t, nm); } public: CEncoding() : parent(NULL) {} - void setparent(CExpander* p) { parent = p; } + void setparent(CExpander_Interface* p) { parent = p; } virtual ~CEncoding() {}; + void locate(unsigned int n) { parent->locate(n); } + bool findanchor(const QString& nm) { return false; } + void saveposn(const QString& f, size_t posn) { parent->saveposn(posn); } + void writeposn(const QString& f, size_t posn) { parent->writeposn(posn); } + linkType forward(QString& f, size_t& loc) { return parent->forward(loc); } + linkType back(QString& f, size_t& loc) { return parent->back(loc); } + bool hasnavigation() { return parent->hasnavigation(); } + virtual int getwidth() { return parent->getwidth(); } + QImage* getPicture(unsigned long tgt) { return parent->getPicture(tgt); } + QImage* getPicture(const QString& href) { return parent->getPicture(href); } + bool getFile(const QString& href) { qDebug("Encoding Get File"); return parent->getFile(href);} + + }; @@ -21,5 +34,6 @@ class CUtf8 : public CEncoding { public: - void getch(tchar& ch, CStyle& sty); + void getch(tchar& ch, CStyle& sty, unsigned long& pos); + QString about() { return QString("UTF8 decoder (c) Tim Wentford\n")+parent->about(); } }; @@ -27,5 +41,6 @@ class CUcs16be : public CEncoding { public: - void getch(tchar& ch, CStyle& sty); + void getch(tchar& ch, CStyle& sty, unsigned long& pos); + QString about() { return QString("UCS16 decoder (c) Tim Wentford\n")+parent->about(); } }; @@ -33,5 +48,6 @@ class CUcs16le : public CEncoding { public: - void getch(tchar& ch, CStyle& sty); + void getch(tchar& ch, CStyle& sty, unsigned long& pos); + QString about() { return QString("UCS16 decoder (c) Tim Wentford\n")+parent->about(); } }; @@ -39,5 +55,6 @@ class Ccp1252 : public CEncoding { public: - void getch(tchar& ch, CStyle& sty); + void getch(tchar& ch, CStyle& sty, unsigned long& pos); + QString about() { return QString("Codepage 1252 decoder (c) Tim Wentford\n")+parent->about(); } }; @@ -45,5 +62,6 @@ class CPalm : public Ccp1252 { public: - void getch(tchar& ch, CStyle& sty); + void getch(tchar& ch, CStyle& sty, unsigned long& pos); + QString about() { return QString("Palm decoder (c) Tim Wentford\n")+parent->about(); } }; @@ -51,5 +69,6 @@ class CAscii : public CEncoding { public: - void getch(tchar& ch, CStyle& sty); + void getch(tchar& ch, CStyle& sty, unsigned long& pos); + QString about() { return QString("Vanilla Ascii decoder (c) Tim Wentford\n")+parent->about(); } }; @@ -62,12 +81,13 @@ class CGeneral8Bit : public CEncoding CGeneral8Bit(int _i) : m_index(_i) { -// odebug << "8Bit: " << _i << oendl; -// odebug << unicodetable::iterator(_i)->mime << oendl; +// qDebug("8Bit:%d", _i); +// qDebug("%s", unicodetable::iterator(_i)->mime); } - void getch(tchar& ch, CStyle& sty) + void getch(tchar& ch, CStyle& sty, unsigned long& pos) { - parent->getch(ch, sty); + parent->getch(ch, sty, pos); ch = unicodetable::unicodevalue(m_index, ch); } + QString about() { return QString("8-bit decoder (c) Tim Wentford - based on QT code\n")+parent->about(); } }; |