From e654398e46e37abf457b2b1122ab898d2c51c49f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:43:15 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- arts/gui/kde/kvolumefader_impl.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'arts/gui/kde/kvolumefader_impl.cpp') diff --git a/arts/gui/kde/kvolumefader_impl.cpp b/arts/gui/kde/kvolumefader_impl.cpp index 1b5cf7fe..1c32f23d 100644 --- a/arts/gui/kde/kvolumefader_impl.cpp +++ b/arts/gui/kde/kvolumefader_impl.cpp @@ -21,17 +21,17 @@ #include "kvolumefader_impl.h" #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include #include #include -KVolumeFader_impl::KVolumeFader_impl( QFrame* w ) +KVolumeFader_impl::KVolumeFader_impl( TQFrame* w ) : Arts::KFrame_impl( w ? w : new KVolumeFader_Widget( 0 ) ) , dB2VolCalc( -36, 6 ) , _dir( Arts::BottomToTop ) @@ -40,7 +40,7 @@ KVolumeFader_impl::KVolumeFader_impl( QFrame* w ) , direction_inupdate( false ) , ignoreUpdates( 0 ) { - //kdDebug()<<"KVolumeFader_impl::KVolumeFader_impl( QFrame* w="<( _qwidget ); _vfwidget->setImpl( this ); } @@ -114,14 +114,14 @@ void KVolumeFader_impl::constructor( float dbmin, float dbmax, Arts::Direction d -KVolumeFader_Widget::KVolumeFader_Widget( QWidget* p, const char* n ) - : QFrame( p,n ) +KVolumeFader_Widget::KVolumeFader_Widget( TQWidget* p, const char* n ) + : TQFrame( p,n ) , _impl( 0 ) , _inupdate( false ) , _value( -1 ) , _dir( Arts::BottomToTop ) , _menu( new KPopupMenu( this ) ) - , _aExactValue( new KAction( i18n( "Set Exact Value..." ), KShortcut(), this, SLOT( exactValue() ), this ) ) + , _aExactValue( new KAction( i18n( "Set Exact Value..." ), KShortcut(), this, TQT_SLOT( exactValue() ), this ) ) { //kdDebug() << k_funcinfo << endl; setMinimumSize( 10,10 ); @@ -144,16 +144,16 @@ void KVolumeFader_Widget::setValue( float n ) { } } -QColor KVolumeFader_Widget::interpolate( QColor low, QColor high, float percent ) { +TQColor KVolumeFader_Widget::interpolate( TQColor low, TQColor high, float percent ) { if ( percent<=0 ) return low; else if ( percent>=1 ) return high; else - return QColor( + return TQColor( int( low.red() + ( high.red()-low.red() ) * percent ), int( low.green() + ( high.green()-low.green() ) * percent ), int( low.blue() + ( high.blue()-low.blue() ) * percent ) ); } -void KVolumeFader_Widget::drawContents( QPainter* p ){ +void KVolumeFader_Widget::drawContents( TQPainter* p ){ if ( _dir==Arts::BottomToTop || _dir==Arts::BottomToTop ) { float h; if ( _dir==Arts::BottomToTop ) h = contentsRect().height() * ( 1 - _value ); @@ -178,11 +178,11 @@ void KVolumeFader_Widget::drawContents( QPainter* p ){ } } -void KVolumeFader_Widget::mousePressEvent( QMouseEvent* ){ +void KVolumeFader_Widget::mousePressEvent( TQMouseEvent* ){ //kdDebug() << k_funcinfo << endl; } -void KVolumeFader_Widget::mouseReleaseEvent( QMouseEvent* qme ){ +void KVolumeFader_Widget::mouseReleaseEvent( TQMouseEvent* qme ){ bool setValue = false; if ( KGlobalSettings::mouseSettings().handed == 0 && qme->button() == Qt::LeftButton ) setValue=true; if ( KGlobalSettings::mouseSettings().handed == 1 && qme->button() == Qt::RightButton ) setValue=true; @@ -206,7 +206,7 @@ void KVolumeFader_Widget::mouseReleaseEvent( QMouseEvent* qme ){ } else _menu->exec( qme->globalPos() ); } -void KVolumeFader_Widget::mouseMoveEvent( QMouseEvent* qme ){ +void KVolumeFader_Widget::mouseMoveEvent( TQMouseEvent* qme ){ switch ( _dir ) { default: case Arts::BottomToTop: @@ -224,7 +224,7 @@ void KVolumeFader_Widget::mouseMoveEvent( QMouseEvent* qme ){ } } -void KVolumeFader_Widget::wheelEvent( QWheelEvent* qwe ){ +void KVolumeFader_Widget::wheelEvent( TQWheelEvent* qwe ){ //kdDebug() << k_funcinfo << endl; if ( qwe->delta() < 0 ) { if ( _impl ) _impl->normalizedvolume( _impl->dbtondb( _impl->dbvolume() - 1 ) ); } if ( qwe->delta() > 0 ) { if ( _impl ) _impl->normalizedvolume( _impl->dbtondb( _impl->dbvolume() + 1 ) ); } -- cgit v1.2.1