summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/CFilter.h
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/CFilter.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-reader/CFilter.h55
1 files changed, 52 insertions, 3 deletions
diff --git a/noncore/apps/opie-reader/CFilter.h b/noncore/apps/opie-reader/CFilter.h
index 174e6b4..594b606 100644
--- a/noncore/apps/opie-reader/CFilter.h
+++ b/noncore/apps/opie-reader/CFilter.h
@@ -21,2 +21,3 @@ class CFilter_IFace : public CCharacterSource
21 virtual CCharacterSource* getparent() = 0; 21 virtual CCharacterSource* getparent() = 0;
22 virtual unsigned long startSection() = 0;
22}; 23};
@@ -28,2 +29,7 @@ class CFilter : public CFilter_IFace
28 public: 29 public:
30 virtual QString getTableAsHtml(unsigned long loc)
31 {
32 qDebug("CFilter::getTableAsHtml()");
33 return parent->getTableAsHtml(loc);
34 }
29 virtual linkType hyperlink(unsigned int n, unsigned int noff, QString& w, QString& nm) 35 virtual linkType hyperlink(unsigned int n, unsigned int noff, QString& w, QString& nm)
@@ -52,3 +58,4 @@ class CFilter : public CFilter_IFace
52 QImage* getPicture(const QString& href) { return parent->getPicture(href); } 58 QImage* getPicture(const QString& href) { return parent->getPicture(href); }
53 bool getFile(const QString& href) { return parent->getFile(href); } 59 bool getFile(const QString& href, const QString& nm) { return parent->getFile(href, nm); }
60 virtual unsigned long startSection() { return parent->startSection(); }
54}; 61};
@@ -78,2 +85,6 @@ class CFilterChain
78 } 85 }
86 QString getTableAsHtml(unsigned long loc)
87 {
88 return front->getTableAsHtml(loc);
89 }
79 void locate(unsigned int n) 90 void locate(unsigned int n)
@@ -86,2 +97,8 @@ class CFilterChain
86 } 97 }
98 /*
99 void rawgetch(tchar& ch, CStyle& sty, unsigned long& pos)
100 {
101 encoder->getch(ch, sty, pos);
102 }
103 */
87 void addfilter(CFilter_IFace* p) 104 void addfilter(CFilter_IFace* p)
@@ -405,2 +422,7 @@ class ExternFilter : public CFilter_IFace
405 } 422 }
423 QString getTableAsHtml(unsigned long loc)
424 {
425 qDebug("ExternFilter::getTableAsHtml()");
426 return filt->getTableAsHtml(loc);
427 }
406 void setparent(CCharacterSource* p) { filt->setparent(p); } 428 void setparent(CCharacterSource* p) { filt->setparent(p); }
@@ -413,3 +435,6 @@ class ExternFilter : public CFilter_IFace
413 void locate(unsigned int n) { filt->locate(n); } 435 void locate(unsigned int n) { filt->locate(n); }
414 bool findanchor(const QString& nm) { return filt->findanchor(nm); } 436 bool findanchor(const QString& nm)
437 {
438 return filt->findanchor(nm);
439 }
415 void saveposn(const QString& f, size_t posn) { filt->saveposn(f, posn); } 440 void saveposn(const QString& f, size_t posn) { filt->saveposn(f, posn); }
@@ -425,4 +450,5 @@ class ExternFilter : public CFilter_IFace
425 QImage* getPicture(const QString& href) { return filt->getPicture(href); } 450 QImage* getPicture(const QString& href) { return filt->getPicture(href); }
426 bool getFile(const QString& href) { return filt->getFile(href); } 451 bool getFile(const QString& href, const QString& nm) { return filt->getFile(href, nm); }
427 QString about() { return QString("Filter plug-in (c) Tim Wentford\n")+filt->about(); } 452 QString about() { return QString("Filter plug-in (c) Tim Wentford\n")+filt->about(); }
453 unsigned long startSection() { return filt->startSection(); }
428}; 454};
@@ -473,2 +499,25 @@ class setfg : public CFilter
473 499
500class tableLink : public CFilter
501{
502 QString text;
503 int offset;
504 int m_r, m_g, m_b;
505 public:
506 tableLink() : text( "See Table" ), offset(-1)
507 {
508 }
509 void getch(tchar& ch, CStyle& sty, unsigned long& pos);
510 QString about() { return QString("Table link filter (c) Tim Wentford\n")+parent->about(); }
511};
512
513class underlineLink : public CFilter
514{
515 bool isLink;
516 public:
517 underlineLink() : isLink(false) {}
518 ~underlineLink() {}
519 void getch(tchar& ch, CStyle& sty, unsigned long& pos);
520 QString about() { return QString("Link underlining filter (c) Tim Wentford\n")+parent->about(); }
521};
522
474#endif 523#endif