Diffstat (limited to 'noncore/apps/opie-reader/CDrawBuffer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/CDrawBuffer.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/noncore/apps/opie-reader/CDrawBuffer.cpp b/noncore/apps/opie-reader/CDrawBuffer.cpp index ec36fb2..b137ac3 100644 --- a/noncore/apps/opie-reader/CDrawBuffer.cpp +++ b/noncore/apps/opie-reader/CDrawBuffer.cpp @@ -39,9 +39,9 @@ void CDrawBuffer::setright(CDrawBuffer& rhs, int f) CDrawBuffer& CDrawBuffer::operator=(CDrawBuffer& rhs) { int i; -// //qDebug("Trying 2"); +// //odebug << "Trying 2" << oendl; len = rhs.len; m_maxstyle = rhs.m_maxstyle; m_ascent = rhs.m_ascent; m_descent = rhs.m_descent; @@ -57,9 +57,9 @@ CDrawBuffer& CDrawBuffer::operator=(CDrawBuffer& rhs) } for (i = 0; rhs[i] != '\0'; i++) (*this)[i] = rhs[i]; (*this)[i] = '\0'; len = i; -// //qDebug("Tried 2"); +// //odebug << "Tried 2" << oendl; return *this; } CDrawBuffer& CDrawBuffer::operator=(const tchar*sztmp) @@ -207,9 +207,9 @@ int CDrawBuffer::width(int numchars, bool onscreen, int scwidth, unsigned char _ } else { QString nstr = str.mid(lastspace+1, nsp-lastspace); -// qDebug("str:%s: last:%d new:%d nstr:%s:", (const char*)str, lastspace, nsp, (const char*)nstr); +// odebug << "str:" << str << ": last:" << lastspace << " new:" << nsp << " nstr:" << nstr << ":" << oendl; int lw = fm.width(nstr); cx += lw; lastspace = nsp; } @@ -316,9 +316,9 @@ void CDrawBuffer::render(QPainter* _p, int _y, bool _bMono, int _charWidth, int int end = (textend != segs.end()) ? textend->start : len; CStyle currentstyle = textstart->style; QFont f((currentstyle.isMono() && fc->hasCourier()) ? fc->fixedfontname() : fc->name(), fc->getsize(currentstyle), (currentstyle.isBold()) ? QFont::Bold : QFont::Normal, (currentstyle.isItalic()) ); // f.setUnderline(currentstyle.isUnderline()); -// if (currentstyle.isUnderline()) qDebug("UNDERLINE"); +// if (currentstyle.isUnderline()) odebug << "UNDERLINE" << oendl; _p->setFont(f); QString str = text.mid(textstart->start, end-textstart->start); #if defined(OPIE) || !defined(USEQPE) _p->setPen(QPen(QColor(currentstyle.Red(), currentstyle.Green(), currentstyle.Blue()), fc->getsize(currentstyle)/100)); @@ -407,9 +407,9 @@ void CDrawBuffer::render(QPainter* _p, int _y, bool _bMono, int _charWidth, int { spacenumber++; int nexttoadd = (extraspace*spacenumber+spaces/2)/spaces - spacesofar; QString nstr = str.mid(lastspace+1, nsp-lastspace); -// qDebug("str:%s: last:%d new:%d nstr:%s:", (const char*)str, lastspace, nsp, (const char*)nstr); +// odebug << "str:" << str << ": last:" << lastspace << " new:" << nsp << " nstr:" << nstr << ":" << oendl; int lw = fm.width(nstr); _p->drawText( cx, _y+voffset, nstr); cx += lw+nexttoadd; spacesofar += nexttoadd; @@ -417,9 +417,9 @@ void CDrawBuffer::render(QPainter* _p, int _y, bool _bMono, int _charWidth, int } else { QString nstr = str.mid(lastspace+1, nsp-lastspace); -// qDebug("str:%s: last:%d new:%d nstr:%s:", (const char*)str, lastspace, nsp, (const char*)nstr); +// odebug << "str:" << str << ": last:" << lastspace << " new:" << nsp << " nstr:" << nstr << ":" << oendl; int lw = fm.width(nstr); _p->drawText( cx, _y+voffset, nstr); cx += lw; lastspace = nsp; @@ -469,16 +469,16 @@ linkType CDrawBuffer::getLinkType(int numchars, size_t& tgt) textend++; end = (textend != segs.end()) ? textend->start : len; currentstyle = textstart->style; /* - if (currentstyle.isPicture()) qDebug("Passed thru picture"); - if (currentstyle.getLink()) qDebug("Passed thru link"); - //qDebug("islink:%d - %d", numchars, end); + if (currentstyle.isPicture()) odebug << "Passed thru picture" << oendl; + if (currentstyle.getLink()) odebug << "Passed thru link" << oendl; + //odebug << "islink:" << numchars << " - " << end << "" << oendl; */ textstart = textend; } while (textend != segs.end() && end <= numchars); -// if (currentstyle.isPicture()) qDebug("Clicked on picture"); +// if (currentstyle.isPicture()) odebug << "Clicked on picture" << oendl; if (currentstyle.getPictureLink()) { tgt = currentstyle.getPictureLinkData(); return ePicture; @@ -538,9 +538,9 @@ void CDrawBuffer::resize() } if (m_bSop) { int xt = ((segs.begin()->style.getExtraSpace()+fc->getextraspace())*fc->getsize(segs.begin()->style)+5)/10; -// qDebug("ExtraSpace:%d", xt); +// odebug << "ExtraSpace:" << xt << "" << oendl; m_ascent += xt; m_lineSpacing += xt; } } |