Diffstat (limited to 'noncore/apps/opie-reader/QTReader.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/QTReader.h | 56 |
1 files changed, 48 insertions, 8 deletions
diff --git a/noncore/apps/opie-reader/QTReader.h b/noncore/apps/opie-reader/QTReader.h index 78230b4..3d5f57d 100644 --- a/noncore/apps/opie-reader/QTReader.h +++ b/noncore/apps/opie-reader/QTReader.h | |||
@@ -15,2 +15,4 @@ class QPainter; | |||
15 | class QTimer; | 15 | class QTimer; |
16 | class QPixmap; | ||
17 | class statedata; | ||
16 | 18 | ||
@@ -21,2 +23,3 @@ class QTReader : public QWidget | |||
21 | friend class QTReaderApp; | 23 | friend class QTReaderApp; |
24 | void suspend() { buffdoc.suspend(); } | ||
22 | void drawText(QPainter& p, int x, int y, tchar* text); | 25 | void drawText(QPainter& p, int x, int y, tchar* text); |
@@ -39,3 +42,14 @@ public: | |||
39 | ~QTReader(); | 42 | ~QTReader(); |
43 | void zoomin(); | ||
44 | void zoomout(); | ||
45 | void setSaveData(unsigned char*& data, unsigned short& len, unsigned char* src, unsigned short srclen) | ||
46 | { | ||
47 | buffdoc.setSaveData(data, len, src, srclen); | ||
48 | } | ||
49 | void putSaveData(unsigned char*& src, unsigned short& srclen) | ||
50 | { | ||
51 | buffdoc.putSaveData(src, srclen); | ||
52 | } | ||
40 | bool empty(); | 53 | bool empty(); |
54 | void setContinuous(bool _b); | ||
41 | void toggle_autoscroll(); | 55 | void toggle_autoscroll(); |
@@ -110,2 +124,14 @@ public: | |||
110 | } | 124 | } |
125 | void setonespace(bool _b) | ||
126 | { | ||
127 | bonespace = _b; | ||
128 | setfilter(getfilter()); | ||
129 | } | ||
130 | #ifdef REPALM | ||
131 | void setrepalm(bool _b) | ||
132 | { | ||
133 | brepalm = _b; | ||
134 | setfilter(getfilter()); | ||
135 | } | ||
136 | #endif | ||
111 | void setstriphtml(bool _b) | 137 | void setstriphtml(bool _b) |
@@ -192,4 +218,8 @@ public: | |||
192 | if (brepara) filt->addfilter(new repara); | 218 | if (brepara) filt->addfilter(new repara); |
219 | if (bonespace) filt->addfilter(new OnePara); | ||
193 | if (bindenter) filt->addfilter(new indenter(bindenter)); | 220 | if (bindenter) filt->addfilter(new indenter(bindenter)); |
194 | if (bdblspce) filt->addfilter(new dblspce); | 221 | if (bdblspce) filt->addfilter(new dblspce); |
222 | #ifdef REPALM | ||
223 | if (brepalm) filt->addfilter(new repalm); | ||
224 | #endif | ||
195 | if (bremap) filt->addfilter(new remap); | 225 | if (bremap) filt->addfilter(new remap); |
@@ -218,5 +248,6 @@ private slots: | |||
218 | bool mouseUpOn; | 248 | bool mouseUpOn; |
219 | bool getcurrentpos(int x, int y, size_t& start, size_t& offset, size_t& tgt); | 249 | linkType getcurrentpos(int x, int y, size_t& start, size_t& offset, size_t& tgt); |
220 | bool m_twotouch, m_touchone; | 250 | bool m_twotouch, m_touchone; |
221 | size_t m_startpos, m_startoffset; | 251 | size_t m_startpos, m_startoffset; |
252 | void dopageup(unsigned int); | ||
222 | void dopageup(); | 253 | void dopageup(); |
@@ -231,4 +262,7 @@ private slots: | |||
231 | unsigned int numlines; | 262 | unsigned int numlines; |
232 | bool bstripcr, btextfmt, bstriphtml, bdehyphen, bunindent, brepara, bdblspce, btight, bmakebold, bremap, bpeanut, bautofmt; | 263 | bool bstripcr, btextfmt, bstriphtml, bdehyphen, bunindent, brepara, bdblspce, btight, bmakebold, bremap, bpeanut, bautofmt, bonespace; |
233 | bool m_bpagemode, m_bMonoSpaced; | 264 | #ifdef REPALM |
265 | bool brepalm; | ||
266 | #endif | ||
267 | bool m_bpagemode, m_bMonoSpaced, m_continuousDocument; | ||
234 | unsigned char bindenter; | 268 | unsigned char bindenter; |
@@ -237,2 +271,6 @@ private slots: | |||
237 | public: | 271 | public: |
272 | bool bDoUpdates; | ||
273 | bool m_navkeys; | ||
274 | void NavUp(); | ||
275 | void NavDown(); | ||
238 | int getch() { return buffdoc.getch(); } | 276 | int getch() { return buffdoc.getch(); } |
@@ -243,8 +281,8 @@ private slots: | |||
243 | bool locate(unsigned long n); | 281 | bool locate(unsigned long n); |
244 | void jumpto(unsigned long n) { buffdoc.locate(n); } | 282 | void jumpto(unsigned long n) { buffdoc.unsuspend(); buffdoc.locate(n); } |
245 | unsigned long locate() { return buffdoc.locate(); } | 283 | unsigned long locate() { buffdoc.unsuspend(); return buffdoc.locate(); } |
246 | unsigned long explocate() { return buffdoc.explocate(); } | 284 | unsigned long explocate() { buffdoc.unsuspend(); return buffdoc.explocate(); } |
247 | unsigned long pagelocate() { return locnarray[0]; } | 285 | unsigned long pagelocate() { return locnarray[0]; } |
248 | unsigned long mylastpos; | 286 | unsigned long mylastpos; |
249 | void setfilter(CFilterChain *f) { buffdoc.setfilter(f); locate(pagelocate()); } | 287 | void setfilter(CFilterChain *f) { buffdoc.unsuspend(); buffdoc.setfilter(f); locate(pagelocate()); } |
250 | void restore() { jumpto(mylastpos); } | 288 | void restore() { jumpto(mylastpos); } |
@@ -258,3 +296,3 @@ private slots: | |||
258 | unsigned int screenlines(); | 296 | unsigned int screenlines(); |
259 | void sizes(unsigned long& fs, unsigned long& ts) { buffdoc.sizes(fs,ts); } | 297 | void sizes(unsigned long& fs, unsigned long& ts) { buffdoc.unsuspend(); buffdoc.sizes(fs,ts); } |
260 | static const char *fonts[]; | 298 | static const char *fonts[]; |
@@ -264,2 +302,3 @@ private slots: | |||
264 | QString firstword(); | 302 | QString firstword(); |
303 | void setstate(const statedata& sd); | ||
265 | 304 | ||
@@ -269,2 +308,3 @@ private slots: | |||
269 | void OnActionPressed(); | 308 | void OnActionPressed(); |
309 | void OnShowPicture(QPixmap&); | ||
270 | }; | 310 | }; |