diff options
Diffstat (limited to 'arts/gui/kde/kvolumefader_impl.cpp')
-rw-r--r-- | arts/gui/kde/kvolumefader_impl.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
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 <kdebug.h> -#include <qpainter.h> -#include <qstyle.h> -#include <qfont.h> -#include <qfontmetrics.h> +#include <tqpainter.h> +#include <tqstyle.h> +#include <tqfont.h> +#include <tqfontmetrics.h> #include <kglobalsettings.h> #include <klocale.h> #include <kpopupmenu.h> #include <kaction.h> #include <kinputdialog.h> -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="<<w<<" )"<<endl; + //kdDebug()<<"KVolumeFader_impl::KVolumeFader_impl( TQFrame* w="<<w<<" )"<<endl; _vfwidget = static_cast<KVolumeFader_Widget*>( _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 ) ); } |