Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

striphtml Class Reference

#include </home/clem/local/src/opie/noncore/apps/opie-reader/striphtml.h>

Inheritance diagram for striphtml:

Inheritance graph
[legend]
Collaboration diagram for striphtml:

Collaboration graph
[legend]
List of all members.

Public Member Functions

QString about ()
 striphtml (const QString &)
 ~striphtml ()
void getch (tchar &ch, CStyle &sty, unsigned long &pos)
virtual linkType hyperlink (unsigned int n, unsigned int noff, QString &w, QString &nm)
bool findanchor (const QString &)
void saveposn (const QString &f, size_t posn)
void writeposn (const QString &f, size_t posn)
linkType forward (QString &f, size_t &loc)
linkType back (QString &f, size_t &loc)
bool hasnavigation ()
virtual void locate (unsigned int n)
void setchm (bool _b)
QString getTableAsHtml (unsigned long loc)

Private Member Functions

void reset ()
unsigned short skip_ws ()
unsigned short skip_ws_end ()
unsigned short skip_ws_end (unsigned long &)
unsigned short parse_m ()
void mygetch (tchar &ch, CStyle &sty, unsigned long &pos)
void initentmap ()
QString getname (tchar &ch, const QString &nd)
void skipblock (const QString &)
QString getattr (tchar &)
QString dehtml (const QString &_info)
void parse_paragraph (CStyle &currentstyle, tchar &ch, unsigned long)
int getpara (CBuffer &, unsigned long &)

Private Attributes

bool ignorespace
bool m_bchm
int tablenesteddepth
CList< CStylestylestack
QMap< QString, tchar > * entmap
CStyle currentstyle
bool isPre
QMap< QString, unsigned long > * href2filepos
QMap< unsigned long, QString > * id2href
unsigned long currentid
tchar lastch
QString currentfile
QString q
bool forcecentre
bool m_inblock
QString text_q
int indent
int m_listtype [m_cmaxdepth]
int m_ctr [m_cmaxdepth]

Static Private Attributes

static CNavigation_base< htmlmarkm_nav

Constructor & Destructor Documentation

striphtml::striphtml const QString  ) 
 

Definition at line 312 of file striphtml.cpp.

References href2filepos, and id2href.

striphtml::~striphtml  ) 
 

Definition at line 318 of file striphtml.cpp.

References entmap, href2filepos, id2href, and NULL.


Member Function Documentation

QString striphtml::about  )  [inline, virtual]
 

Implements CCharacterSource.

Definition at line 45 of file striphtml.h.

References CCharacterSource::about(), and CFilter::parent.

linkType striphtml::back QString f,
size_t &  loc
[inline, virtual]
 

Reimplemented from CFilter.

Definition at line 73 of file striphtml.h.

References CNavigation_base< T >::back(), eFile, eLink, eNone, htmlmark::filename(), m_nav, and htmlmark::posn().

QString striphtml::dehtml const QString _info  )  [private]
 

Definition at line 207 of file striphtml.cpp.

References i.

Referenced by hyperlink().

bool striphtml::findanchor const QString  )  [virtual]
 

Reimplemented from CFilter.

Definition at line 239 of file striphtml.cpp.

References CBufferFace< T >::data(), QRegExp::escape(), CCharacterSource::findanchor(), getpara(), i, id, QString::length(), locate(), CCharacterSource::locate(), match(), QRegExp::match(), name, CFilter::parent, pos, qDebug(), reset(), and CCharacterSource::startSection().

Referenced by hyperlink().

linkType striphtml::forward QString f,
size_t &  loc
[inline, virtual]
 

Reimplemented from CFilter.

Definition at line 55 of file striphtml.h.

References eFile, eLink, eNone, htmlmark::filename(), CNavigation_base< T >::forward(), m_nav, and htmlmark::posn().

QString striphtml::getattr tchar  )  [private]
 

Definition at line 424 of file striphtml.cpp.

References getname(), mygetch(), pos, and skip_ws().

Referenced by getch(), and parse_paragraph().

void striphtml::getch tchar ch,
CStyle sty,
unsigned long &  pos
[virtual]
 

Implements CCharacterSource.

Definition at line 695 of file striphtml.cpp.

References QFileInfo::absFilePath(), CStyle::clearPicture(), currentfile, currentid, currentstyle, QFileInfo::dir(), QMap< Key, T >::end(), entmap, f, QMap< Key, T >::find(), QString::find(), QString::findRev(), forcecentre, g, getattr(), CStyle::getExtraSpace(), getname(), CCharacterSource::getPicture(), CCharacterSource::getwidth(), hRule(), ignorespace, indent, initentmap(), CList< T >::isEmpty(), QString::isEmpty(), isPre, lastch, QString::left(), QString::length(), m_cmaxdepth, m_ctr, m_listtype, QString::mid(), mygetch(), name, NULL, CFilter::parent, parse_color(), parse_paragraph(), CList< T >::pop(), CList< T >::push_front(), q, qDebug(), QString::right(), CStyle::setBackground(), CStyle::setBold(), CStyle::setCentreJustify(), CStyle::setColour(), CStyle::setData(), CStyle::setExtraSpace(), CStyle::setFontSize(), CStyle::setItalic(), CStyle::setLeftMargin(), CStyle::setLink(), CStyle::setMono(), CStyle::setNoJustify(), QString::setNum(), CStyle::setPicture(), CStyle::setRightMargin(), CStyle::setTable(), CStyle::setUnderline(), CStyle::setVOffset(), skip_ws(), skip_ws_end(), skipblock(), stylestack, tablenesteddepth, text_q, QString::toUInt(), UEOF, QString::unicode(), CStyle::unset(), CStyle::unsetBold(), CStyle::unsetItalic(), CStyle::unsetMono(), and CStyle::unsetUnderline().

QString striphtml::getname tchar ch,
const QString nd
[private]
 

Definition at line 402 of file striphtml.cpp.

References QString::find(), QString::length(), mygetch(), and UEOF.

Referenced by getattr(), getch(), getpara(), parse_paragraph(), and skipblock().

int striphtml::getpara CBuffer ,
unsigned long & 
[private]
 

Definition at line 112 of file striphtml.cpp.

References CCharacterSource::getch(), getname(), i, isPre, QString::length(), locate(), QString::lower(), CFilter::parent, pos, skip_ws(), and UEOF.

Referenced by findanchor().

QString striphtml::getTableAsHtml unsigned long  loc  )  [virtual]
 

Reimplemented from CFilter.

Definition at line 1372 of file striphtml.cpp.

References depth, CCharacterSource::getch(), QString::length(), locate(), QChar::lower(), CFilter::parent, pos, qDebug(), and UEOF.

bool striphtml::hasnavigation  )  [inline, virtual]
 

Reimplemented from CFilter.

Definition at line 91 of file striphtml.h.

linkType striphtml::hyperlink unsigned int  n,
unsigned int  noff,
QString w,
QString nm
[virtual]
 

Reimplemented from CFilter.

Definition at line 454 of file striphtml.cpp.

References QFileInfo::absFilePath(), CNavigation_base< T >::back(), currentfile, dehtml(), QFileInfo::dir(), eFile, eLink, QMap< Key, T >::end(), eNone, QFileInfo::exists(), f, htmlmark::filename(), QMap< Key, T >::find(), findanchor(), CCharacterSource::findanchor(), href2filepos, id2href, loc, locate(), m_bchm, m_nav, name, CFilter::parent, htmlmark::posn(), qDebug(), and reset().

void striphtml::initentmap  )  [private]
 

Definition at line 325 of file striphtml.cpp.

References QFileInfo::absFilePath(), data, entmap, QTextStream::eof(), QFileInfo::exists(), QString::find(), IO_ReadOnly, QString::left(), QString::length(), QFile::open(), QTextStream::readLine(), QString::right(), QFileInfo::setFile(), t, and QString::toInt().

Referenced by getch().

void striphtml::locate unsigned int  n  )  [virtual]
 

Reimplemented from CFilter.

Definition at line 105 of file striphtml.cpp.

References CCharacterSource::locate(), CFilter::parent, qDebug(), and reset().

Referenced by findanchor(), getpara(), getTableAsHtml(), and hyperlink().

void striphtml::mygetch tchar ch,
CStyle sty,
unsigned long &  pos
[private]
 

Definition at line 580 of file striphtml.cpp.

References CCharacterSource::getch(), QString::isEmpty(), isPre, QString::length(), m_inblock, CFilter::parent, QString::right(), text_q, and QString::unicode().

Referenced by getattr(), getch(), getname(), skip_ws(), skip_ws_end(), and skipblock().

unsigned short striphtml::parse_m  )  [private]
 

void striphtml::parse_paragraph CStyle currentstyle,
tchar ch,
unsigned  long
[private]
 

Definition at line 629 of file striphtml.cpp.

References CList< T >::first(), forcecentre, g, getattr(), getname(), CList< T >::isEmpty(), parse_color(), qDebug(), CStyle::setCentreJustify(), CStyle::setColour(), CStyle::setFullJustify(), CStyle::setPaper(), CStyle::setRightJustify(), skip_ws(), stylestack, UEOF, and CStyle::unset().

Referenced by getch().

void striphtml::reset  )  [private]
 

Definition at line 92 of file striphtml.cpp.

References currentstyle, forcecentre, ignorespace, indent, CList< T >::isEmpty(), m_inblock, CList< T >::pop(), q, stylestack, tablenesteddepth, text_q, and CStyle::unset().

Referenced by findanchor(), hyperlink(), and locate().

void striphtml::saveposn const QString f,
size_t  posn
[inline, virtual]
 

Reimplemented from CFilter.

Definition at line 53 of file striphtml.h.

References m_nav, and CNavigation_base< T >::saveposn().

void striphtml::setchm bool  _b  )  [inline]
 

Definition at line 93 of file striphtml.h.

References m_bchm.

Referenced by QTReader::getfilter().

unsigned short striphtml::skip_ws  )  [private]
 

Definition at line 371 of file striphtml.cpp.

References mygetch(), and UEOF.

Referenced by getattr(), getch(), getpara(), parse_paragraph(), and skipblock().

unsigned short striphtml::skip_ws_end unsigned long &   )  [private]
 

Definition at line 390 of file striphtml.cpp.

References mygetch(), and UEOF.

unsigned short striphtml::skip_ws_end  )  [private]
 

Definition at line 384 of file striphtml.cpp.

Referenced by getch().

void striphtml::skipblock const QString  )  [private]
 

Definition at line 72 of file striphtml.cpp.

References getname(), mygetch(), pos, qDebug(), skip_ws(), and UEOF.

Referenced by getch().

void striphtml::writeposn const QString f,
size_t  posn
[inline, virtual]
 

Reimplemented from CFilter.

Definition at line 54 of file striphtml.h.

References m_nav, and CNavigation_base< T >::writeposn().


Member Data Documentation

QString striphtml::currentfile [private]
 

Definition at line 29 of file striphtml.h.

Referenced by getch(), and hyperlink().

unsigned long striphtml::currentid [private]
 

Definition at line 27 of file striphtml.h.

Referenced by getch().

CStyle striphtml::currentstyle [private]
 

Definition at line 19 of file striphtml.h.

Referenced by getch(), and reset().

QMap<QString, tchar>* striphtml::entmap [private]
 

Definition at line 18 of file striphtml.h.

Referenced by getch(), initentmap(), and ~striphtml().

bool striphtml::forcecentre [private]
 

Definition at line 31 of file striphtml.h.

Referenced by getch(), parse_paragraph(), and reset().

QMap<QString, unsigned long>* striphtml::href2filepos [private]
 

Definition at line 25 of file striphtml.h.

Referenced by hyperlink(), striphtml(), and ~striphtml().

QMap<unsigned long, QString>* striphtml::id2href [private]
 

Definition at line 26 of file striphtml.h.

Referenced by hyperlink(), striphtml(), and ~striphtml().

bool striphtml::ignorespace [private]
 

Definition at line 13 of file striphtml.h.

Referenced by getch(), and reset().

int striphtml::indent [private]
 

Definition at line 33 of file striphtml.h.

Referenced by getch(), and reset().

bool striphtml::isPre [private]
 

Definition at line 20 of file striphtml.h.

Referenced by getch(), getpara(), and mygetch().

tchar striphtml::lastch [private]
 

Definition at line 28 of file striphtml.h.

Referenced by getch().

bool striphtml::m_bchm [private]
 

Definition at line 14 of file striphtml.h.

Referenced by hyperlink(), and setchm().

int striphtml::m_ctr[m_cmaxdepth] [private]
 

Definition at line 35 of file striphtml.h.

Referenced by getch().

bool striphtml::m_inblock [private]
 

Definition at line 31 of file striphtml.h.

Referenced by mygetch(), and reset().

int striphtml::m_listtype[m_cmaxdepth] [private]
 

Definition at line 34 of file striphtml.h.

Referenced by getch().

CNavigation_base< htmlmark > striphtml::m_nav [static, private]
 

Definition at line 70 of file striphtml.cpp.

Referenced by back(), forward(), hyperlink(), saveposn(), and writeposn().

QString striphtml::q [private]
 

Definition at line 30 of file striphtml.h.

Referenced by getch(), and reset().

CList<CStyle> striphtml::stylestack [private]
 

Definition at line 16 of file striphtml.h.

Referenced by getch(), parse_paragraph(), and reset().

int striphtml::tablenesteddepth [private]
 

Definition at line 15 of file striphtml.h.

Referenced by getch(), and reset().

QString striphtml::text_q [private]
 

Definition at line 32 of file striphtml.h.

Referenced by getch(), mygetch(), and reset().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:52:39 2005 for OPIE by  doxygen 1.4.2