diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-16 20:17:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-16 20:17:18 +0000 |
commit | f4fae92b6768541e2952173c3d4b09040f95bf7e (patch) | |
tree | d8c5d93232235cd635f3310b4d95490df181ba2d /libkdepim/progressdialog.cpp | |
parent | 125c0a08265b75a133644d3b55f47e37c919f45d (diff) | |
download | tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.tar.gz tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.zip |
Moved kpilot from kdepim to applications, as the core Trinity libraries should not contain hardware-dependent software
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1221127 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdepim/progressdialog.cpp')
-rw-r--r-- | libkdepim/progressdialog.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/libkdepim/progressdialog.cpp b/libkdepim/progressdialog.cpp index 227e73766..8c0ab889a 100644 --- a/libkdepim/progressdialog.cpp +++ b/libkdepim/progressdialog.cpp @@ -84,34 +84,34 @@ void TransactionItemView::resizeContents( int w, int h ) // (handling of TQEvent::LayoutHint in TQScrollView calls this method) //kdDebug(5300) << k_funcinfo << w << "," << h << endl; TQScrollView::resizeContents( w, h ); - // Tell the layout in the parent (progressdialog) that our size changed + // Tell the tqlayout in the parent (progressdialog) that our size changed updateGeometry(); // Resize the parent (progressdialog) - this works but resize horizontally too often - //parentWidget()->adjustSize(); + //tqparentWidget()->adjustSize(); TQApplication::sendPostedEvents( 0, TQEvent::ChildInserted ); TQApplication::sendPostedEvents( 0, TQEvent::LayoutHint ); - TQSize sz = parentWidget()->sizeHint(); - int currentWidth = parentWidget()->width(); + TQSize sz = tqparentWidget()->tqsizeHint(); + int currentWidth = tqparentWidget()->width(); // Don't resize to sz.width() every time when it only reduces a little bit if ( currentWidth < sz.width() || currentWidth > sz.width() + 100 ) currentWidth = sz.width(); - parentWidget()->resize( currentWidth, sz.height() ); + tqparentWidget()->resize( currentWidth, sz.height() ); } -TQSize TransactionItemView::sizeHint() const +TQSize TransactionItemView::tqsizeHint() const { - return minimumSizeHint(); + return tqminimumSizeHint(); } -TQSize TransactionItemView::minimumSizeHint() const +TQSize TransactionItemView::tqminimumSizeHint() const { int f = 2 * frameWidth(); // Make room for a vertical scrollbar in all cases, to avoid a horizontal one - int vsbExt = verticalScrollBar()->sizeHint().width(); - int minw = topLevelWidget()->width() / 3; - int maxh = topLevelWidget()->height() / 2; - TQSize sz( mBigBox->minimumSizeHint() ); + int vsbExt = verticalScrollBar()->tqsizeHint().width(); + int minw = tqtopLevelWidget()->width() / 3; + int maxh = tqtopLevelWidget()->height() / 2; + TQSize sz( mBigBox->tqminimumSizeHint() ); sz.setWidth( QMAX( sz.width(), minw ) + f + vsbExt ); sz.setHeight( QMIN( sz.height(), maxh ) + f ); return sz; @@ -146,7 +146,7 @@ TransactionItem::TransactionItem( TQWidget* parent, { setSpacing( 2 ); setMargin( 2 ); - setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) ); + tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) ); mFrame = new TQFrame( this ); mFrame->setFrameShape( TQFrame::HLine ); @@ -160,8 +160,8 @@ TransactionItem::TransactionItem( TQWidget* parent, mItemLabel = new TQLabel( item->label(), h ); // always interpret the label text as RichText, but disable word wrapping mItemLabel->setTextFormat( Qt::RichText ); - mItemLabel->setAlignment( Qt::AlignAuto | Qt::AlignVCenter | Qt::SingleLine ); - h->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) ); + mItemLabel->tqsetAlignment( Qt::AlignAuto | Qt::AlignVCenter | Qt::SingleLine ); + h->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) ); mProgress = new TQProgressBar( 100, h ); mProgress->setProgress( item->progress() ); @@ -175,17 +175,17 @@ TransactionItem::TransactionItem( TQWidget* parent, h = new TQHBox( this ); h->setSpacing( 5 ); - h->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) ); + h->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) ); mSSLLabel = new SSLLabel( h ); - mSSLLabel->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); + mSSLLabel->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); mItemStatus = new TQLabel( item->status(), h ); // always interpret the status text as RichText, but disable word wrapping mItemStatus->setTextFormat( Qt::RichText ); - mItemStatus->setAlignment( Qt::AlignAuto | Qt::AlignVCenter | Qt::SingleLine ); - // richtext leads to sizeHint acting as if wrapping was enabled though, + mItemStatus->tqsetAlignment( Qt::AlignAuto | Qt::AlignVCenter | Qt::SingleLine ); + // richtext leads to tqsizeHint acting as if wrapping was enabled though, // so make sure we only ever have the height of one line. - mItemStatus->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Ignored ) ); - mItemStatus->setFixedHeight( mItemLabel->sizeHint().height() ); + mItemStatus->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Ignored ) ); + mItemStatus->setFixedHeight( mItemLabel->tqsizeHint().height() ); setCrypto( item->usesCrypto() ); if( first ) hideHLine(); } @@ -209,7 +209,7 @@ void TransactionItem::setLabel( const TQString& label ) mItemLabel->setText( label ); } -void TransactionItem::setStatus( const TQString& status ) +void TransactionItem::seStatus( const TQString& status ) { mItemStatus->setText( status ); } @@ -258,7 +258,7 @@ ProgressDialog::ProgressDialog( TQWidget* alignWidget, TQWidget* parent, const c TQVBox* rightBox = new TQVBox( this ); TQToolButton* pbClose = new TQToolButton( rightBox ); pbClose->setAutoRaise(true); - pbClose->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); + pbClose->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); pbClose->setFixedSize( 16, 16 ); pbClose->setIconSet( KGlobal::iconLoader()->loadIconSet( "fileclose", KIcon::Small, 14 ) ); TQToolTip::add( pbClose, i18n( "Hide detailed progress window" ) ); @@ -309,7 +309,7 @@ void ProgressDialog::slotTransactionAdded( ProgressItem *item ) { TransactionItem *parent = 0; if ( item->parent() ) { - if ( mTransactionsToListviewItems.contains( item->parent() ) ) { + if ( mTransactionsToListviewItems.tqcontains( item->parent() ) ) { parent = mTransactionsToListviewItems[ item->parent() ]; parent->addSubTransaction( item ); } @@ -317,7 +317,7 @@ void ProgressDialog::slotTransactionAdded( ProgressItem *item ) const bool first = mTransactionsToListviewItems.empty(); TransactionItem *ti = mScrollView->addTransactionItem( item, first ); if ( ti ) - mTransactionsToListviewItems.replace( item, ti ); + mTransactionsToListviewItems.tqreplace( item, ti ); if ( first && mWasLastShown ) TQTimer::singleShot( 1000, this, TQT_SLOT( slotShow() ) ); @@ -326,7 +326,7 @@ void ProgressDialog::slotTransactionAdded( ProgressItem *item ) void ProgressDialog::slotTransactionCompleted( ProgressItem *item ) { - if ( mTransactionsToListviewItems.contains( item ) ) { + if ( mTransactionsToListviewItems.tqcontains( item ) ) { TransactionItem *ti = mTransactionsToListviewItems[ item ]; mTransactionsToListviewItems.remove( item ); ti->setItemComplete(); @@ -347,7 +347,7 @@ void ProgressDialog::slotTransactionCanceled( ProgressItem* ) void ProgressDialog::slotTransactionProgress( ProgressItem *item, unsigned int progress ) { - if ( mTransactionsToListviewItems.contains( item ) ) { + if ( mTransactionsToListviewItems.tqcontains( item ) ) { TransactionItem *ti = mTransactionsToListviewItems[ item ]; ti->setProgress( progress ); } @@ -356,16 +356,16 @@ void ProgressDialog::slotTransactionProgress( ProgressItem *item, void ProgressDialog::slotTransactionStatus( ProgressItem *item, const TQString& status ) { - if ( mTransactionsToListviewItems.contains( item ) ) { + if ( mTransactionsToListviewItems.tqcontains( item ) ) { TransactionItem *ti = mTransactionsToListviewItems[ item ]; - ti->setStatus( status ); + ti->seStatus( status ); } } void ProgressDialog::slotTransactionLabel( ProgressItem *item, const TQString& label ) { - if ( mTransactionsToListviewItems.contains( item ) ) { + if ( mTransactionsToListviewItems.tqcontains( item ) ) { TransactionItem *ti = mTransactionsToListviewItems[ item ]; ti->setLabel( label ); } @@ -375,7 +375,7 @@ void ProgressDialog::slotTransactionLabel( ProgressItem *item, void ProgressDialog::slotTransactionUsesCrypto( ProgressItem *item, bool value ) { - if ( mTransactionsToListviewItems.contains( item ) ) { + if ( mTransactionsToListviewItems.tqcontains( item ) ) { TransactionItem *ti = mTransactionsToListviewItems[ item ]; ti->setCrypto( value ); } @@ -383,7 +383,7 @@ void ProgressDialog::slotTransactionUsesCrypto( ProgressItem *item, void ProgressDialog::slotTransactionUsesBusyIndicator( KPIM::ProgressItem *item, bool value ) { - if ( mTransactionsToListviewItems.contains( item ) ) { + if ( mTransactionsToListviewItems.tqcontains( item ) ) { TransactionItem *ti = mTransactionsToListviewItems[ item ]; if ( value ) ti->setTotalSteps( 0 ); |