diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:43:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:43:15 +0000 |
commit | e654398e46e37abf457b2b1122ab898d2c51c49f (patch) | |
tree | d39ee6440f3c3663c3ead84a2d4cc2d034667e96 /arts/gui/kde/klevelmeter_linebars.cpp | |
parent | e4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff) | |
download | tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'arts/gui/kde/klevelmeter_linebars.cpp')
-rw-r--r-- | arts/gui/kde/klevelmeter_linebars.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/arts/gui/kde/klevelmeter_linebars.cpp b/arts/gui/kde/klevelmeter_linebars.cpp index 3292ba4a..6d63a18c 100644 --- a/arts/gui/kde/klevelmeter_linebars.cpp +++ b/arts/gui/kde/klevelmeter_linebars.cpp @@ -21,14 +21,14 @@ #include "klevelmeter_linebars.h" #include <kdebug.h> -#include <qpainter.h> -#include <qpixmap.h> +#include <tqpainter.h> +#include <tqpixmap.h> -KLevelMeter_LineBars::KLevelMeter_LineBars( Arts::KLevelMeter_impl* impl, QWidget* parent, long substyle, long count, Arts::Direction dir, float _dbmin, float _dbmax ) : KLevelMeter_Template( impl, parent, substyle, count, dir, _dbmin, _dbmax ) +KLevelMeter_LineBars::KLevelMeter_LineBars( Arts::KLevelMeter_impl* impl, TQWidget* parent, long substyle, long count, Arts::Direction dir, float _dbmin, float _dbmax ) : KLevelMeter_Template( impl, parent, substyle, count, dir, _dbmin, _dbmax ) , _value( 0.0 ) , _peak( 0.0 ) { -//kdDebug()<<"KLevelMeter_LineBars::KLevelMeter_LineBars( Arts::KLevelMeter_impl* "<<impl<<", QWidget* "<<parent<<", long "<<substyle<<", long "<<count<<", Arts::Direction "<<dir<<", float "<<_dbmin<<", float "<<_dbmax<<" )"<<endl; +//kdDebug()<<"KLevelMeter_LineBars::KLevelMeter_LineBars( Arts::KLevelMeter_impl* "<<impl<<", TQWidget* "<<parent<<", long "<<substyle<<", long "<<count<<", Arts::Direction "<<dir<<", float "<<_dbmin<<", float "<<_dbmax<<" )"<<endl; this->setMinimumSize( 5, 5 ); this->substyle( substyle ); _stdcolors = colorGroup(); @@ -47,9 +47,9 @@ void KLevelMeter_LineBars::substyle( long n ) { } long KLevelMeter_LineBars::substyle() { return _substyle; } -void KLevelMeter_LineBars::paintEvent( QPaintEvent* ) { - QPixmap pm( size() ); - QPainter p( &pm ); +void KLevelMeter_LineBars::paintEvent( TQPaintEvent* ) { + TQPixmap pm( size() ); + TQPainter p( &pm ); switch ( _dir ) { case Arts::BottomToTop: @@ -69,16 +69,16 @@ void KLevelMeter_LineBars::paintEvent( QPaintEvent* ) { } if ( _substyle & 1 ) - p.setBrush( ( _peak<1 )?QColor( 0,0,255 ):QColor( 255,0,0 ) ); + p.setBrush( ( _peak<1 )?TQColor( 0,0,255 ):TQColor( 255,0,0 ) ); else - p.setBrush( ( _peak<1 )?color( _value ):QColor( 255,0,0 ) ); + p.setBrush( ( _peak<1 )?color( _value ):TQColor( 255,0,0 ) ); - QColor bgcolor = ( _substyle & 2 ) ? p.brush().color().dark() : _stdcolors.background(); + TQColor bgcolor = ( _substyle & 2 ) ? p.brush().color().dark() : _stdcolors.background(); pm.fill( bgcolor ); p.setPen( NoPen ); - QSize s = size(); + TQSize s = size(); if ( Arts::LeftToRight == _dir || Arts::RightToLeft == _dir ) s.transpose(); @@ -89,7 +89,7 @@ void KLevelMeter_LineBars::paintEvent( QPaintEvent* ) { p.drawRect( 0, top, w, h ); // PeakBar if ( _peak > 1.0/1000 && _peak <= 1.0 ) { - p.setPen( QColor( 255-bgcolor.red(), 255-bgcolor.green(), 255-bgcolor.blue() ) ); + p.setPen( TQColor( 255-bgcolor.red(), 255-bgcolor.green(), 255-bgcolor.blue() ) ); top = int( s.height() * ( 1 - _peak ) ); p.drawLine( 0, top, w, top ); } @@ -100,8 +100,8 @@ void KLevelMeter_LineBars::paintEvent( QPaintEvent* ) { /** Planned feature: a little Tooltip showing the actual value of the volume in deziBel and perhaps as linear scaleFactor */ -void KLevelMeter_LineBars::mouseMoveEvent( QMouseEvent* /*qme*/ ) { -//kdDebug()<<"KLevelMeter_LineBars::mouseMoveEvent(QMouseEvent* "<<qme<<" )"<<endl; +void KLevelMeter_LineBars::mouseMoveEvent( TQMouseEvent* /*qme*/ ) { +//kdDebug()<<"KLevelMeter_LineBars::mouseMoveEvent(TQMouseEvent* "<<qme<<" )"<<endl; //kdDebug()<<"qme.y()="<<this->height()-qme->y()<<" db="<<db<<" dbtoamp(db)="<<dbtoamp( db )<<endl; } |