author | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
---|---|---|
committer | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
commit | 73253e93327cf4ef0932de1b4afb56af22a0f37e (patch) (unidiff) | |
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) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/CEncoding.h | 56 |
1 files changed, 38 insertions, 18 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 | |||
@@ -11,8 +11,21 @@ class CEncoding : public CCharacterSource | |||
11 | protected: | 11 | protected: |
12 | CExpander* parent; | 12 | CExpander_Interface* parent; |
13 | linkType hyperlink(unsigned int n, QString& t) { return parent->hyperlink(n,t); } | 13 | linkType hyperlink(unsigned int n, unsigned int noff, QString& t, QString& nm) { return parent->hyperlink(n, noff, t, nm); } |
14 | public: | 14 | public: |
15 | CEncoding() : parent(NULL) {} | 15 | CEncoding() : parent(NULL) {} |
16 | void setparent(CExpander* p) { parent = p; } | 16 | void setparent(CExpander_Interface* p) { parent = p; } |
17 | virtual ~CEncoding() {}; | 17 | virtual ~CEncoding() {}; |
18 | void locate(unsigned int n) { parent->locate(n); } | ||
19 | bool findanchor(const QString& nm) { return false; } | ||
20 | void saveposn(const QString& f, size_t posn) { parent->saveposn(posn); } | ||
21 | void writeposn(const QString& f, size_t posn) { parent->writeposn(posn); } | ||
22 | linkType forward(QString& f, size_t& loc) { return parent->forward(loc); } | ||
23 | linkType back(QString& f, size_t& loc) { return parent->back(loc); } | ||
24 | bool hasnavigation() { return parent->hasnavigation(); } | ||
25 | virtual int getwidth() { return parent->getwidth(); } | ||
26 | QImage* getPicture(unsigned long tgt) { return parent->getPicture(tgt); } | ||
27 | QImage* getPicture(const QString& href) { return parent->getPicture(href); } | ||
28 | bool getFile(const QString& href) { qDebug("Encoding Get File"); return parent->getFile(href);} | ||
29 | |||
30 | |||
18 | }; | 31 | }; |
@@ -22,3 +35,4 @@ class CUtf8 : public CEncoding | |||
22 | public: | 35 | public: |
23 | void getch(tchar& ch, CStyle& sty); | 36 | void getch(tchar& ch, CStyle& sty, unsigned long& pos); |
37 | QString about() { return QString("UTF8 decoder (c) Tim Wentford\n")+parent->about(); } | ||
24 | }; | 38 | }; |
@@ -28,3 +42,4 @@ class CUcs16be : public CEncoding | |||
28 | public: | 42 | public: |
29 | void getch(tchar& ch, CStyle& sty); | 43 | void getch(tchar& ch, CStyle& sty, unsigned long& pos); |
44 | QString about() { return QString("UCS16 decoder (c) Tim Wentford\n")+parent->about(); } | ||
30 | }; | 45 | }; |
@@ -34,3 +49,4 @@ class CUcs16le : public CEncoding | |||
34 | public: | 49 | public: |
35 | void getch(tchar& ch, CStyle& sty); | 50 | void getch(tchar& ch, CStyle& sty, unsigned long& pos); |
51 | QString about() { return QString("UCS16 decoder (c) Tim Wentford\n")+parent->about(); } | ||
36 | }; | 52 | }; |
@@ -40,3 +56,4 @@ class Ccp1252 : public CEncoding | |||
40 | public: | 56 | public: |
41 | void getch(tchar& ch, CStyle& sty); | 57 | void getch(tchar& ch, CStyle& sty, unsigned long& pos); |
58 | QString about() { return QString("Codepage 1252 decoder (c) Tim Wentford\n")+parent->about(); } | ||
42 | }; | 59 | }; |
@@ -46,3 +63,4 @@ class CPalm : public Ccp1252 | |||
46 | public: | 63 | public: |
47 | void getch(tchar& ch, CStyle& sty); | 64 | void getch(tchar& ch, CStyle& sty, unsigned long& pos); |
65 | QString about() { return QString("Palm decoder (c) Tim Wentford\n")+parent->about(); } | ||
48 | }; | 66 | }; |
@@ -52,3 +70,4 @@ class CAscii : public CEncoding | |||
52 | public: | 70 | public: |
53 | void getch(tchar& ch, CStyle& sty); | 71 | void getch(tchar& ch, CStyle& sty, unsigned long& pos); |
72 | QString about() { return QString("Vanilla Ascii decoder (c) Tim Wentford\n")+parent->about(); } | ||
54 | }; | 73 | }; |
@@ -62,11 +81,12 @@ class CGeneral8Bit : public CEncoding | |||
62 | CGeneral8Bit(int _i) : m_index(_i) | 81 | CGeneral8Bit(int _i) : m_index(_i) |
63 | { | 82 | { |
64 | // odebug << "8Bit: " << _i << oendl; | 83 | // qDebug("8Bit:%d", _i); |
65 | // odebug << unicodetable::iterator(_i)->mime << oendl; | 84 | // qDebug("%s", unicodetable::iterator(_i)->mime); |
66 | } | 85 | } |
67 | void getch(tchar& ch, CStyle& sty) | 86 | void getch(tchar& ch, CStyle& sty, unsigned long& pos) |
68 | { | 87 | { |
69 | parent->getch(ch, sty); | 88 | parent->getch(ch, sty, pos); |
70 | ch = unicodetable::unicodevalue(m_index, ch); | 89 | ch = unicodetable::unicodevalue(m_index, ch); |
71 | } | 90 | } |
91 | QString about() { return QString("8-bit decoder (c) Tim Wentford - based on QT code\n")+parent->about(); } | ||
72 | }; | 92 | }; |