diff options
Diffstat (limited to 'lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp')
-rw-r--r-- | lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp | 220 |
1 files changed, 110 insertions, 110 deletions
diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp b/lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp index 49378c18..d4926546 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmdichildfrm.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 // : 01/2003 by Jens Zurheide to allow switching // between views based on timestamps // 2000-2003 maintained by the KDevelop project @@ -85,8 +85,8 @@ #include "kde2laptop_undockbutton.xpm" -KMdiWin32IconButton::KMdiWin32IconButton( TQWidget* parent, const char* name ) - : TQLabel( parent, name ) +KMdiWin32IconButton::KMdiWin32IconButton( TQWidget* tqparent, const char* name ) + : TQLabel( tqparent, name ) {} //============ mousePressEvent ============// @@ -98,8 +98,8 @@ void KMdiWin32IconButton::mousePressEvent( TQMouseEvent* ) //============ KMdiChildFrm ============// -KMdiChildFrm::KMdiChildFrm( KMdiChildArea *parent ) - : TQFrame( parent, "kmdi_childfrm" ) +KMdiChildFrm::KMdiChildFrm( KMdiChildArea *tqparent ) + : TQFrame( tqparent, "kmdi_childfrm" ) , m_pClient( 0L ) , m_pManager( 0L ) , m_pCaption( 0L ) @@ -129,7 +129,7 @@ KMdiChildFrm::KMdiChildFrm( KMdiChildArea *parent ) { m_pCaption = new KMdiChildFrmCaption( this ); - m_pManager = parent; + m_pManager = tqparent; m_pWinIcon = new KMdiWin32IconButton( m_pCaption, "kmdi_iconbutton_icon" ); m_pUnixIcon = new TQToolButton( m_pCaption, "kmdi_toolbutton_icon" ); @@ -149,15 +149,15 @@ KMdiChildFrm::KMdiChildFrm( KMdiChildArea *parent ) redecorateButtons(); - m_pWinIcon->setFocusPolicy( NoFocus ); - m_pUnixIcon->setFocusPolicy( NoFocus ); - m_pClose->setFocusPolicy( NoFocus ); - m_pMinimize->setFocusPolicy( NoFocus ); - m_pMaximize->setFocusPolicy( NoFocus ); - m_pUndock->setFocusPolicy( NoFocus ); + m_pWinIcon->setFocusPolicy( TQ_NoFocus ); + m_pUnixIcon->setFocusPolicy( TQ_NoFocus ); + m_pClose->setFocusPolicy( TQ_NoFocus ); + m_pMinimize->setFocusPolicy( TQ_NoFocus ); + m_pMaximize->setFocusPolicy( TQ_NoFocus ); + m_pUndock->setFocusPolicy( TQ_NoFocus ); setFrameStyle( TQFrame::WinPanel | TQFrame::Raised ); - setFocusPolicy( NoFocus ); + setFocusPolicy( TQ_NoFocus ); setMouseTracking( true ); @@ -238,19 +238,19 @@ void KMdiChildFrm::setResizeCursor( int resizeCorner ) break; case KMDI_RESIZE_LEFT: case KMDI_RESIZE_RIGHT: - TQApplication::setOverrideCursor( Qt::sizeHorCursor, true ); + TQApplication::setOverrideCursor( TQt::sizeHorCursor, true ); break; case KMDI_RESIZE_TOP: case KMDI_RESIZE_BOTTOM: - TQApplication::setOverrideCursor( Qt::sizeVerCursor, true ); + TQApplication::setOverrideCursor( TQt::sizeVerCursor, true ); break; case KMDI_RESIZE_TOPLEFT: case KMDI_RESIZE_BOTTOMRIGHT: - TQApplication::setOverrideCursor( Qt::sizeFDiagCursor, true ); + TQApplication::setOverrideCursor( TQt::sizeFDiagCursor, true ); break; case KMDI_RESIZE_BOTTOMLEFT: case KMDI_RESIZE_TOPRIGHT: - TQApplication::setOverrideCursor( Qt::sizeBDiagCursor, true ); + TQApplication::setOverrideCursor( TQt::sizeBDiagCursor, true ); break; } } @@ -278,15 +278,15 @@ void KMdiChildFrm::mouseMoveEvent( TQMouseEvent *e ) if ( !m_pClient ) return; - if ( m_pClient->minimumSize() == m_pClient->maximumSize() ) + if ( m_pClient->tqminimumSize() == m_pClient->tqmaximumSize() ) return; if ( m_bResizing ) { - if ( !( e->state() & RightButton ) && !( e->state() & MidButton ) ) + if ( !( e->state() & Qt::RightButton ) && !( e->state() & Qt::MidButton ) ) { // same as: if no button or left button pressed - TQPoint p = parentWidget()->mapFromGlobal( e->globalPos() ); + TQPoint p = tqparentWidget()->mapFromGlobal( e->globalPos() ); resizeWindow( m_iResizeCorner, p.x(), p.y() ); } else @@ -323,17 +323,17 @@ void KMdiChildFrm::resizeWindow( int resizeCorner, int xPos, int yPos ) // Calculate the minimum width & height int minWidth = 0; int minHeight = 0; - int maxWidth = QWIDGETSIZE_MAX; - int maxHeight = QWIDGETSIZE_MAX; + int maxWidth = TQWIDGETSIZE_MAX; + int maxHeight = TQWIDGETSIZE_MAX; // it could be the client forces the childframe to enlarge its minimum size if ( m_pClient ) { - minWidth = m_pClient->minimumSize().width() + KMDI_CHILDFRM_DOUBLE_BORDER; - minHeight = m_pClient->minimumSize().height() + KMDI_CHILDFRM_DOUBLE_BORDER + + minWidth = m_pClient->tqminimumSize().width() + KMDI_CHILDFRM_DOUBLE_BORDER; + minHeight = m_pClient->tqminimumSize().height() + KMDI_CHILDFRM_DOUBLE_BORDER + m_pCaption->heightHint() + KMDI_CHILDFRM_SEPARATOR; - maxWidth = m_pClient->maximumSize().width() + KMDI_CHILDFRM_DOUBLE_BORDER; - maxHeight = m_pClient->maximumSize().height() + KMDI_CHILDFRM_DOUBLE_BORDER + + maxWidth = m_pClient->tqmaximumSize().width() + KMDI_CHILDFRM_DOUBLE_BORDER; + maxHeight = m_pClient->tqmaximumSize().height() + KMDI_CHILDFRM_DOUBLE_BORDER + m_pCaption->heightHint() + KMDI_CHILDFRM_SEPARATOR; } @@ -521,22 +521,22 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ ) case Maximized: m_pClient->m_stateChanged = true; m_state = state; - // client min / max size / layout behavior don't change + // client min / max size / tqlayout behavior don't change // set frame max size indirectly by setting the clients max size to // it's current value (calls setMaxSize() of frame) - m_pClient->setMaximumSize( m_pClient->maximumSize().width(), m_pClient->maximumSize().height() ); + m_pClient->setMaximumSize( m_pClient->tqmaximumSize().width(), m_pClient->tqmaximumSize().height() ); m_pMaximize->setPixmap( *m_pMaxButtonPixmap ); setGeometry( m_restoredRect ); break; case Minimized: m_pClient->m_stateChanged = true; m_state = state; - // restore client min / max size / layout behavior + // restore client min / max size / tqlayout behavior m_pClient->setMinimumSize( m_oldClientMinSize.width(), m_oldClientMinSize.height() ); m_pClient->setMaximumSize( m_oldClientMaxSize.width(), m_oldClientMaxSize.height() ); - if ( m_pClient->layout() != 0L ) + if ( m_pClient->tqlayout() != 0L ) { - m_pClient->layout() ->setResizeMode( m_oldLayoutResizeMode ); + m_pClient->tqlayout() ->setResizeMode( m_oldLayoutResizeMode ); } m_pMinimize->setPixmap( *m_pMinButtonPixmap ); m_pMaximize->setPixmap( *m_pMaxButtonPixmap ); @@ -555,14 +555,14 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ ) { m_pClient->m_stateChanged = true; m_state = state; - // restore client min / max size / layout behavior + // restore client min / max size / tqlayout behavior m_pClient->setMinimumSize( m_oldClientMinSize.width(), m_oldClientMinSize.height() ); m_pClient->setMaximumSize( m_oldClientMaxSize.width(), m_oldClientMaxSize.height() ); - if ( m_pClient->layout() != 0L ) + if ( m_pClient->tqlayout() != 0L ) { - m_pClient->layout() ->setResizeMode( m_oldLayoutResizeMode ); + m_pClient->tqlayout() ->setResizeMode( m_oldLayoutResizeMode ); } - setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX ); + setMaximumSize( TQWIDGETSIZE_MAX, TQWIDGETSIZE_MAX ); // reset to maximize-captionbar m_pMaximize->setPixmap( *m_pRestoreButtonPixmap ); m_pMinimize->setPixmap( *m_pMinButtonPixmap ); @@ -581,8 +581,8 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ ) { m_pClient->m_stateChanged = true; m_state = state; - // client min / max size / layout behavior don't change - setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX ); + // client min / max size / tqlayout behavior don't change + setMaximumSize( TQWIDGETSIZE_MAX, TQWIDGETSIZE_MAX ); m_pMaximize->setPixmap( *m_pRestoreButtonPixmap ); int nFrameWidth = KMDI_CHILDFRM_DOUBLE_BORDER; int nFrameHeight = KMDI_CHILDFRM_DOUBLE_BORDER + KMDI_CHILDFRM_SEPARATOR + @@ -590,7 +590,7 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ ) TQRect maximizedFrmRect( -m_pClient->x(), -m_pClient->y(), m_pManager->width() + nFrameWidth, m_pManager->height() + nFrameHeight ); - if ( geometry() != maximizedFrmRect ) + if ( tqgeometry() != maximizedFrmRect ) { setGeometry( maximizedFrmRect ); } @@ -607,18 +607,18 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ ) case Maximized: m_pClient->m_stateChanged = true; m_state = state; - // save client min / max size / layout behavior - m_oldClientMinSize = m_pClient->minimumSize(); - m_oldClientMaxSize = m_pClient->maximumSize(); - if ( m_pClient->layout() != 0L ) + // save client min / max size / tqlayout behavior + m_oldClientMinSize = m_pClient->tqminimumSize(); + m_oldClientMaxSize = m_pClient->tqmaximumSize(); + if ( m_pClient->tqlayout() != 0L ) { - m_oldLayoutResizeMode = m_pClient->layout() ->resizeMode(); + m_oldLayoutResizeMode = m_pClient->tqlayout() ->tqresizeMode(); } m_pClient->setMinimumSize( 0, 0 ); m_pClient->setMaximumSize( 0, 0 ); - if ( m_pClient->layout() != 0L ) + if ( m_pClient->tqlayout() != 0L ) { - m_pClient->layout() ->setResizeMode( TQLayout::FreeResize ); + m_pClient->tqlayout() ->setResizeMode( TQLayout::FreeResize ); } switchToMinimizeLayout(); m_pManager->childMinimized( this, true ); @@ -626,19 +626,19 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ ) case Normal: m_pClient->m_stateChanged = true; m_state = state; - // save client min / max size / layout behavior - m_oldClientMinSize = m_pClient->minimumSize(); - m_oldClientMaxSize = m_pClient->maximumSize(); - if ( m_pClient->layout() != 0L ) + // save client min / max size / tqlayout behavior + m_oldClientMinSize = m_pClient->tqminimumSize(); + m_oldClientMaxSize = m_pClient->tqmaximumSize(); + if ( m_pClient->tqlayout() != 0L ) { - m_oldLayoutResizeMode = m_pClient->layout() ->resizeMode(); + m_oldLayoutResizeMode = m_pClient->tqlayout() ->tqresizeMode(); } - m_restoredRect = geometry(); + m_restoredRect = tqgeometry(); m_pClient->setMinimumSize( 0, 0 ); m_pClient->setMaximumSize( 0, 0 ); - if ( m_pClient->layout() != 0L ) + if ( m_pClient->tqlayout() != 0L ) { - m_pClient->layout() ->setResizeMode( TQLayout::FreeResize ); + m_pClient->tqlayout() ->setResizeMode( TQLayout::FreeResize ); } switchToMinimizeLayout(); m_pManager->childMinimized( this, false ); @@ -664,7 +664,7 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ ) else { m_pManager->setMinimumSize( 0, 0 ); - m_pManager->setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX ); + m_pManager->setMaximumSize( TQWIDGETSIZE_MAX, TQWIDGETSIZE_MAX ); } } @@ -694,7 +694,7 @@ void KMdiChildFrm::setCaption( const TQString& text ) void KMdiChildFrm::enableClose( bool bEnable ) { m_pClose->setEnabled( bEnable ); - m_pClose->repaint( false ); + m_pClose->tqrepaint( false ); } //============ setIcon ==================// @@ -705,7 +705,7 @@ void KMdiChildFrm::setIcon( const TQPixmap& pxm ) if ( p.width() != 18 || p.height() != 18 ) { TQImage img = p.convertToImage(); - p = img.smoothScale( 18, 18, TQImage::ScaleMin ); + p = img.smoothScale( 18, 18, TQ_ScaleMin ); } const bool do_resize = m_pIconButtonPixmap->size() != p.size(); *m_pIconButtonPixmap = p; @@ -750,7 +750,7 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize ) } // memorize the focuses in a dictionary because they will get lost during reparenting - TQDict<FocusPolicy>* pFocPolDict = new TQDict<FocusPolicy>; + TQDict<TQ_FocusPolicy>* pFocPolDict = new TQDict<TQ_FocusPolicy>; pFocPolDict->setAutoDelete( true ); TQObjectList *list = m_pClient->queryList( TQWIDGET_OBJECT_NAME_STRING ); TQObjectListIt it( *list ); // iterate over the buttons @@ -768,21 +768,21 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize ) widg->setName( tmpStr.latin1() ); i++; } - FocusPolicy* pFocPol = new FocusPolicy; + TQ_FocusPolicy* pFocPol = new TQ_FocusPolicy; *pFocPol = widg->focusPolicy(); pFocPolDict->insert( widg->name(), pFocPol ); } delete list; // delete the list, not the objects - //Reparent if needed - if ( w->parent() != this ) + //Retqparent if needed + if ( TQT_BASE_OBJECT(w->tqparent()) != TQT_BASE_OBJECT(this) ) { //reparent to this widget , no flags , point , show it TQPoint pnt2( KMDI_CHILDFRM_BORDER, clientYPos ); - TQSize mincs = w->minimumSize(); - TQSize maxcs = w->maximumSize(); + TQSize mincs = w->tqminimumSize(); + TQSize maxcs = w->tqmaximumSize(); w->setMinimumSize( 0, 0 ); - w->setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX ); + w->setMaximumSize( TQWIDGETSIZE_MAX, TQWIDGETSIZE_MAX ); // min/max sizes, flags, DND get lost. :-( w->reparent( this, 0, pnt2, w->isVisible() ); @@ -798,11 +798,11 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize ) TQObject::connect( m_pClient, TQT_SIGNAL( mdiParentNowMaximized( bool ) ), m_pManager, TQT_SIGNAL( nowMaximized( bool ) ) ); if ( m_pClient->minimumWidth() > m_pManager->m_defaultChildFrmSize.width() ) - setMinimumWidth( m_pClient->minimumSize().width() + KMDI_CHILDFRM_DOUBLE_BORDER ); + setMinimumWidth( m_pClient->tqminimumSize().width() + KMDI_CHILDFRM_DOUBLE_BORDER ); if ( m_pClient->minimumHeight() > m_pManager->m_defaultChildFrmSize.height() ) { - setMinimumHeight( m_pClient->minimumSize().height() + KMDI_CHILDFRM_DOUBLE_BORDER + + setMinimumHeight( m_pClient->tqminimumSize().height() + KMDI_CHILDFRM_DOUBLE_BORDER + m_pCaption->heightHint() + KMDI_CHILDFRM_SEPARATOR ); } } @@ -817,7 +817,7 @@ void KMdiChildFrm::unsetClient( TQPoint positionOffset ) TQObject::disconnect( m_pClient, TQT_SIGNAL( mdiParentNowMaximized( bool ) ), m_pManager, TQT_SIGNAL( nowMaximized( bool ) ) ); //reparent to desktop widget , no flags , point , show it - TQDict<FocusPolicy>* pFocPolDict; + TQDict<TQ_FocusPolicy>* pFocPolDict; pFocPolDict = unlinkChildren(); // get name of focused child widget @@ -826,8 +826,8 @@ void KMdiChildFrm::unsetClient( TQPoint positionOffset ) if ( focusedChildWidget != 0 ) nameOfFocusedWidget = focusedChildWidget->name(); - TQSize mins = m_pClient->minimumSize(); - TQSize maxs = m_pClient->maximumSize(); + TQSize mins = m_pClient->tqminimumSize(); + TQSize maxs = m_pClient->tqmaximumSize(); m_pClient->reparent( 0, 0, mapToGlobal( pos() ) - pos() + positionOffset, isVisible() ); m_pClient->setMinimumSize( mins.width(), mins.height() ); m_pClient->setMaximumSize( maxs.width(), maxs.height() ); @@ -842,7 +842,7 @@ void KMdiChildFrm::unsetClient( TQPoint positionOffset ) { // for each found object... TQWidget * widg = ( TQWidget* ) obj; ++it; - FocusPolicy* pFocPol = pFocPolDict->find( widg->name() ); // remember the focus policy from before the reparent + TQ_FocusPolicy* pFocPol = pFocPolDict->tqfind( widg->name() ); // remember the focus policy from before the reparent if ( pFocPol ) widg->setFocusPolicy( *pFocPol ); @@ -851,7 +851,7 @@ void KMdiChildFrm::unsetClient( TQPoint positionOffset ) widg->setFocus(); // get first and last focusable widget - if ( ( widg->focusPolicy() == TQWidget::StrongFocus ) || ( widg->focusPolicy() == TQWidget::TabFocus ) ) + if ( ( widg->focusPolicy() == TQ_StrongFocus ) || ( widg->focusPolicy() == TQ_TabFocus ) ) { if ( firstFocusableChildWidget == 0 ) firstFocusableChildWidget = widg; // first widget @@ -860,7 +860,7 @@ void KMdiChildFrm::unsetClient( TQPoint positionOffset ) } else { - if ( widg->focusPolicy() == TQWidget::WheelFocus ) + if ( widg->focusPolicy() == TQ_WheelFocus ) { if ( firstFocusableChildWidget == 0 ) firstFocusableChildWidget = widg; // first widget @@ -877,14 +877,14 @@ void KMdiChildFrm::unsetClient( TQPoint positionOffset ) m_pClient->setLastFocusableChildWidget( lastFocusableChildWidget ); // reset the focus policy of the view - m_pClient->setFocusPolicy( TQWidget::ClickFocus ); + m_pClient->setFocusPolicy( TQ_ClickFocus ); // lose information about the view (because it's undocked now) m_pClient = 0; } //============== linkChildren =============// -void KMdiChildFrm::linkChildren( TQDict<FocusPolicy>* pFocPolDict ) +void KMdiChildFrm::linkChildren( TQDict<TQ_FocusPolicy>* pFocPolDict ) { // reset the focus policies for all widgets in the view (take them from the dictionary) TQObjectList* list = m_pClient->queryList( TQWIDGET_OBJECT_NAME_STRING ); @@ -894,7 +894,7 @@ void KMdiChildFrm::linkChildren( TQDict<FocusPolicy>* pFocPolDict ) { // for each found object... TQWidget* widg = ( TQWidget* ) obj; ++it; - FocusPolicy* pFocPol = pFocPolDict->find( widg->name() ); // remember the focus policy from before the reparent + TQ_FocusPolicy* pFocPol = pFocPolDict->tqfind( widg->name() ); // remember the focus policy from before the reparent if ( pFocPol != 0 ) widg->setFocusPolicy( *pFocPol ); @@ -907,14 +907,14 @@ void KMdiChildFrm::linkChildren( TQDict<FocusPolicy>* pFocPolDict ) delete pFocPolDict; // reset the focus policies for the rest - m_pWinIcon->setFocusPolicy( TQWidget::NoFocus ); - m_pUnixIcon->setFocusPolicy( TQWidget::NoFocus ); - m_pClient->setFocusPolicy( TQWidget::ClickFocus ); - m_pCaption->setFocusPolicy( TQWidget::NoFocus ); - m_pUndock->setFocusPolicy( TQWidget::NoFocus ); - m_pMinimize->setFocusPolicy( TQWidget::NoFocus ); - m_pMaximize->setFocusPolicy( TQWidget::NoFocus ); - m_pClose->setFocusPolicy( TQWidget::NoFocus ); + m_pWinIcon->setFocusPolicy( TQ_NoFocus ); + m_pUnixIcon->setFocusPolicy( TQ_NoFocus ); + m_pClient->setFocusPolicy( TQ_ClickFocus ); + m_pCaption->setFocusPolicy( TQ_NoFocus ); + m_pUndock->setFocusPolicy( TQ_NoFocus ); + m_pMinimize->setFocusPolicy( TQ_NoFocus ); + m_pMaximize->setFocusPolicy( TQ_NoFocus ); + m_pClose->setFocusPolicy( TQ_NoFocus ); // install the event filter (catch mouse clicks) for the rest m_pWinIcon->installEventFilter( this ); @@ -930,10 +930,10 @@ void KMdiChildFrm::linkChildren( TQDict<FocusPolicy>* pFocPolDict ) //============== unlinkChildren =============// -TQDict<TQWidget::FocusPolicy>* KMdiChildFrm::unlinkChildren() +TQDict<TQ_FocusPolicy>* KMdiChildFrm::unlinkChildren() { // memorize the focuses in a dictionary because they will get lost during reparenting - TQDict<FocusPolicy>* pFocPolDict = new TQDict<FocusPolicy>; + TQDict<TQ_FocusPolicy>* pFocPolDict = new TQDict<TQ_FocusPolicy>; pFocPolDict->setAutoDelete( true ); TQObjectList *list = m_pClient->queryList( TQWIDGET_OBJECT_NAME_STRING ); @@ -953,7 +953,7 @@ TQDict<TQWidget::FocusPolicy>* KMdiChildFrm::unlinkChildren() w->setName( tmpStr.latin1() ); i++; } - FocusPolicy* pFocPol = new FocusPolicy; + TQ_FocusPolicy* pFocPol = new TQ_FocusPolicy; *pFocPol = w->focusPolicy(); // memorize focus policy pFocPolDict->insert( w->name(), pFocPol ); @@ -1005,7 +1005,7 @@ void KMdiChildFrm::doResize( bool captionOnly ) TQWidget* pIconWidget = m_pWinIcon; m_pCaption->setGeometry( KMDI_CHILDFRM_BORDER, KMDI_CHILDFRM_BORDER, captionWidth, captionHeight ); - //The buttons are caption children + //The buttons are caption tqchildren if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::Win95Look ) { rightOffset2 += 2; @@ -1068,7 +1068,7 @@ void KMdiChildFrm::doResize( bool captionOnly ) static bool hasParent( TQObject* par, TQObject* o ) { while ( o && o != par ) - o = o->parent(); + o = o->tqparent(); return o == par; } @@ -1085,8 +1085,8 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e ) TQObject* pObj = obj; while ( ( pObj != 0L ) && !bIsChild ) { - bIsChild = ( pObj == this ); - pObj = pObj->parent(); + bIsChild = ( TQT_BASE_OBJECT(pObj) == TQT_BASE_OBJECT(this) ); + pObj = pObj->tqparent(); } // unset the resize cursor if the cursor moved from the frame into a inner widget if ( bIsChild ) @@ -1095,33 +1095,33 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e ) break; case TQEvent::MouseButtonPress: { - if ( !hasParent( m_pClient, obj ) ) + if ( !hasParent( TQT_TQOBJECT(m_pClient), TQT_TQOBJECT(obj) ) ) { bool bIsSecondClick = false; if ( m_timeMeasure.elapsed() <= TQApplication::doubleClickInterval() ) bIsSecondClick = true; // of a possible double click - if ( !( ( ( obj == m_pWinIcon ) || ( obj == m_pUnixIcon ) ) && bIsSecondClick ) ) + if ( !( ( ( TQT_BASE_OBJECT(obj) == m_pWinIcon ) || ( TQT_BASE_OBJECT(obj) == m_pUnixIcon ) ) && bIsSecondClick ) ) { // in case we didn't click on the icon button TQFocusEvent* pFE = new TQFocusEvent( TQFocusEvent::FocusIn ); - TQApplication::sendEvent( qApp->mainWidget(), pFE ); + TQApplication::sendEvent( tqApp->mainWidget(), pFE ); if ( m_pClient ) { m_pClient->updateTimeStamp(); m_pClient->activate(); } - if ( ( obj->parent() != m_pCaption ) && ( obj != m_pCaption ) ) + if ( ( TQT_BASE_OBJECT(obj->tqparent()) != TQT_BASE_OBJECT(m_pCaption) ) && ( TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(m_pCaption) ) ) { TQWidget* w = ( TQWidget* ) obj; - if ( ( w->focusPolicy() == TQWidget::ClickFocus ) || ( w->focusPolicy() == TQWidget::StrongFocus ) ) + if ( ( w->focusPolicy() == TQ_ClickFocus ) || ( w->focusPolicy() == TQ_StrongFocus ) ) { w->setFocus(); } } } - if ( ( obj == m_pWinIcon ) || ( obj == m_pUnixIcon ) ) + if ( ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pWinIcon) ) || ( TQT_TQOBJECT(obj) == TQT_BASE_OBJECT(m_pUnixIcon) ) ) { // in case we clicked on the icon button if ( m_timeMeasure.elapsed() > TQApplication::doubleClickInterval() ) @@ -1139,7 +1139,7 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e ) break; case TQEvent::Resize: { - if ( ( ( TQWidget* ) obj == m_pClient ) && ( m_state == Normal ) ) + if ( ( ( TQWidget* ) TQT_TQOBJECT(obj) == m_pClient ) && ( m_state == Normal ) ) { TQResizeEvent* re = ( TQResizeEvent* ) e; int captionHeight = m_pCaption->heightHint(); @@ -1153,8 +1153,8 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e ) case TQEvent::ChildRemoved: { // if we lost a child we uninstall ourself as event filter for the lost - // child and its children - TQObject* pLostChild = ( ( TQChildEvent* ) e )->child(); + // child and its tqchildren + TQObject* pLostChild = TQT_TQOBJECT(( ( TQChildEvent* ) e )->child()); if ( ( pLostChild != 0L ) /*&& (pLostChild->inherits(TQWIDGET_OBJECT_NAME_STRING))*/ ) { TQObjectList* list = pLostChild->queryList(); @@ -1174,12 +1174,12 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e ) case TQEvent::ChildInserted: { // if we got a new child we install ourself as event filter for the new - // child and its children (as we did when we got our client). + // child and its tqchildren (as we did when we got our client). // XXX see linkChildren() and focus policy stuff - TQObject* pNewChild = ( ( TQChildEvent* ) e ) ->child(); - if ( ( pNewChild != 0L ) && ::qt_cast<TQWidget*>( pNewChild ) ) + TQObject* pNewChild = TQT_TQOBJECT(( ( TQChildEvent* ) e ) ->child()); + if ( ( pNewChild != 0L ) && ::tqqt_cast<TQWidget*>( pNewChild ) ) { - TQWidget * pNewWidget = static_cast<TQWidget*>( pNewChild ); + TQWidget * pNewWidget = TQT_TQWIDGET( pNewChild ); TQObjectList *list = pNewWidget->queryList( TQWIDGET_OBJECT_NAME_STRING ); list->insert( 0, pNewChild ); // add the new child to the list too, just to save code TQObjectListIt it( *list ); // iterate over all new child widgets @@ -1188,7 +1188,7 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e ) { // for each found object... TQWidget * widg = ( TQWidget* ) obj; ++it; - if ( !::qt_cast<TQPopupMenu*>( widg ) ) + if ( !::tqqt_cast<TQPopupMenu*>( widg ) ) { widg->installEventFilter( this ); } @@ -1201,7 +1201,7 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e ) break; } - return false; // standard event processing (see Qt documentation) + return false; // standard event processing (see TQt documentation) } //============= raiseAndActivate ===============// @@ -1284,9 +1284,9 @@ void KMdiChildFrm::showSystemMenu() TQRect iconGeom; if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::Win95Look ) - iconGeom = m_pWinIcon->geometry(); + iconGeom = m_pWinIcon->tqgeometry(); else - iconGeom = m_pUnixIcon->geometry(); + iconGeom = m_pUnixIcon->tqgeometry(); popupmenuPosition = TQPoint( iconGeom.x(), iconGeom.y() + captionHeight() + KMDI_CHILDFRM_BORDER ); systemMenu() ->popup( mapToGlobal( popupmenuPosition ) ); @@ -1308,7 +1308,7 @@ void KMdiChildFrm::switchToMinimizeLayout() resize( 300, minimumHeight() ); // positioning - m_pManager->layoutMinimizedChildren(); + m_pManager->tqlayoutMinimizedChildren(); } void KMdiChildFrm::slot_resizeViaSystemMenu() @@ -1394,7 +1394,7 @@ void KMdiChildFrm::redecorateButtons() TQRect KMdiChildFrm::mdiAreaContentsRect() const { - TQFrame * p = ( TQFrame* ) parentWidget(); + TQFrame * p = ( TQFrame* ) tqparentWidget(); if ( p ) { return p->contentsRect(); @@ -1406,4 +1406,4 @@ TQRect KMdiChildFrm::mdiAreaContentsRect() const } } -// kate: indent-mode csands; tab-width 4; space-indent off; replace-tabs off; +// kate: indent-mode csands; tab-width 4; space-indent off; tqreplace-tabs off; |