author | ar <ar> | 2004-05-27 22:04:46 (UTC) |
---|---|---|
committer | ar <ar> | 2004-05-27 22:04:46 (UTC) |
commit | 4f7c3c4d0d634706d13950b3827714b168e279e3 (patch) (unidiff) | |
tree | 2df448e7a4dcd538c26365873e194be2b55e83b7 /noncore/apps/opie-reader/BuffDoc.h | |
parent | 46f81a089ba8febdb79e0d150b69f74bb1ea7d18 (diff) | |
download | opie-4f7c3c4d0d634706d13950b3827714b168e279e3.zip opie-4f7c3c4d0d634706d13950b3827714b168e279e3.tar.gz opie-4f7c3c4d0d634706d13950b3827714b168e279e3.tar.bz2 |
- convert qDebug to odebug
Diffstat (limited to 'noncore/apps/opie-reader/BuffDoc.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/BuffDoc.h | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/noncore/apps/opie-reader/BuffDoc.h b/noncore/apps/opie-reader/BuffDoc.h index 29d0329..61531c0 100644 --- a/noncore/apps/opie-reader/BuffDoc.h +++ b/noncore/apps/opie-reader/BuffDoc.h | |||
@@ -20,75 +20,75 @@ class BuffDoc | |||
20 | CExpander* exp; | 20 | CExpander* exp; |
21 | CFilterChain* filt; | 21 | CFilterChain* filt; |
22 | public: | 22 | public: |
23 | void setSaveData(unsigned char*& data, unsigned short& len, unsigned char* src, unsigned short srclen) | 23 | void setSaveData(unsigned char*& data, unsigned short& len, unsigned char* src, unsigned short srclen) |
24 | { | 24 | { |
25 | if (exp == NULL) | 25 | if (exp == NULL) |
26 | { | 26 | { |
27 | data = NULL; | 27 | data = NULL; |
28 | len = 0; | 28 | len = 0; |
29 | } | 29 | } |
30 | else | 30 | else |
31 | { | 31 | { |
32 | exp->setSaveData(data, len, src, srclen); | 32 | exp->setSaveData(data, len, src, srclen); |
33 | } | 33 | } |
34 | } | 34 | } |
35 | void putSaveData(unsigned char*& src, unsigned short& srclen) | 35 | void putSaveData(unsigned char*& src, unsigned short& srclen) |
36 | { | 36 | { |
37 | if (exp != NULL) | 37 | if (exp != NULL) |
38 | { | 38 | { |
39 | exp->putSaveData(src, srclen); | 39 | exp->putSaveData(src, srclen); |
40 | } | 40 | } |
41 | } | 41 | } |
42 | #ifdef USEQPE | 42 | #ifdef USEQPE |
43 | void suspend() { if (exp != NULL) exp->suspend(); } | 43 | void suspend() { if (exp != NULL) exp->suspend(); } |
44 | void unsuspend() { if (exp != NULL) exp->unsuspend(); } | 44 | void unsuspend() { if (exp != NULL) exp->unsuspend(); } |
45 | #else | 45 | #else |
46 | void suspend() {} | 46 | void suspend() {} |
47 | void unsuspend() {} | 47 | void unsuspend() {} |
48 | #endif | 48 | #endif |
49 | ~BuffDoc() | 49 | ~BuffDoc() |
50 | { | 50 | { |
51 | delete filt; | 51 | delete filt; |
52 | delete exp; | 52 | delete exp; |
53 | } | 53 | } |
54 | BuffDoc() | 54 | BuffDoc() |
55 | { | 55 | { |
56 | exp = NULL; | 56 | exp = NULL; |
57 | filt = NULL; | 57 | filt = NULL; |
58 | lastword.empty(); | 58 | lastword.empty(); |
59 | // // qDebug("Buffdoc created"); | 59 | // odebug << "Buffdoc created" << oendl; |
60 | } | 60 | } |
61 | bool empty() { return (exp == NULL); } | 61 | bool empty() { return (exp == NULL); } |
62 | void setfilter(CFilterChain* _f) | 62 | void setfilter(CFilterChain* _f) |
63 | { | 63 | { |
64 | if (filt != NULL) delete filt; | 64 | if (filt != NULL) delete filt; |
65 | filt = _f; | 65 | filt = _f; |
66 | filt->setsource(exp); | 66 | filt->setsource(exp); |
67 | } | 67 | } |
68 | CList<Bkmk>* getbkmklist() { return exp->getbkmklist(); } | 68 | CList<Bkmk>* getbkmklist() { return exp->getbkmklist(); } |
69 | bool hasrandomaccess() { return (exp == NULL) ? false : exp->hasrandomaccess(); } | 69 | bool hasrandomaccess() { return (exp == NULL) ? false : exp->hasrandomaccess(); } |
70 | bool iseol() { return (lastword[0] == '\0'); } | 70 | bool iseol() { return (lastword[0] == '\0'); } |
71 | int openfile(QWidget* _parent, const char *src); | 71 | int openfile(QWidget* _parent, const char *src); |
72 | tchar getch() | 72 | tchar getch() |
73 | { | 73 | { |
74 | tchar ch = UEOF; | 74 | tchar ch = UEOF; |
75 | CStyle sty; | 75 | CStyle sty; |
76 | if (exp != NULL) | 76 | if (exp != NULL) |
77 | { | 77 | { |
78 | filt->getch(ch, sty); | 78 | filt->getch(ch, sty); |
79 | } | 79 | } |
80 | return ch; | 80 | return ch; |
81 | } | 81 | } |
82 | void getch(tchar& ch, CStyle& sty) | 82 | void getch(tchar& ch, CStyle& sty) |
83 | { | 83 | { |
84 | if (exp != NULL) | 84 | if (exp != NULL) |
85 | { | 85 | { |
86 | filt->getch(ch, sty); | 86 | filt->getch(ch, sty); |
87 | } | 87 | } |
88 | else | 88 | else |
89 | ch = UEOF; | 89 | ch = UEOF; |
90 | } | 90 | } |
91 | void setwidth(int w) { if (exp != NULL) exp->setwidth(w); } | 91 | void setwidth(int w) { if (exp != NULL) exp->setwidth(w); } |
92 | QImage* getPicture(unsigned long tgt) { return (exp == NULL) ? NULL : exp->getPicture(tgt); } | 92 | QImage* getPicture(unsigned long tgt) { return (exp == NULL) ? NULL : exp->getPicture(tgt); } |
93 | unsigned int startSection() { return (exp == NULL) ? 0 : exp->startSection(); } | 93 | unsigned int startSection() { return (exp == NULL) ? 0 : exp->startSection(); } |
94 | unsigned int endSection() { return (exp == NULL) ? 0 : exp->endSection(); } | 94 | unsigned int endSection() { return (exp == NULL) ? 0 : exp->endSection(); } |
@@ -102,17 +102,17 @@ class BuffDoc | |||
102 | bool getline(CDrawBuffer* buff, int w, unsigned char _border); | 102 | bool getline(CDrawBuffer* buff, int w, unsigned char _border); |
103 | bool getline(CDrawBuffer* buff, int w, int cw, unsigned char _border); | 103 | bool getline(CDrawBuffer* buff, int w, int cw, unsigned char _border); |
104 | void sizes(unsigned long& fs, unsigned long& ts) { exp->sizes(fs,ts); } | 104 | void sizes(unsigned long& fs, unsigned long& ts) { exp->sizes(fs,ts); } |
105 | int getpara(CBuffer& buff) | 105 | int getpara(CBuffer& buff) |
106 | { | 106 | { |
107 | tchar ch; | 107 | tchar ch; |
108 | int i = 0; | 108 | int i = 0; |
109 | while ((ch = getch()) != 10 && ch != UEOF) buff[i++] = ch; | 109 | while ((ch = getch()) != 10 && ch != UEOF) buff[i++] = ch; |
110 | buff[i] = '\0'; | 110 | buff[i] = '\0'; |
111 | if (i == 0 && ch == UEOF) i = -1; | 111 | if (i == 0 && ch == UEOF) i = -1; |
112 | laststartline = exp->locate(); | 112 | laststartline = exp->locate(); |
113 | return i; | 113 | return i; |
114 | } | 114 | } |
115 | void saveposn(size_t posn) { exp->saveposn(posn); } | 115 | void saveposn(size_t posn) { exp->saveposn(posn); } |
116 | void writeposn(size_t posn) { exp->writeposn(posn); } | 116 | void writeposn(size_t posn) { exp->writeposn(posn); } |
117 | bool forward(size_t& loc) { return exp->forward(loc); } | 117 | bool forward(size_t& loc) { return exp->forward(loc); } |
118 | bool back(size_t& loc) { return exp->back(loc); } | 118 | bool back(size_t& loc) { return exp->back(loc); } |