diff options
Diffstat (limited to 'tdemdi/tdemdichildview.cpp')
| -rw-r--r-- | tdemdi/tdemdichildview.cpp | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/tdemdi/tdemdichildview.cpp b/tdemdi/tdemdichildview.cpp index c16114cb7..be2ea32fa 100644 --- a/tdemdi/tdemdichildview.cpp +++ b/tdemdi/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 @@ -88,7 +88,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 @@ -363,7 +363,7 @@ void KMdiChildView::youAreDetached() if ( myIconPtr() ) setIcon( *( myIconPtr() ) ); - setFocusPolicy( TQ_StrongFocus ); + setFocusPolicy( TQWidget::StrongFocus ); emit isDetachedNow(); } @@ -493,10 +493,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(sender()); + const TQObject * pLostChild = 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; @@ -524,11 +524,11 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e ) if ( e->type() == TQEvent::KeyPress && isAttached() ) { TQKeyEvent* ke = ( TQKeyEvent* ) e; - if ( ke->key() == Qt::Key_Tab ) + 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 ) { @@ -545,7 +545,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; @@ -566,10 +566,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; @@ -578,8 +578,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 @@ -596,13 +596,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( (WFlags)(WType_Dialog | 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; @@ -611,9 +611,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 @@ -629,14 +629,14 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e ) if ( e->type() == TQEvent::IconChange ) { // tqDebug("KMDiChildView:: TQEvent:IconChange intercepted\n"); - if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(this) ) + if ( obj == this ) iconUpdated( this, icon() ? ( *icon() ) : TQPixmap() ); - else if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(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() ); } } @@ -647,7 +647,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 ) @@ -770,5 +770,3 @@ void KMdiChildView::raise() TQWidget::raise(); } - -// kate: space-indent off; replace-tabs off; indent-mode csands; tab-width 4; |
