diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
commit | 560378aaca1784ba19806a0414a32b20c744de39 (patch) | |
tree | ce0dfd7c3febf2a1adc7603d1019a8be2083c415 /kmdi/kmditaskbar.cpp | |
parent | d4d5af1cdbd3cc65d095e0afc5b1f4260091cf5d (diff) | |
download | tdelibs-560378aaca1784ba19806a0414a32b20c744de39.tar.gz tdelibs-560378aaca1784ba19806a0414a32b20c744de39.zip |
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmdi/kmditaskbar.cpp')
-rw-r--r-- | kmdi/kmditaskbar.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/kmdi/kmditaskbar.cpp b/kmdi/kmditaskbar.cpp index 71c3de454..6beecb24e 100644 --- a/kmdi/kmditaskbar.cpp +++ b/kmdi/kmditaskbar.cpp @@ -102,7 +102,7 @@ void KMdiTaskBarButton::fitText( const TQString& origStr, int newWidth ) { TQButton::setText( m_actualText ); - int actualWidth = sizeHint().width(); + int actualWidth = tqsizeHint().width(); int realLetterCount = origStr.length(); int newLetterCount = ( newWidth * realLetterCount ) / actualWidth; int w = newWidth + 1; @@ -144,7 +144,7 @@ KMdiTaskBar::KMdiTaskBar( KMdiMainFrm *parent, TQMainWindow::ToolBarDock dock ) : KToolBar( parent, "KMdiTaskBar", /*honor_style*/ false, /*readConfig*/ true ) , m_pCurrentFocusedWindow( 0 ) , m_pStretchSpace( 0 ) - , m_layoutIsPending( false ) + , m_tqlayoutIsPending( false ) , m_bSwitchedOn( false ) { m_pFrm = parent; @@ -175,12 +175,12 @@ KMdiTaskBarButton * KMdiTaskBar::addWinButton( KMdiChildView *win_ptr ) TQObject::connect( b, TQT_SIGNAL( clicked( KMdiChildView* ) ), this, TQT_SLOT( setActiveButton( KMdiChildView* ) ) ); TQObject::connect( b, TQT_SIGNAL( leftMouseButtonClicked( KMdiChildView* ) ), m_pFrm, TQT_SLOT( activateView( KMdiChildView* ) ) ); TQObject::connect( b, TQT_SIGNAL( rightMouseButtonClicked( KMdiChildView* ) ), m_pFrm, TQT_SLOT( taskbarButtonRightClicked( KMdiChildView* ) ) ); - TQObject::connect( b, TQT_SIGNAL( buttonTextChanged( int ) ), this, TQT_SLOT( layoutTaskBar( int ) ) ); + TQObject::connect( b, TQT_SIGNAL( buttonTextChanged( int ) ), this, TQT_SLOT( tqlayoutTaskBar( int ) ) ); m_pButtonList->append( b ); b->setToggleButton( true ); b->setText( win_ptr->tabCaption() ); - layoutTaskBar(); + tqlayoutTaskBar(); m_pStretchSpace = new TQLabel( this, "empty" ); m_pStretchSpace->setText( "" ); @@ -202,7 +202,7 @@ void KMdiTaskBar::removeWinButton( KMdiChildView *win_ptr, bool haveToLayoutTask { m_pButtonList->removeRef( b ); if ( haveToLayoutTaskBar ) - layoutTaskBar(); + tqlayoutTaskBar(); } if ( m_pButtonList->count() == 0 ) { @@ -303,11 +303,11 @@ void KMdiTaskBar::setActiveButton( KMdiChildView *win_ptr ) } } -void KMdiTaskBar::layoutTaskBar( int taskBarWidth ) +void KMdiTaskBar::tqlayoutTaskBar( int taskBarWidth ) { - if ( m_layoutIsPending ) + if ( m_tqlayoutIsPending ) return ; - m_layoutIsPending = true; + m_tqlayoutIsPending = true; if ( !taskBarWidth ) // no width is given @@ -337,16 +337,16 @@ void KMdiTaskBar::layoutTaskBar( int taskBarWidth ) // if there's enough space, use actual width int buttonCount = m_pButtonList->count(); int tbHandlePixel; - tbHandlePixel = style().pixelMetric( TQStyle::PM_DockWindowHandleExtent, this ); - int buttonAreaWidth = taskBarWidth - tbHandlePixel - style().pixelMetric( TQStyle::PM_DefaultFrameWidth, this ) - 5; - if ( ( ( allButtonsWidthHint ) <= buttonAreaWidth ) || ( width() < parentWidget() ->width() ) ) + tbHandlePixel = style().tqpixelMetric( TQStyle::PM_DockWindowHandleExtent, this ); + int buttonAreaWidth = taskBarWidth - tbHandlePixel - style().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, this ) - 5; + if ( ( ( allButtonsWidthHint ) <= buttonAreaWidth ) || ( width() < tqparentWidget() ->width() ) ) { for ( b = m_pButtonList->first();b;b = m_pButtonList->next() ) { b->setText( b->actualText() ); - if ( b->width() != b->sizeHint().width() ) + if ( b->width() != b->tqsizeHint().width() ) { - b->setFixedWidth( b->sizeHint().width() ); + b->setFixedWidth( b->tqsizeHint().width() ); b->show(); } } @@ -372,19 +372,19 @@ void KMdiTaskBar::layoutTaskBar( int taskBarWidth ) } } } - m_layoutIsPending = false; + m_tqlayoutIsPending = false; } void KMdiTaskBar::resizeEvent( TQResizeEvent* rse ) { - if ( !m_layoutIsPending ) + if ( !m_tqlayoutIsPending ) { if ( m_pButtonList->count() != 0 ) { - layoutTaskBar( rse->size().width() ); + tqlayoutTaskBar( rse->size().width() ); } } KToolBar::resizeEvent( rse ); } -// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; +// kate: space-indent off; tab-width 4; tqreplace-tabs off; indent-mode csands; |