summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/CFilter.cpp
authorpohly <pohly>2005-05-05 14:39:33 (UTC)
committer pohly <pohly>2005-05-05 14:39:33 (UTC)
commit39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91 (patch) (side-by-side diff)
tree96e66fdc18dca4d4ab8611133e072f57dea224b9 /noncore/apps/opie-reader/CFilter.cpp
parent279fc4fd1986074acbadd3a8e86fcf3968a8dd5c (diff)
downloadopie-39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91.zip
opie-39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91.tar.gz
opie-39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91.tar.bz2
new opie-reader sources with support for ArriereGo, Reb input and flite output plugins
Diffstat (limited to 'noncore/apps/opie-reader/CFilter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/CFilter.cpp54
1 files changed, 50 insertions, 4 deletions
diff --git a/noncore/apps/opie-reader/CFilter.cpp b/noncore/apps/opie-reader/CFilter.cpp
index ab98829..25cdfae 100644
--- a/noncore/apps/opie-reader/CFilter.cpp
+++ b/noncore/apps/opie-reader/CFilter.cpp
@@ -2,13 +2,13 @@
#include <qfileinfo.h>
#include <qtextstream.h>
#include <qdir.h>
+
#ifdef USEQPE
#include <qpe/global.h>
#endif
#include "CDrawBuffer.h"
#include "CFilter.h"
#include "hrule.h"
-#include "util.h"
#include <qregexp.h>
#include <qimage.h>
@@ -665,8 +665,17 @@ class ErrorFilter : public CFilter
#ifndef __STATIC
ExternFilter::ExternFilter(const QString& nm, const QString& optional) : filt(NULL), handle(NULL)
{
- QString filterpath(QTReaderUtil::getPluginPath("filters"));
- filterpath += "/lib";
+#ifdef USEQPE
+#ifdef OPIE
+ QString filterpath(getenv("OPIEDIR"));
+#else
+ QString filterpath(getenv("QTDIR"));
+#endif
+ filterpath += "/plugins/reader/filters/lib";
+#else
+ QString filterpath(getenv("READERDIR"));
+ filterpath += "/filters/lib";
+#endif
filterpath += nm;
filterpath += ".so";
if (QFile::exists(filterpath))
@@ -692,7 +701,7 @@ ExternFilter::ExternFilter(const QString& nm, const QString& optional) : filt(NU
}
else
{
- qDebug("No filter path");
+ qDebug("No filter path:%s", (const char*)filterpath);
filt = new ErrorFilter(QString("No filter plugins installed:")+nm);
}
if (filt == NULL)
@@ -813,3 +822,40 @@ void repara::getch(tchar& ch, CStyle& sty, unsigned long& pos)
*/
return;
}
+
+void tableLink::getch(tchar& ch, CStyle& sty, unsigned long& pos)
+{
+ if (offset >= (int)text.length())
+ {
+ offset = -1;
+ sty.setColour(m_r, m_g, m_b);
+ do
+ {
+ parent->getch(ch, sty, pos);
+ }
+ while (sty.isTable());
+ return;
+ }
+ if (offset >= 0)
+ {
+ ch = text[offset++].unicode();
+ return;
+ }
+ parent->getch(ch, sty, pos);
+ if (sty.isTable())
+ {
+ offset = 1;
+ ch = text[0].unicode();
+ m_r = sty.Red(), m_g = sty.Green(), m_b = sty.Blue();
+ sty.setColour(255, 0, 0);
+ }
+ return;
+}
+
+void underlineLink::getch(tchar& ch, CStyle& sty, unsigned long& pos)
+{
+ parent->getch(ch, sty, pos);
+ if (sty.getLink()) sty.setUnderline();
+ //if (isLink && !sty.getLink()) sty.unsetUnderline();
+ //isLink = sty.getLink();
+}