diff options
Diffstat (limited to 'arts/gui/kde/kpoti.cpp')
-rw-r--r-- | arts/gui/kde/kpoti.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/arts/gui/kde/kpoti.cpp b/arts/gui/kde/kpoti.cpp index 538eb4ac..96a19e90 100644 --- a/arts/gui/kde/kpoti.cpp +++ b/arts/gui/kde/kpoti.cpp @@ -218,12 +218,12 @@ void KPoti::init(int value) potiPos = positionFromValue(value); clickOffset = 0; state = Idle; - track = TRUE; - ticks = TRUE; + track = true; + ticks = true; m_bLabel = true; tickInt = 0; - setFocusPolicy( TQ_TabFocus ); + setFocusPolicy( TQWidget::TabFocus ); initTicks(); } @@ -263,8 +263,8 @@ void KPoti::initTicks() /** - Enables slider tracking if \e enable is TRUE, or disables tracking - if \e enable is FALSE. + Enables slider tracking if \e enable is true, or disables tracking + if \e enable is false. If tracking is enabled (default), the slider emits the valueChanged() signal whenever the slider is being dragged. If @@ -283,7 +283,7 @@ void KPoti::setTracking( bool enable ) /** \fn bool KPoti::tracking() const - Returns TRUE if tracking is enabled, or FALSE if tracking is disabled. + Returns true if tracking is enabled, or false if tracking is disabled. Tracking is initially enabled. @@ -458,7 +458,7 @@ void KPoti::drawContents( TQPainter * p ) dbp.drawPixmap( d->buttonRect, d->bgPixmap( colorGroup() ) ); if( hasFocus() ) - style().tqdrawPrimitive( TQStyle::PE_FocusRect, &dbp, d->buttonRect, colorGroup() ); + style().drawPrimitive( TQStyle::PE_FocusRect, &dbp, d->buttonRect, colorGroup() ); paintPoti( &dbp ); dbp.end(); @@ -474,13 +474,13 @@ void KPoti::mousePressEvent( TQMouseEvent *e ) { resetState(); - if ( e->button() == Qt::MidButton ) { + if ( e->button() == TQt::MidButton ) { double pos = atan2( double(e->pos().x()-d->center.x()), double(- e->pos().y() + d->center.y()) ); movePoti( pos ); return; } - if ( e->button() != Qt::LeftButton ) + if ( e->button() != TQt::LeftButton ) return; @@ -495,15 +495,15 @@ void KPoti::mousePressEvent( TQMouseEvent *e ) subtractPage(); if ( !timer ) timer = new TQTimer( this ); - connect( timer, TQT_SIGNAL(timeout()), TQT_SLOT(repeatTimeout()) ); - timer->start( thresholdTime, TRUE ); + connect( timer, TQ_SIGNAL(timeout()), TQ_SLOT(repeatTimeout()) ); + timer->start( thresholdTime, true ); } else { state = TimingUp; addPage(); if ( !timer ) timer = new TQTimer( this ); - connect( timer, TQT_SIGNAL(timeout()), TQT_SLOT(repeatTimeout()) ); - timer->start( thresholdTime, TRUE ); + connect( timer, TQ_SIGNAL(timeout()), TQ_SLOT(repeatTimeout()) ); + timer->start( thresholdTime, true ); } } @@ -513,13 +513,13 @@ void KPoti::mousePressEvent( TQMouseEvent *e ) void KPoti::mouseMoveEvent( TQMouseEvent *e ) { - if ( (e->state() & Qt::MidButton) ) { // middle button wins + if ( (e->state() & TQt::MidButton) ) { // middle button wins double pos = atan2( double(e->pos().x()-d->center.x()), double(- e->pos().y()+d->center.y()) ); movePoti( pos ); return; } - if ( !(e->state() & Qt::LeftButton) ) + if ( !(e->state() & TQt::LeftButton) ) return; // left mouse button is up if ( state != Dragging ) return; @@ -535,7 +535,7 @@ void KPoti::mouseMoveEvent( TQMouseEvent *e ) void KPoti::mouseReleaseEvent( TQMouseEvent *e ) { - if ( !(e->button() & Qt::LeftButton) ) + if ( !(e->button() & TQt::LeftButton) ) return; resetState(); } @@ -695,10 +695,10 @@ void KPoti::repeatTimeout() Q_ASSERT( timer ); timer->disconnect(); if ( state == TimingDown ) - connect( timer, TQT_SIGNAL(timeout()), TQT_SLOT(subtractStep()) ); + connect( timer, TQ_SIGNAL(timeout()), TQ_SLOT(subtractStep()) ); else if ( state == TimingUp ) - connect( timer, TQT_SIGNAL(timeout()), TQT_SLOT(addStep()) ); - timer->start( repeatTime, FALSE ); + connect( timer, TQ_SIGNAL(timeout()), TQ_SLOT(addStep()) ); + timer->start( repeatTime, false ); } |