diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-01 23:15:51 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-01 23:15:51 +0000 |
commit | 6b1b516f42036cf9eff691dba3fd6e9eab82a7e1 (patch) | |
tree | 6830f75fd57d0fac7e33c097ee98b210e90c5239 /src/progressindicator.cpp | |
parent | 6318b8bb3ef964cfa99ba454a2630779cc9ac3ec (diff) | |
download | soundkonverter-6b1b516f42036cf9eff691dba3fd6e9eab82a7e1.tar.gz soundkonverter-6b1b516f42036cf9eff691dba3fd6e9eab82a7e1.zip |
TQt4 port soundkonverter
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/soundkonverter@1239038 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/progressindicator.cpp')
-rwxr-xr-x | src/progressindicator.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/progressindicator.cpp b/src/progressindicator.cpp index 91a40a2..bc8ec76 100755 --- a/src/progressindicator.cpp +++ b/src/progressindicator.cpp @@ -1,10 +1,10 @@ #include "progressindicator.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qprogressbar.h> -#include <qtooltip.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqprogressbar.h> +#include <tqtooltip.h> #include <klocale.h> #include <ksystemtray.h> @@ -13,40 +13,40 @@ // #include <kdebug.h> -ProgressIndicator::ProgressIndicator( KSystemTray* _systemTray, QWidget* parent, const char* name ) - : QWidget( parent, name ) +ProgressIndicator::ProgressIndicator( KSystemTray* _systemTray, TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { systemTray = _systemTray; time = processedTime = 0; - QGridLayout *grid = new QGridLayout( this, 1, 1, 0, 6, "grid" ); + TQGridLayout *grid = new TQGridLayout( this, 1, 1, 0, 6, "grid" ); - QHBoxLayout *box = new QHBoxLayout( ); + TQHBoxLayout *box = new TQHBoxLayout( ); grid->addLayout( box, 0, 0 ); - pBar = new QProgressBar( this, "pBar" ); + pBar = new TQProgressBar( this, "pBar" ); box->addWidget( pBar ); - QGridLayout *statusChildGrid = new QGridLayout( box, 2, 2, 6, "statusChildGrid" ); + TQGridLayout *statusChildGrid = new TQGridLayout( box, 2, 2, 6, "statusChildGrid" ); - QLabel *lSpeedText = new QLabel( i18n("Speed")+":", this, "lSpeedText" ); - statusChildGrid->addWidget( lSpeedText, 0, 0, Qt::AlignVCenter ); + TQLabel *lSpeedText = new TQLabel( i18n("Speed")+":", this, "lSpeedText" ); + statusChildGrid->addWidget( lSpeedText, 0, 0, TQt::AlignVCenter ); - lSpeed = new QLabel( "0.0x", this, "lSpeed" ); - lSpeed->setFont( QFont( "Courier" ) ); - statusChildGrid->addWidget( lSpeed, 0, 1, Qt::AlignVCenter | Qt::AlignRight ); + lSpeed = new TQLabel( "0.0x", this, "lSpeed" ); + lSpeed->setFont( TQFont( "Courier" ) ); + statusChildGrid->addWidget( lSpeed, 0, 1, TQt::AlignVCenter | TQt::AlignRight ); speedTime.setHMS( 24, 0, 0 ); - QLabel *lTimeText = new QLabel( i18n("Time remaining")+":", this, "lTimeText" ); - statusChildGrid->addWidget( lTimeText, 1, 0, Qt::AlignVCenter ); + TQLabel *lTimeText = new TQLabel( i18n("Time remaining")+":", this, "lTimeText" ); + statusChildGrid->addWidget( lTimeText, 1, 0, TQt::AlignVCenter ); - lTime = new QLabel( "00:00", this, "lTime" ); - lTime->setFont( QFont( "Courier" ) ); - statusChildGrid->addWidget( lTime, 1, 1, Qt::AlignVCenter | Qt::AlignRight ); + lTime = new TQLabel( "00:00", this, "lTime" ); + lTime->setFont( TQFont( "Courier" ) ); + statusChildGrid->addWidget( lTime, 1, 1, TQt::AlignVCenter | TQt::AlignRight ); elapsedTime.setHMS( 24, 0, 0 ); - QToolTip::add( systemTray, i18n("Waiting") ); + TQToolTip::add( systemTray, i18n("Waiting") ); } ProgressIndicator::~ProgressIndicator() @@ -92,7 +92,7 @@ void ProgressIndicator::finished( float t ) lTime->setText( "00:00" ); speedTime.setHMS( 24, 0, 0 ); lSpeed->setText( "0.0x" ); - QToolTip::add( systemTray, i18n("Finished") ); + TQToolTip::add( systemTray, i18n("Finished") ); emit setTitle( i18n("Finished") ); } @@ -117,7 +117,7 @@ void ProgressIndicator::update( float t ) int sec = tim % 60; int min = ( tim / 60 ) % 60; int hou = tim / 3600; - QString timeLeft; + TQString timeLeft; if( hou > 0 ) timeLeft.sprintf( "%d:%02d:%02d", hou, min, sec ); else @@ -130,15 +130,15 @@ void ProgressIndicator::update( float t ) float speed = ( processedTime + t - speedProcessedTime ) / tim; speedProcessedTime = processedTime + t; if( speed >= 0.0f && speed < 100000.0f ) { - QString actSpeed; + TQString actSpeed; actSpeed.sprintf( "%.1fx", speed ); lSpeed->setText( actSpeed ); } } - QString percent; + TQString percent; percent.sprintf( "%i%%", (int)fPercent ); emit setTitle( percent ); - QToolTip::add( systemTray, percent ); + TQToolTip::add( systemTray, percent ); } |