diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /libkdepim/statusbarprogresswidget.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdepim/statusbarprogresswidget.cpp')
-rw-r--r-- | libkdepim/statusbarprogresswidget.cpp | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/libkdepim/statusbarprogresswidget.cpp b/libkdepim/statusbarprogresswidget.cpp index 3d0229fc5..c6fa807a2 100644 --- a/libkdepim/statusbarprogresswidget.cpp +++ b/libkdepim/statusbarprogresswidget.cpp @@ -43,14 +43,14 @@ using KPIM::ProgressManager; #include <kiconloader.h> #include <kdebug.h> -#include <qtimer.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qtooltip.h> +#include <tqtimer.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqtooltip.h> #include <klocale.h> -#include <qlayout.h> -#include <qwidgetstack.h> -#include <qframe.h> +#include <tqlayout.h> +#include <tqwidgetstack.h> +#include <tqframe.h> #include "progressdialog.h" #include "statusbarprogresswidget.h" @@ -58,36 +58,36 @@ using KPIM::ProgressManager; using namespace KPIM; //----------------------------------------------------------------------------- -StatusbarProgressWidget::StatusbarProgressWidget( ProgressDialog* progressDialog, QWidget* parent, bool button ) - : QFrame( parent ), mCurrentItem( 0 ), mProgressDialog( progressDialog ), +StatusbarProgressWidget::StatusbarProgressWidget( ProgressDialog* progressDialog, TQWidget* parent, bool button ) + : TQFrame( parent ), mCurrentItem( 0 ), mProgressDialog( progressDialog ), mDelayTimer( 0 ), mBusyTimer( 0 ) { m_bShowButton = button; int w = fontMetrics().width( " 999.9 kB/s 00:00:01 " ) + 8; - box = new QHBoxLayout( this, 0, 0 ); + box = new TQHBoxLayout( this, 0, 0 ); - m_pButton = new QPushButton( this ); - m_pButton->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, - QSizePolicy::Minimum ) ); + m_pButton = new TQPushButton( this ); + m_pButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, + TQSizePolicy::Minimum ) ); m_pButton->setPixmap( SmallIcon( "up" ) ); box->addWidget( m_pButton ); - stack = new QWidgetStack( this ); + stack = new TQWidgetStack( this ); stack->setMaximumHeight( fontMetrics().height() ); box->addWidget( stack ); m_sslLabel = new SSLLabel( this ); box->addWidget( m_sslLabel ); - QToolTip::add( m_pButton, i18n("Open detailed progress dialog") ); + TQToolTip::add( m_pButton, i18n("Open detailed progress dialog") ); m_pProgressBar = new KProgress( this ); m_pProgressBar->setLineWidth( 1 ); - m_pProgressBar->setFrameStyle( QFrame::Box ); + m_pProgressBar->setFrameStyle( TQFrame::Box ); m_pProgressBar->installEventFilter( this ); m_pProgressBar->setMinimumWidth( w ); stack->addWidget( m_pProgressBar, 1 ); - m_pLabel = new QLabel( QString::null, this ); + m_pLabel = new TQLabel( TQString::null, this ); m_pLabel->setAlignment( AlignHCenter | AlignVCenter ); m_pLabel->installEventFilter( this ); m_pLabel->setMinimumWidth( w ); @@ -98,20 +98,20 @@ StatusbarProgressWidget::StatusbarProgressWidget( ProgressDialog* progressDialog mode = None; setMode(); - connect( m_pButton, SIGNAL( clicked() ), - progressDialog, SLOT( slotToggleVisibility() ) ); + connect( m_pButton, TQT_SIGNAL( clicked() ), + progressDialog, TQT_SLOT( slotToggleVisibility() ) ); - connect ( ProgressManager::instance(), SIGNAL( progressItemAdded( KPIM::ProgressItem * ) ), - this, SLOT( slotProgressItemAdded( KPIM::ProgressItem * ) ) ); - connect ( ProgressManager::instance(), SIGNAL( progressItemCompleted( KPIM::ProgressItem * ) ), - this, SLOT( slotProgressItemCompleted( KPIM::ProgressItem * ) ) ); + connect ( ProgressManager::instance(), TQT_SIGNAL( progressItemAdded( KPIM::ProgressItem * ) ), + this, TQT_SLOT( slotProgressItemAdded( KPIM::ProgressItem * ) ) ); + connect ( ProgressManager::instance(), TQT_SIGNAL( progressItemCompleted( KPIM::ProgressItem * ) ), + this, TQT_SLOT( slotProgressItemCompleted( KPIM::ProgressItem * ) ) ); - connect ( progressDialog, SIGNAL( visibilityChanged( bool )), - this, SLOT( slotProgressDialogVisible( bool ) ) ); + connect ( progressDialog, TQT_SIGNAL( visibilityChanged( bool )), + this, TQT_SLOT( slotProgressDialogVisible( bool ) ) ); - mDelayTimer = new QTimer( this ); - connect ( mDelayTimer, SIGNAL( timeout() ), - this, SLOT( slotShowItemDelayed() ) ); + mDelayTimer = new TQTimer( this ); + connect ( mDelayTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( slotShowItemDelayed() ) ); } // There are three cases: no progressitem, one progressitem (connect to it directly), @@ -130,9 +130,9 @@ void StatusbarProgressWidget::slotProgressItemAdded( ProgressItem *item ) } else { // N items if ( !mBusyTimer ) { - mBusyTimer = new QTimer( this ); - connect( mBusyTimer, SIGNAL( timeout() ), - this, SLOT( slotBusyIndicator() ) ); + mBusyTimer = new TQTimer( this ); + connect( mBusyTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( slotBusyIndicator() ) ); mDelayTimer->start( 1000, true ); } } @@ -144,7 +144,7 @@ void StatusbarProgressWidget::slotProgressItemCompleted( ProgressItem *item ) connectSingleItem(); // if going back to 1 item if ( ProgressManager::instance()->isEmpty() ) { // No item // Done. In 5s the progress-widget will close, then we can clean up the statusbar - QTimer::singleShot( 5000, this, SLOT( slotClean() ) ); + TQTimer::singleShot( 5000, this, TQT_SLOT( slotClean() ) ); } else if ( mCurrentItem ) { // Exactly one item delete mBusyTimer; mBusyTimer = 0; @@ -155,14 +155,14 @@ void StatusbarProgressWidget::slotProgressItemCompleted( ProgressItem *item ) void StatusbarProgressWidget::connectSingleItem() { if ( mCurrentItem ) { - disconnect ( mCurrentItem, SIGNAL( progressItemProgress( KPIM::ProgressItem *, unsigned int ) ), - this, SLOT( slotProgressItemProgress( KPIM::ProgressItem *, unsigned int ) ) ); + disconnect ( mCurrentItem, TQT_SIGNAL( progressItemProgress( KPIM::ProgressItem *, unsigned int ) ), + this, TQT_SLOT( slotProgressItemProgress( KPIM::ProgressItem *, unsigned int ) ) ); mCurrentItem = 0; } mCurrentItem = ProgressManager::instance()->singleItem(); if ( mCurrentItem ) { - connect ( mCurrentItem, SIGNAL( progressItemProgress( KPIM::ProgressItem *, unsigned int ) ), - this, SLOT( slotProgressItemProgress( KPIM::ProgressItem *, unsigned int ) ) ); + connect ( mCurrentItem, TQT_SIGNAL( progressItemProgress( KPIM::ProgressItem *, unsigned int ) ), + this, TQT_SLOT( slotProgressItemProgress( KPIM::ProgressItem *, unsigned int ) ) ); } } @@ -254,10 +254,10 @@ void StatusbarProgressWidget::slotClean() } } -bool StatusbarProgressWidget::eventFilter( QObject *, QEvent *ev ) +bool StatusbarProgressWidget::eventFilter( TQObject *, TQEvent *ev ) { - if ( ev->type() == QEvent::MouseButtonPress ) { - QMouseEvent *e = (QMouseEvent*)ev; + if ( ev->type() == TQEvent::MouseButtonPress ) { + TQMouseEvent *e = (TQMouseEvent*)ev; if ( e->button() == LeftButton && mode != None ) { // toggle view on left mouse button // Consensus seems to be that we should show/hide the fancy dialog when the user @@ -274,13 +274,13 @@ void StatusbarProgressWidget::slotProgressDialogVisible( bool b ) // Update the hide/show button when the detailed one is shown/hidden if ( b ) { m_pButton->setPixmap( SmallIcon( "down" ) ); - QToolTip::remove( m_pButton ); - QToolTip::add( m_pButton, i18n("Hide detailed progress window") ); + TQToolTip::remove( m_pButton ); + TQToolTip::add( m_pButton, i18n("Hide detailed progress window") ); setMode(); } else { m_pButton->setPixmap( SmallIcon( "up" ) ); - QToolTip::remove( m_pButton ); - QToolTip::add( m_pButton, i18n("Show detailed progress window") ); + TQToolTip::remove( m_pButton ); + TQToolTip::add( m_pButton, i18n("Show detailed progress window") ); } } |