diff options
Diffstat (limited to 'lib/compatibility/tdemdi/qextmdi/tdemdichildview.cpp')
-rw-r--r-- | lib/compatibility/tdemdi/qextmdi/tdemdichildview.cpp | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/lib/compatibility/tdemdi/qextmdi/tdemdichildview.cpp b/lib/compatibility/tdemdi/qextmdi/tdemdichildview.cpp index ddc313ab..76d3b56e 100644 --- a/lib/compatibility/tdemdi/qextmdi/tdemdichildview.cpp +++ b/lib/compatibility/tdemdi/qextmdi/tdemdichildview.cpp @@ -63,7 +63,7 @@ KMdiChildView::KMdiChildView( const TQString& caption, TQWidget* parentWidget, c m_szCaption = i18n( "Unnamed" ); m_sTabCaption = m_szCaption; - setFocusPolicy( TQ_ClickFocus ); + setFocusPolicy( TQWidget::ClickFocus ); installEventFilter( this ); // store the current time @@ -87,7 +87,7 @@ KMdiChildView::KMdiChildView( TQWidget* parentWidget, const char* name, WFlags f setGeometry( 0, 0, 0, 0 ); // reset m_szCaption = i18n( "Unnamed" ); m_sTabCaption = m_szCaption; - setFocusPolicy( TQ_ClickFocus ); + setFocusPolicy( TQWidget::ClickFocus ); installEventFilter( this ); // store the current time @@ -362,7 +362,7 @@ void KMdiChildView::youAreDetached() if ( myIconPtr() ) setIcon( *( myIconPtr() ) ); - setFocusPolicy( TQ_StrongFocus ); + setFocusPolicy( TQWidget::StrongFocus ); emit isDetachedNow(); } @@ -492,10 +492,10 @@ void KMdiChildView::slot_childDestroyed() // if we lost a child we uninstall ourself as event filter for the lost // child and its children - const TQObject * pLostChild = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(TQT_BASE_OBJECT_NAME::sender())); + const TQObject * pLostChild = TQObject::sender(); if ( pLostChild && ( pLostChild->isWidgetType() ) ) { - TQObjectList* list = ( ( TQObject* ) ( pLostChild ) ) ->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList* list = ( ( TQObject* ) ( pLostChild ) ) ->queryList( "TQWidget" ); list->insert( 0, pLostChild ); // add the lost child to the list too, just to save code TQObjectListIt it( *list ); // iterate over all lost child widgets TQObject* obj; @@ -526,8 +526,8 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e ) if ( ke->key() == TQt::Key_Tab ) { TQWidget* w = ( TQWidget* ) obj; - TQ_FocusPolicy wfp = w->focusPolicy(); - if ( wfp == TQ_StrongFocus || wfp == TQ_TabFocus || w->focusPolicy() == TQ_WheelFocus ) + TQWidget::FocusPolicy wfp = w->focusPolicy(); + if ( wfp == TQWidget::StrongFocus || wfp == TQWidget::TabFocus || w->focusPolicy() == TQWidget::WheelFocus ) { if ( m_lastFocusableChildWidget != 0 ) { @@ -544,7 +544,7 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e ) { if ( obj->isWidgetType() ) { - TQObjectList * list = queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList * list = queryList( "TQWidget" ); if ( list->find( obj ) != -1 ) m_focusedChildWidget = ( TQWidget* ) obj; @@ -565,10 +565,10 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e ) { // if we lost a child we uninstall ourself as event filter for the lost // child and its children - TQObject * pLostChild = TQT_TQOBJECT(( ( TQChildEvent* ) e ) ->child()); + TQObject * pLostChild = ( ( TQChildEvent* ) e ) ->child(); if ( ( pLostChild != 0L ) && ( pLostChild->isWidgetType() ) ) { - TQObjectList * list = pLostChild->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList * list = pLostChild->queryList( "TQWidget" ); list->insert( 0, pLostChild ); // add the lost child to the list too, just to save code TQObjectListIt it( *list ); // iterate over all lost child widgets TQObject * o; @@ -577,8 +577,8 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e ) TQWidget * widg = ( TQWidget* ) o; ++it; widg->removeEventFilter( this ); - TQ_FocusPolicy wfp = widg->focusPolicy(); - if ( wfp == TQ_StrongFocus || wfp == TQ_TabFocus || widg->focusPolicy() == TQ_WheelFocus ) + TQWidget::FocusPolicy wfp = widg->focusPolicy(); + if ( wfp == TQWidget::StrongFocus || wfp == TQWidget::TabFocus || widg->focusPolicy() == TQWidget::WheelFocus ) { if ( m_firstFocusableChildWidget == widg ) m_firstFocusableChildWidget = 0L; // reset first widget @@ -595,13 +595,13 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e ) // if we got a new child and we are attached to the MDI system we // install ourself as event filter for the new child and its children // (as we did when we were added to the MDI system). - TQObject * pNewChild = TQT_TQOBJECT(( ( TQChildEvent* ) e ) ->child()); + TQObject * pNewChild = ( ( TQChildEvent* ) e ) ->child(); if ( ( pNewChild != 0L ) && ( pNewChild->isWidgetType() ) ) { TQWidget * pNewWidget = ( TQWidget* ) pNewChild; if ( pNewWidget->testWFlags( TQt::WType_Dialog | TQt::WShowModal ) ) return false; - TQObjectList *list = pNewWidget->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *list = pNewWidget->queryList( "TQWidget" ); 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 TQObject * o; @@ -610,9 +610,9 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e ) TQWidget * widg = ( TQWidget* ) o; ++it; widg->installEventFilter( this ); - connect( widg, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slot_childDestroyed() ) ); - TQ_FocusPolicy wfp = widg->focusPolicy(); - if ( wfp == TQ_StrongFocus || wfp == TQ_TabFocus || widg->focusPolicy() == TQ_WheelFocus ) + connect( widg, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( slot_childDestroyed() ) ); + TQWidget::FocusPolicy wfp = widg->focusPolicy(); + if ( wfp == TQWidget::StrongFocus || wfp == TQWidget::TabFocus || widg->focusPolicy() == TQWidget::WheelFocus ) { if ( m_firstFocusableChildWidget == 0 ) m_firstFocusableChildWidget = widg; // first widge @@ -628,14 +628,14 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e ) if ( e->type() == TQEvent::IconChange ) { // tqDebug("KMDiChildView:: TQEvent:IconChange intercepted\n"); - if ( TQT_BASE_OBJECT(obj) == this ) + if ( obj == this ) iconUpdated( this, icon() ? ( *icon() ) : TQPixmap() ); - else if ( TQT_BASE_OBJECT(obj) == m_trackChanges ) + else if ( obj == m_trackChanges ) setIcon( m_trackChanges->icon() ? ( *( m_trackChanges->icon() ) ) : TQPixmap() ); } if ( e->type() == TQEvent::CaptionChange ) { - if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(this) ) + if ( obj == this ) captionUpdated( this, caption() ); } } @@ -646,7 +646,7 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e ) /** Switches interposing in event loop of all current child widgets off. */ void KMdiChildView::removeEventFilterForAllChildren() { - TQObjectList* list = queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList* list = queryList( "TQWidget" ); TQObjectListIt it( *list ); // iterate over all child widgets TQObject* obj; while ( ( obj = it.current() ) != 0 ) @@ -769,5 +769,3 @@ void KMdiChildView::raise() TQWidget::raise(); } - -// kate: space-indent off; replace-tabs off; indent-mode csands; tab-width 4; |