diff options
Diffstat (limited to 'lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp')
-rw-r--r-- | lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp b/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp index f541a824..ff24a983 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp @@ -49,8 +49,8 @@ static const char* const kmdi_not_close_xpm[] = "#####" }; -KMdiDockContainer::KMdiDockContainer( TQWidget *parent, TQWidget *win, int position, int flags ) - : TQWidget( parent ), KDockContainer() +KMdiDockContainer::KMdiDockContainer( TQWidget *tqparent, TQWidget *win, int position, int flags ) + : TQWidget( tqparent ), KDockContainer() { m_tabSwitching = false; m_block = false; @@ -70,9 +70,9 @@ KMdiDockContainer::KMdiDockContainer( TQWidget *parent, TQWidget *win, int posit if ( m_horizontal ) - l = new TQVBoxLayout( this ); //vertical layout for top and bottom docks + l = new TQVBoxLayout( this ); //vertical tqlayout for top and bottom docks else - l = new TQHBoxLayout( this ); //horizontal layout for left and right docks + l = new TQHBoxLayout( this ); //horizontal tqlayout for left and right docks l->setAutoAdd( false ); @@ -104,9 +104,9 @@ KMdiDockContainer::KMdiDockContainer( TQWidget *parent, TQWidget *win, int posit m_ws = new TQWidgetStack( this ); - m_ws->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); + m_ws->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); - //layout the tabbar + //tqlayout the tabbar if ( position == KDockWidget::DockLeft || position == KDockWidget::DockTop ) { //add the tabbar then the widget stack @@ -138,7 +138,7 @@ KMdiDockContainer::~KMdiDockContainer() { it = m_map.begin(); KDockWidget *w = it.key(); - if ( m_overlapButtons.contains( w ) ) + if ( m_overlapButtons.tqcontains( w ) ) { ( static_cast<KDockWidgetHeader*>( w->getHeader()->qt_cast( "KDockWidgetHeader" ) ) )->removeButton( m_overlapButtons[w] ); m_overlapButtons.remove( w ); @@ -156,28 +156,28 @@ void KMdiDockContainer::init() if ( !m_horizontal ) { kdDebug( 760 ) << k_funcinfo << "Horizontal tabbar. Setting forced fixed width." << endl; - parentDockWidget()->setForcedFixedWidth( m_tb->width() ); + tqparentDockWidget()->setForcedFixedWidth( m_tb->width() ); activateOverlapMode( m_tb->width() ); } else { kdDebug( 760 ) << k_funcinfo << "Vertical tabbar. Setting forced fixed height." << endl; - parentDockWidget()->setForcedFixedHeight( m_tb->height() ); + tqparentDockWidget()->setForcedFixedHeight( m_tb->height() ); activateOverlapMode( m_tb->height() ); } // try to restore splitter size - if ( parentDockWidget() && parentDockWidget()->parent() ) + if ( tqparentDockWidget() && tqparentDockWidget()->tqparent() ) { - KDockSplitter * sp = static_cast<KDockSplitter*>( parentDockWidget()->parent()->qt_cast( "KDockSplitter" ) ); + KDockSplitter * sp = static_cast<KDockSplitter*>( tqparentDockWidget()->tqparent()->qt_cast( "KDockSplitter" ) ); if ( sp ) sp->setSeparatorPosX( m_separatorPos ); } } -KDockWidget* KMdiDockContainer::parentDockWidget() +KDockWidget* KMdiDockContainer::tqparentDockWidget() { - return ( ( KDockWidget* ) parent() ); + return ( ( KDockWidget* ) tqparent() ); } void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, TQPixmap pixmap, const TQString &text, int & ) @@ -185,7 +185,7 @@ void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, TQPixmap pixmap, const kdDebug( 760 ) << k_funcinfo << "Adding a dockwidget to the dock container" << endl; KDockWidget* w = dwdg; int tab; - bool alreadyThere = m_map.contains( w ); + bool alreadyThere = m_map.tqcontains( w ); if ( alreadyThere ) { @@ -201,8 +201,8 @@ void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, TQPixmap pixmap, const m_map.insert( w, tab ); m_revMap.insert( tab, w ); - if ( ( ( KDockWidget* ) parentWidget() ) ->mayBeShow() ) - ( ( KDockWidget* ) parentWidget() ) ->dockBack(); + if ( ( ( KDockWidget* ) tqparentWidget() ) ->mayBeShow() ) + ( ( KDockWidget* ) tqparentWidget() ) ->dockBack(); if ( w->getHeader()->qt_cast( "KDockWidgetHeader" ) ) { @@ -277,7 +277,7 @@ bool KMdiDockContainer::eventFilter( TQObject *obj, TQEvent *event ) } m_dockManager = w->dockManager(); - m_dragPanel = hdr->dragPanel(); + m_dragPanel = TQT_TQOBJECT(hdr->dragPanel()); if ( m_dragPanel ) m_movingState = WaitingForMoveStart; @@ -300,7 +300,7 @@ bool KMdiDockContainer::eventFilter( TQObject *obj, TQEvent *event ) TQPoint p( ( ( TQMouseEvent* ) event )->pos() - m_startEvent->pos() ); if ( p.manhattanLength() > KGlobalSettings::dndEventDelay() ) { - m_dockManager->eventFilter( m_dragPanel, m_startEvent ); + m_dockManager->eventFilter( m_dragPanel, TQT_TQEVENT(m_startEvent) ); m_dockManager->eventFilter( m_dragPanel, event ); m_movingState = Moving; } @@ -319,7 +319,7 @@ bool KMdiDockContainer::eventFilter( TQObject *obj, TQEvent *event ) void KMdiDockContainer::showWidget( KDockWidget *w ) { - if ( !m_map.contains( w ) ) + if ( !m_map.tqcontains( w ) ) return ; int id = m_map[ w ]; @@ -359,14 +359,14 @@ void KMdiDockContainer::hideIfNeeded() if ( itemNames.count() == 0 ) { kdDebug( 760 ) << k_funcinfo << "Hiding the dock container" << endl; - ( ( KDockWidget* ) parentWidget() )->undock(); + ( ( KDockWidget* ) tqparentWidget() )->undock(); } } void KMdiDockContainer::removeWidget( KDockWidget* dwdg ) { KDockWidget * w = dwdg; - if ( !m_map.contains( w ) ) + if ( !m_map.tqcontains( w ) ) return; //we don't have this widget in our container kdDebug( 760 ) << k_funcinfo << endl; @@ -382,7 +382,7 @@ void KMdiDockContainer::removeWidget( KDockWidget* dwdg ) m_ws->removeWidget( w ); m_map.remove( w ); m_revMap.remove( id ); - if ( m_overlapButtons.contains( w ) ) + if ( m_overlapButtons.tqcontains( w ) ) { ( static_cast<KDockWidgetHeader*>( w->getHeader() ->qt_cast( "KDockWidgetHeader" ) ) )->removeButton( m_overlapButtons[ w ] ); m_overlapButtons.remove( w ); @@ -398,7 +398,7 @@ void KMdiDockContainer::undockWidget( KDockWidget *dwdg ) { KDockWidget * w = dwdg; - if ( !m_map.contains( w ) ) + if ( !m_map.tqcontains( w ) ) return ; int id = m_map[ w ]; @@ -421,14 +421,14 @@ void KMdiDockContainer::tabClicked( int t ) { kdDebug( 760 ) << k_funcinfo << "Showing widgetstack for tab just clicked" << endl; m_ws->show(); - parentDockWidget()->restoreFromForcedFixedSize(); + tqparentDockWidget()->restoreFromForcedFixedSize(); } if ( !m_ws->widget( t ) ) { kdDebug( 760 ) << k_funcinfo << "Widget tab was clicked for is not in our stack" << endl; kdDebug( 760 ) << k_funcinfo << "Docking it back in" << endl; - m_revMap[t]->manualDock( parentDockWidget(), KDockWidget::DockCenter, 20 ); + m_revMap[t]->manualDock( tqparentDockWidget(), KDockWidget::DockCenter, 20 ); if ( call_makeVisible ) m_revMap[t]->makeDockVisible(); m_tabSwitching = false; @@ -462,9 +462,9 @@ void KMdiDockContainer::tabClicked( int t ) { kdDebug( 760 ) << k_funcinfo << "Tab " << t << " was just deactiviated" << endl; // try save splitter position - if ( parentDockWidget() && parentDockWidget()->parent() ) + if ( tqparentDockWidget() && tqparentDockWidget()->tqparent() ) { - KDockSplitter * sp = static_cast<KDockSplitter*>( parentDockWidget()->parent()->qt_cast( "KDockSplitter" ) ); + KDockSplitter * sp = static_cast<KDockSplitter*>( tqparentDockWidget()->tqparent()->qt_cast( "KDockSplitter" ) ); if ( sp ) m_separatorPos = sp->separatorPos(); } @@ -484,9 +484,9 @@ void KMdiDockContainer::tabClicked( int t ) kdDebug( 760 ) << k_funcinfo << "Fixed Width:" << m_tb->width() << endl; if ( !m_horizontal ) - parentDockWidget()->setForcedFixedWidth( m_tb->width() ); // strange why it worked before at all + tqparentDockWidget()->setForcedFixedWidth( m_tb->width() ); // strange why it worked before at all else - parentDockWidget()->setForcedFixedHeight( m_tb->height() ); // strange why it worked before at all + tqparentDockWidget()->setForcedFixedHeight( m_tb->height() ); // strange why it worked before at all } m_tabSwitching = false; } @@ -514,7 +514,7 @@ void KMdiDockContainer::save( TQDomElement& dockEl ) TQDomDocument doc = dockEl.ownerDocument(); TQDomElement el; el = doc.createElement( "name" ); - el.appendChild( doc.createTextNode( TQString( "%1" ).arg( parent() ->name() ) ) ); + el.appendChild( doc.createTextNode( TQString( "%1" ).tqarg( tqparent() ->name() ) ) ); dockEl.appendChild( el ); el = doc.createElement( "overlapMode" ); el.appendChild( doc.createTextNode( isOverlapMode() ? "true" : "false" ) ); @@ -526,7 +526,7 @@ void KMdiDockContainer::save( TQDomElement& dockEl ) for ( ;it.current() != 0;++it, ++it2 ) { el = doc.createElement( "child" ); - el.setAttribute( "pos", TQString( "%1" ).arg( i ) ); + el.setAttribute( "pos", TQString( "%1" ).tqarg( i ) ); TQString s = tabCaptions[ *it2 ]; if ( !s.isEmpty() ) { @@ -569,7 +569,7 @@ void KMdiDockContainer::load( TQDomElement& dockEl ) } else if ( el.tagName() == "child" ) { - KDockWidget * dw = ( ( KDockWidget* ) parent() ) ->dockManager() ->getDockWidgetFromName( el.text() ); + KDockWidget * dw = ( ( KDockWidget* ) tqparent() ) ->dockManager() ->getDockWidgetFromName( el.text() ); if ( dw ) { if ( el.hasAttribute( "tabCaption" ) ) @@ -580,7 +580,7 @@ void KMdiDockContainer::load( TQDomElement& dockEl ) { dw->setToolTipString( el.attribute( "tabTooltip" ) ); } - dw->manualDock( ( KDockWidget* ) parent(), KDockWidget::DockCenter ); + dw->manualDock( ( KDockWidget* ) tqparent(), KDockWidget::DockCenter ); } } } @@ -589,9 +589,9 @@ void KMdiDockContainer::load( TQDomElement& dockEl ) TQPtrListIterator<KMultiTabBarTab> it1( *tl ); m_ws->hide(); if ( !m_horizontal ) - parentDockWidget()->setForcedFixedWidth( m_tb->width() ); + tqparentDockWidget()->setForcedFixedWidth( m_tb->width() ); else - parentDockWidget()->setForcedFixedHeight( m_tb->height() ); + tqparentDockWidget()->setForcedFixedHeight( m_tb->height() ); for ( ;it1.current() != 0;++it1 ) m_tb->setTab( it1.current() ->id(), false ); @@ -624,8 +624,8 @@ void KMdiDockContainer::load( TQDomElement& dockEl ) void KMdiDockContainer::save( KConfig* cfg, const TQString& group_or_prefix ) { TQString grp = cfg->group(); - cfg->deleteGroup( group_or_prefix + TQString( "::%1" ).arg( parent() ->name() ) ); - cfg->setGroup( group_or_prefix + TQString( "::%1" ).arg( parent() ->name() ) ); + cfg->deleteGroup( group_or_prefix + TQString( "::%1" ).tqarg( tqparent() ->name() ) ); + cfg->setGroup( group_or_prefix + TQString( "::%1" ).tqarg( tqparent() ->name() ) ); if ( isOverlapMode() ) cfg->writeEntry( "overlapMode", "true" ); @@ -633,10 +633,10 @@ void KMdiDockContainer::save( KConfig* cfg, const TQString& group_or_prefix ) cfg->writeEntry( "overlapMode", "false" ); // try to save the splitter position - if ( parentDockWidget() && parentDockWidget() ->parent() ) + if ( tqparentDockWidget() && tqparentDockWidget() ->tqparent() ) { - KDockSplitter * sp = static_cast<KDockSplitter*>( parentDockWidget() -> - parent() ->qt_cast( "KDockSplitter" ) ); + KDockSplitter * sp = static_cast<KDockSplitter*>( tqparentDockWidget() -> + tqparent() ->qt_cast( "KDockSplitter" ) ); if ( sp ) cfg->writeEntry( "separatorPos", m_separatorPos ); } @@ -647,17 +647,17 @@ void KMdiDockContainer::save( KConfig* cfg, const TQString& group_or_prefix ) int i = 0; for ( ;it.current() != 0;++it, ++it2 ) { - // cfg->writeEntry(TQString("widget%1").arg(i),m_ws->widget(it.current()->id())->name()); - cfg->writeEntry( TQString( "widget%1" ).arg( i ), ( *it2 ) ); + // cfg->writeEntry(TQString("widget%1").tqarg(i),m_ws->widget(it.current()->id())->name()); + cfg->writeEntry( TQString( "widget%1" ).tqarg( i ), ( *it2 ) ); TQString s = tabCaptions[ *it2 ]; if ( !s.isEmpty() ) { - cfg->writeEntry( TQString( "widget%1-tabCaption" ).arg( i ), s ); + cfg->writeEntry( TQString( "widget%1-tabCaption" ).tqarg( i ), s ); } s = tabTooltips[ *it2 ]; if ( !s.isEmpty() ) { - cfg->writeEntry( TQString( "widget%1-tabTooltip" ).arg( i ), s ); + cfg->writeEntry( TQString( "widget%1-tabTooltip" ).tqarg( i ), s ); } // kdDebug(760)<<"****************************************Saving: "<<m_ws->widget(it.current()->id())->name()<<endl; if ( m_tb->isTabRaised( it.current() ->id() ) ) @@ -672,7 +672,7 @@ void KMdiDockContainer::save( KConfig* cfg, const TQString& group_or_prefix ) void KMdiDockContainer::load( KConfig* cfg, const TQString& group_or_prefix ) { TQString grp = cfg->group(); - cfg->setGroup( group_or_prefix + TQString( "::%1" ).arg( parent() ->name() ) ); + cfg->setGroup( group_or_prefix + TQString( "::%1" ).tqarg( tqparent() ->name() ) ); if ( cfg->readEntry( "overlapMode" ) != "false" ) activateOverlapMode( m_tb->width() ); @@ -685,24 +685,24 @@ void KMdiDockContainer::load( KConfig* cfg, const TQString& group_or_prefix ) TQString raise; while ( true ) { - TQString dwn = cfg->readEntry( TQString( "widget%1" ).arg( i ) ); + TQString dwn = cfg->readEntry( TQString( "widget%1" ).tqarg( i ) ); if ( dwn.isEmpty() ) break; kdDebug( 760 ) << k_funcinfo << "configuring dockwidget :" << dwn << endl; - KDockWidget *dw = ( ( KDockWidget* ) parent() ) ->dockManager() ->getDockWidgetFromName( dwn ); + KDockWidget *dw = ( ( KDockWidget* ) tqparent() ) ->dockManager() ->getDockWidgetFromName( dwn ); if ( dw ) { - TQString s = cfg->readEntry( TQString( "widget%1-tabCaption" ).arg( i ) ); + TQString s = cfg->readEntry( TQString( "widget%1-tabCaption" ).tqarg( i ) ); if ( !s.isEmpty() ) { dw->setTabPageLabel( s ); } - s = cfg->readEntry( TQString( "widget%1-tabTooltip" ).arg( i ) ); + s = cfg->readEntry( TQString( "widget%1-tabTooltip" ).tqarg( i ) ); if ( !s.isEmpty() ) { dw->setToolTipString( s ); } - dw->manualDock( ( KDockWidget* ) parent(), KDockWidget::DockCenter ); + dw->manualDock( ( KDockWidget* ) tqparent(), KDockWidget::DockCenter ); } if ( cfg->readBoolEntry( dwn, false ) ) raise = dwn; @@ -714,9 +714,9 @@ void KMdiDockContainer::load( KConfig* cfg, const TQString& group_or_prefix ) TQPtrListIterator<KMultiTabBarTab> it1( *tl ); m_ws->hide(); if ( !m_horizontal ) - parentDockWidget() ->setForcedFixedWidth( m_tb->width() ); + tqparentDockWidget() ->setForcedFixedWidth( m_tb->width() ); else - parentDockWidget() ->setForcedFixedHeight( m_tb->height() ); + tqparentDockWidget() ->setForcedFixedHeight( m_tb->height() ); for ( ;it1.current() != 0;++it1 ) { m_tb->setTab( it1.current() ->id(), false ); @@ -815,7 +815,7 @@ void KMdiDockContainer::prevToolView() { kdDebug( 760 ) << k_funcinfo << endl; TQPtrList<KMultiTabBarTab>* tabs = m_tb->tabs(); - int pos = tabs->findRef( m_tb->tab( oldtab ) ); + int pos = tabs->tqfindRef( m_tb->tab( oldtab ) ); if ( pos == -1 ) return ; @@ -836,7 +836,7 @@ void KMdiDockContainer::nextToolView() { kdDebug( 760 ) << k_funcinfo << endl; TQPtrList<KMultiTabBarTab>* tabs = m_tb->tabs(); - int pos = tabs->findRef( m_tb->tab( oldtab ) ); + int pos = tabs->tqfindRef( m_tb->tab( oldtab ) ); if ( pos == -1 ) return ; @@ -853,4 +853,4 @@ void KMdiDockContainer::nextToolView() tabClicked( tab->id() ); } -// 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; |