summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/QTReader.h
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-reader/QTReader.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/QTReader.h56
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;
class QTimer;
+class QPixmap;
+class statedata;
@@ -21,2 +23,3 @@ class QTReader : public QWidget
friend class QTReaderApp;
+ void suspend() { buffdoc.suspend(); }
void drawText(QPainter& p, int x, int y, tchar* text);
@@ -39,3 +42,14 @@ public:
~QTReader();
+ void zoomin();
+ void zoomout();
+ void setSaveData(unsigned char*& data, unsigned short& len, unsigned char* src, unsigned short srclen)
+ {
+ buffdoc.setSaveData(data, len, src, srclen);
+ }
+ void putSaveData(unsigned char*& src, unsigned short& srclen)
+ {
+ buffdoc.putSaveData(src, srclen);
+ }
bool empty();
+ void setContinuous(bool _b);
void toggle_autoscroll();
@@ -110,2 +124,14 @@ public:
}
+ void setonespace(bool _b)
+ {
+ bonespace = _b;
+ setfilter(getfilter());
+ }
+#ifdef REPALM
+ void setrepalm(bool _b)
+ {
+ brepalm = _b;
+ setfilter(getfilter());
+ }
+#endif
void setstriphtml(bool _b)
@@ -192,4 +218,8 @@ public:
if (brepara) filt->addfilter(new repara);
+ if (bonespace) filt->addfilter(new OnePara);
if (bindenter) filt->addfilter(new indenter(bindenter));
if (bdblspce) filt->addfilter(new dblspce);
+#ifdef REPALM
+ if (brepalm) filt->addfilter(new repalm);
+#endif
if (bremap) filt->addfilter(new remap);
@@ -218,5 +248,6 @@ private slots:
bool mouseUpOn;
- bool getcurrentpos(int x, int y, size_t& start, size_t& offset, size_t& tgt);
+ linkType getcurrentpos(int x, int y, size_t& start, size_t& offset, size_t& tgt);
bool m_twotouch, m_touchone;
size_t m_startpos, m_startoffset;
+ void dopageup(unsigned int);
void dopageup();
@@ -231,4 +262,7 @@ private slots:
unsigned int numlines;
- bool bstripcr, btextfmt, bstriphtml, bdehyphen, bunindent, brepara, bdblspce, btight, bmakebold, bremap, bpeanut, bautofmt;
- bool m_bpagemode, m_bMonoSpaced;
+ bool bstripcr, btextfmt, bstriphtml, bdehyphen, bunindent, brepara, bdblspce, btight, bmakebold, bremap, bpeanut, bautofmt, bonespace;
+#ifdef REPALM
+ bool brepalm;
+#endif
+ bool m_bpagemode, m_bMonoSpaced, m_continuousDocument;
unsigned char bindenter;
@@ -237,2 +271,6 @@ private slots:
public:
+ bool bDoUpdates;
+ bool m_navkeys;
+ void NavUp();
+ void NavDown();
int getch() { return buffdoc.getch(); }
@@ -243,8 +281,8 @@ private slots:
bool locate(unsigned long n);
- void jumpto(unsigned long n) { buffdoc.locate(n); }
- unsigned long locate() { return buffdoc.locate(); }
- unsigned long explocate() { return buffdoc.explocate(); }
+ void jumpto(unsigned long n) { buffdoc.unsuspend(); buffdoc.locate(n); }
+ unsigned long locate() { buffdoc.unsuspend(); return buffdoc.locate(); }
+ unsigned long explocate() { buffdoc.unsuspend(); return buffdoc.explocate(); }
unsigned long pagelocate() { return locnarray[0]; }
unsigned long mylastpos;
- void setfilter(CFilterChain *f) { buffdoc.setfilter(f); locate(pagelocate()); }
+ void setfilter(CFilterChain *f) { buffdoc.unsuspend(); buffdoc.setfilter(f); locate(pagelocate()); }
void restore() { jumpto(mylastpos); }
@@ -258,3 +296,3 @@ private slots:
unsigned int screenlines();
- void sizes(unsigned long& fs, unsigned long& ts) { buffdoc.sizes(fs,ts); }
+ void sizes(unsigned long& fs, unsigned long& ts) { buffdoc.unsuspend(); buffdoc.sizes(fs,ts); }
static const char *fonts[];
@@ -264,2 +302,3 @@ private slots:
QString firstword();
+ void setstate(const statedata& sd);
@@ -269,2 +308,3 @@ private slots:
void OnActionPressed();
+ void OnShowPicture(QPixmap&);
};