author | ar <ar> | 2004-05-27 22:04:46 (UTC) |
---|---|---|
committer | ar <ar> | 2004-05-27 22:04:46 (UTC) |
commit | 4f7c3c4d0d634706d13950b3827714b168e279e3 (patch) (side-by-side diff) | |
tree | 2df448e7a4dcd538c26365873e194be2b55e83b7 /noncore/apps/opie-reader/QTReader.h | |
parent | 46f81a089ba8febdb79e0d150b69f74bb1ea7d18 (diff) | |
download | opie-4f7c3c4d0d634706d13950b3827714b168e279e3.zip opie-4f7c3c4d0d634706d13950b3827714b168e279e3.tar.gz opie-4f7c3c4d0d634706d13950b3827714b168e279e3.tar.bz2 |
- convert qDebug to odebug
Diffstat (limited to 'noncore/apps/opie-reader/QTReader.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/QTReader.h | 124 |
1 files changed, 62 insertions, 62 deletions
diff --git a/noncore/apps/opie-reader/QTReader.h b/noncore/apps/opie-reader/QTReader.h index dfbdfb9..f89de63 100644 --- a/noncore/apps/opie-reader/QTReader.h +++ b/noncore/apps/opie-reader/QTReader.h @@ -12,26 +12,26 @@ //#include <qtimer.h> class CDrawBuffer; //class CBuffer; class QPainter; class QTimer; class QPixmap; class QTReader : public QWidget { Q_OBJECT - static tchar pluckernextpart[]; - static tchar jplucknextpart[]; + static tchar pluckernextpart[]; + static tchar jplucknextpart[]; friend class QTReaderApp; void suspend(); void increaseScroll(); void reduceScroll(); void drawText(QPainter& p, int x, int y, tchar* text); int m_delay; unsigned int m_overlap; bool m_autoScroll, m_swapmouse; void autoscroll(); QTimer* timer; int m_scrolldy1, m_scrolldy2, m_encd, m_scrollpart; void focusInEvent(QFocusEvent*); @@ -50,123 +50,123 @@ class QTReader : public QWidget FILE* m_pipeout; QString m_pipetarget; bool m_isPaused; bool m_pauseAfterEachPara; #endif public: QTReader( QWidget *parent=0, const char *name=0, WFlags f = 0); // QTReader( const QString& filename, QWidget *parent=0, const tchar *name=0, WFlags f = 0); ~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); - } + { + buffdoc.setSaveData(data, len, src, srclen); + } void putSaveData(unsigned char*& src, unsigned short& srclen) - { - buffdoc.putSaveData(src, srclen); - } + { + buffdoc.putSaveData(src, srclen); + } bool empty(); void setContinuous(bool _b); void toggle_autoscroll(); void setautoscroll(bool); void disableAutoscroll() { m_autoScroll = false; } void copy() { /* size_t nd = locate(); - jumpto(m_mark); + jumpto(m_mark); QString text; while (m_mark < nd) { text += buffdoc.getch(); m_mark++; } QApplication::clipboard()->setText(text); jumpto(nd); */ }; void clear() {}; void setText(const QString& n, const QString& s) { m_string = n; load_file((const char*)s); }; /* void setText(bool oldfile) { - if (oldfile) - { - m_string = m_lastfile; - load_file((const tchar*)m_string); - } - else - { - m_string = QString::null; - } + if (oldfile) + { + m_string = m_lastfile; + load_file((const tchar*)m_string); + } + else + { + m_string = QString::null; + } }; */ void setlead(int _lead) - { - m_fontControl.setlead(_lead); - } + { + m_fontControl.setlead(_lead); + } int getlead() - { - return m_fontControl.getlead(); - } + { + return m_fontControl.getlead(); + } void setextraspace(int _lead) - { - m_fontControl.setextraspace(_lead); - } + { + m_fontControl.setextraspace(_lead); + } int getextraspace() - { - return m_fontControl.getextraspace(); - } + { + return m_fontControl.getextraspace(); + } void setpagemode(bool _b) { - m_bpagemode = _b; + m_bpagemode = _b; } void setmono(bool _b) { - m_bMonoSpaced = _b; - ChangeFont(m_fontControl.currentsize()); - locate(pagelocate()); + m_bMonoSpaced = _b; + ChangeFont(m_fontControl.currentsize()); + locate(pagelocate()); } void setencoding(int _f) - { - m_encd = _f; - setfilter(getfilter()); - } + { + m_encd = _f; + setfilter(getfilter()); + } MarkupType PreferredMarkup(); CEncoding* getencoding() - { -// qDebug("m_encd:%d", m_encd); - switch (m_encd) - { - case 4: -// qDebug("palm"); - return new CPalm; - case 1: -// qDebug("utf8"); - return new CUtf8; - case 2: -// qDebug("ucs16be"); - return new CUcs16be; - case 3: -// qDebug("ucs16le"); - return new CUcs16le; - case 0: -// qDebug("ascii"); - return new CAscii; - default: - return new CGeneral8Bit(m_encd-MAX_ENCODING+1); - } - } + { +// odebug << "m_encd:" << m_encd << oendl; + switch (m_encd) + { + case 4: +// odebug << "palm" << oendl; + return new CPalm; + case 1: +// odebug << "utf8" << oendl; + return new CUtf8; + case 2: +// odebug << "ucs16be" << oendl; + return new CUcs16be; + case 3: +// odebug << "ucs16le" << oendl; + return new CUcs16le; + case 0: +// odebug << "ascii" << oendl; + return new CAscii; + default: + return new CGeneral8Bit(m_encd-MAX_ENCODING+1); + } + } CFilterChain* getfilter() { CFilterChain * filt = new CFilterChain(getencoding()); if (bstripcr) filt->addfilter(new stripcr); if (btextfmt || (bautofmt && (PreferredMarkup() == cTEXT))) filt->addfilter(new textfmt); if (bpeanut || (bautofmt && (PreferredMarkup() == cPML))) filt->addfilter(new PeanutFormatter); if (bstriphtml || (bautofmt && (PreferredMarkup() == cHTML))) filt->addfilter(new striphtml); if (bdehyphen) filt->addfilter(new dehyphen); if (bunindent) filt->addfilter(new unindent); if (brepara) filt->addfilter(new repara); @@ -180,25 +180,25 @@ public: if (bdepluck) filt->addfilter(new DePluck(pluckernextpart)); if (bdejpluck) filt->addfilter(new DePluck(jplucknextpart)); if (bmakebold) filt->addfilter(new embolden); if (bfulljust) filt->addfilter(new FullJust); return filt; } private slots: void goHome(); void goBack(); void goForward(); - void doscroll(); + void doscroll(); void drawIt( QPainter * ); void paintEvent( QPaintEvent * ); // void resizeEvent( QResizeEvent * p ) { update(); } void keyPressEvent(QKeyEvent*); void drawFonts(QPainter*); private: void setTwoTouch(bool _b); void init(); void mousePressEvent( QMouseEvent* ); void mouseReleaseEvent( QMouseEvent* ); // void mouseDoubleClickEvent( QMouseEvent* ); QString m_string, m_fontname; |