author | ar <ar> | 2004-06-02 22:20:53 (UTC) |
---|---|---|
committer | ar <ar> | 2004-06-02 22:20:53 (UTC) |
commit | 9135254f2b593741cf7b0ffd80bb8bb63986333d (patch) (side-by-side diff) | |
tree | 98248548d823b97970b2240695c958b7ce440a9d /libqtaux | |
parent | 8fe425e226eefcd652c4cb875d68fbd886d4c42c (diff) | |
download | opie-9135254f2b593741cf7b0ffd80bb8bb63986333d.zip opie-9135254f2b593741cf7b0ffd80bb8bb63986333d.tar.gz opie-9135254f2b593741cf7b0ffd80bb8bb63986333d.tar.bz2 |
- convert to odebug framework
-rw-r--r-- | libqtaux/oticker.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libqtaux/oticker.cpp b/libqtaux/oticker.cpp index e954cc8..29478fd 100644 --- a/libqtaux/oticker.cpp +++ b/libqtaux/oticker.cpp @@ -28,12 +28,14 @@ */ #include "oticker.h" /* OPIE */ +#include <opie2/odebug.h> + #include <qpe/config.h> using namespace Opie::Ui; OTicker::OTicker( QWidget* parent ) : QLabel( parent ) @@ -69,20 +71,20 @@ void OTicker::setFrame( int frameStyle ) } void OTicker::setText( const QString& text ) { pos = 0; // reset it everytime the text is changed scrollText = text; - qDebug( scrollText ); + odebug << scrollText << oendl; int pixelLen = 0; bool bigger = false; int contWidth = contentsRect().width(); int contHeight = contentsRect().height(); int pixelTextLen = fontMetrics().width( text ); - qDebug( "<<<<<<<height %d, width %d, text width %d %d\n", contHeight, contWidth, pixelTextLen, scrollText.length() ); + odebug << "<<<<<<<height " << contHeight << ", width " << contWidth << ", text width " << pixelTextLen << " " << scrollText.length() << "\n" << oendl; if ( pixelTextLen < contWidth ) { pixelLen = contWidth; } else { @@ -97,13 +99,13 @@ void OTicker::setText( const QString& text ) pmp.setPen( foregroundcolor ); pmp.drawText( 0, 0, pixelTextLen, contHeight, AlignVCenter, scrollText ); pmp.end(); scrollTextPixmap = pm; killTimers(); - // qDebug("Scrollupdate %d", updateTimerTime); + // odebug << "Scrollupdate " << updateTimerTime << "" << oendl; if ( bigger /*pixelTextLen > contWidth*/ ) startTimer( updateTimerTime ); update(); } @@ -120,13 +122,13 @@ void OTicker::drawContents( QPainter *p ) if ( pixelLen > contentsRect().width() ) // Scrolling p->drawPixmap( pos - pixelLen, contentsRect().y(), scrollTextPixmap ); } void OTicker::mouseReleaseEvent( QMouseEvent * ) { - // qDebug("<<<<<<<>>>>>>>>>"); + // odebug << "<<<<<<<>>>>>>>>>" << oendl; emit mousePressed(); } void OTicker::setUpdateTime( int time ) { updateTimerTime = time; |