diff options
Diffstat (limited to 'lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp')
-rw-r--r-- | lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp b/lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp index 71c3de45..f99f5b76 100644 --- a/lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp @@ -6,8 +6,8 @@ // begin : 07/1999 by Szymon Stefanek as part of kvirc // (an IRC application) // changes : 09/1999 by Falk Brettschneider to create an -// - 06/2000 stand-alone Qt extension set of -// classes and a Qt-based library +// - 06/2000 stand-alone TQt extension set of +// classes and a TQt-based library // 2000-2003 maintained by the KDevelop project // patches : 02/2000 by Massimo Morin (mmorin@schedsys.com) // @@ -63,7 +63,7 @@ KMdiTaskBarButton::KMdiTaskBarButton( KMdiTaskBar *pTaskBar, KMdiChildView *win_ m_pWindow = win_ptr; TQToolTip::add ( this, win_ptr->caption() ); - setFocusPolicy( NoFocus ); + setFocusPolicy( TQ_NoFocus ); } KMdiTaskBarButton::~KMdiTaskBarButton() @@ -73,10 +73,10 @@ void KMdiTaskBarButton::mousePressEvent( TQMouseEvent* e ) { switch ( e->button() ) { - case TQMouseEvent::LeftButton: + case Qt::LeftButton: emit leftMouseButtonClicked( m_pWindow ); break; - case TQMouseEvent::RightButton: + case Qt::RightButton: emit rightMouseButtonClicked( m_pWindow ); break; default: @@ -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; @@ -140,20 +140,20 @@ TQString KMdiTaskBarButton::actualText() const // //#################################################################### -KMdiTaskBar::KMdiTaskBar( KMdiMainFrm *parent, TQMainWindow::ToolBarDock dock ) - : KToolBar( parent, "KMdiTaskBar", /*honor_style*/ false, /*readConfig*/ true ) +KMdiTaskBar::KMdiTaskBar( KMdiMainFrm *tqparent, TQMainWindow::ToolBarDock dock ) + : KToolBar( tqparent, "KMdiTaskBar", /*honor_style*/ false, /*readConfig*/ true ) , m_pCurrentFocusedWindow( 0 ) , m_pStretchSpace( 0 ) , m_layoutIsPending( false ) , m_bSwitchedOn( false ) { - m_pFrm = parent; + m_pFrm = tqparent; m_pButtonList = new TQPtrList<KMdiTaskBarButton>; m_pButtonList->setAutoDelete( true ); //QT30 setFontPropagation(TQWidget::SameFont); setMinimumWidth( 1 ); - setFocusPolicy( NoFocus ); - parent->moveToolBar( this, dock ); //XXX obsolete! + setFocusPolicy( TQ_NoFocus ); + tqparent->moveToolBar( this, dock ); //XXX obsolete! } KMdiTaskBar::~KMdiTaskBar() @@ -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,7 +303,7 @@ void KMdiTaskBar::setActiveButton( KMdiChildView *win_ptr ) } } -void KMdiTaskBar::layoutTaskBar( int taskBarWidth ) +void KMdiTaskBar::tqlayoutTaskBar( int taskBarWidth ) { if ( m_layoutIsPending ) return ; @@ -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 = tqstyle().tqpixelMetric( TQStyle::PM_DockWindowHandleExtent, this ); + int buttonAreaWidth = taskBarWidth - tbHandlePixel - tqstyle().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(); } } @@ -381,10 +381,10 @@ void KMdiTaskBar::resizeEvent( TQResizeEvent* rse ) { 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; |