|
|
|
@ -140,7 +140,7 @@ KMdiDockContainer::~KMdiDockContainer()
|
|
|
|
|
KDockWidget *w = it.key();
|
|
|
|
|
if ( m_overlapButtons.contains( w ) )
|
|
|
|
|
{
|
|
|
|
|
( static_cast<KDockWidgetHeader*>( w->getHeader()->qt_cast( "KDockWidgetHeader" ) ) )->removeButton( m_overlapButtons[w] );
|
|
|
|
|
( static_cast<KDockWidgetHeader*>( w->getHeader()->tqt_cast( "KDockWidgetHeader" ) ) )->removeButton( m_overlapButtons[w] );
|
|
|
|
|
m_overlapButtons.remove( w );
|
|
|
|
|
}
|
|
|
|
|
m_map.remove( w );
|
|
|
|
@ -169,7 +169,7 @@ void KMdiDockContainer::init()
|
|
|
|
|
// try to restore splitter size
|
|
|
|
|
if ( parentDockWidget() && parentDockWidget()->parent() )
|
|
|
|
|
{
|
|
|
|
|
KDockSplitter * sp = static_cast<KDockSplitter*>( parentDockWidget()->parent()->qt_cast( "KDockSplitter" ) );
|
|
|
|
|
KDockSplitter * sp = static_cast<KDockSplitter*>( parentDockWidget()->parent()->tqt_cast( "KDockSplitter" ) );
|
|
|
|
|
if ( sp )
|
|
|
|
|
sp->setSeparatorPosX( m_separatorPos );
|
|
|
|
|
}
|
|
|
|
@ -204,12 +204,12 @@ void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, TQPixmap pixmap, const
|
|
|
|
|
if ( ( ( KDockWidget* ) parentWidget() ) ->mayBeShow() )
|
|
|
|
|
( ( KDockWidget* ) parentWidget() ) ->dockBack();
|
|
|
|
|
|
|
|
|
|
if ( w->getHeader()->qt_cast( "KDockWidgetHeader" ) )
|
|
|
|
|
if ( w->getHeader()->tqt_cast( "KDockWidgetHeader" ) )
|
|
|
|
|
{
|
|
|
|
|
kdDebug( 760 ) << k_funcinfo << "The dockwidget we're adding has a header" << endl;
|
|
|
|
|
kdDebug( 760 ) << k_funcinfo << "Adding our overlap mode button to it" << endl;
|
|
|
|
|
|
|
|
|
|
KDockWidgetHeader *hdr = static_cast<KDockWidgetHeader*>( w->getHeader()->qt_cast( "KDockWidgetHeader" ) );
|
|
|
|
|
KDockWidgetHeader *hdr = static_cast<KDockWidgetHeader*>( w->getHeader()->tqt_cast( "KDockWidgetHeader" ) );
|
|
|
|
|
KDockButton_Private *btn = new KDockButton_Private( hdr, "OverlapButton" );
|
|
|
|
|
|
|
|
|
|
TQToolTip::add( btn, i18n( "Switch between overlap and side by side mode", "Overlap" ) );
|
|
|
|
@ -269,7 +269,7 @@ bool KMdiDockContainer::eventFilter( TQObject *obj, TQEvent *event )
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
KDockWidgetHeader *hdr = static_cast<KDockWidgetHeader*>( w->getHeader()->qt_cast( "KDockWidgetHeader" ) );
|
|
|
|
|
KDockWidgetHeader *hdr = static_cast<KDockWidgetHeader*>( w->getHeader()->tqt_cast( "KDockWidgetHeader" ) );
|
|
|
|
|
if ( !hdr )
|
|
|
|
|
{
|
|
|
|
|
kdDebug(760) << "Wrong header type in KMdiDockContainer::eventFilter" << endl;
|
|
|
|
@ -384,7 +384,7 @@ void KMdiDockContainer::removeWidget( KDockWidget* dwdg )
|
|
|
|
|
m_revMap.remove( id );
|
|
|
|
|
if ( m_overlapButtons.contains( w ) )
|
|
|
|
|
{
|
|
|
|
|
( static_cast<KDockWidgetHeader*>( w->getHeader() ->qt_cast( "KDockWidgetHeader" ) ) )->removeButton( m_overlapButtons[ w ] );
|
|
|
|
|
( static_cast<KDockWidgetHeader*>( w->getHeader() ->tqt_cast( "KDockWidgetHeader" ) ) )->removeButton( m_overlapButtons[ w ] );
|
|
|
|
|
m_overlapButtons.remove( w );
|
|
|
|
|
}
|
|
|
|
|
KDockContainer::removeWidget( w );
|
|
|
|
@ -439,7 +439,7 @@ void KMdiDockContainer::tabClicked( int t )
|
|
|
|
|
if ( m_ws->widget( t ) )
|
|
|
|
|
{
|
|
|
|
|
m_ws->raiseWidget( t );
|
|
|
|
|
KDockWidget * tmpDw = static_cast<KDockWidget*>( m_ws->widget( t )->qt_cast( "KDockWidget" ) );
|
|
|
|
|
KDockWidget * tmpDw = static_cast<KDockWidget*>( m_ws->widget( t )->tqt_cast( "KDockWidget" ) );
|
|
|
|
|
if ( tmpDw )
|
|
|
|
|
{
|
|
|
|
|
if ( tmpDw->getWidget() )
|
|
|
|
@ -464,7 +464,7 @@ void KMdiDockContainer::tabClicked( int t )
|
|
|
|
|
// try save splitter position
|
|
|
|
|
if ( parentDockWidget() && parentDockWidget()->parent() )
|
|
|
|
|
{
|
|
|
|
|
KDockSplitter * sp = static_cast<KDockSplitter*>( parentDockWidget()->parent()->qt_cast( "KDockSplitter" ) );
|
|
|
|
|
KDockSplitter * sp = static_cast<KDockSplitter*>( parentDockWidget()->parent()->tqt_cast( "KDockSplitter" ) );
|
|
|
|
|
if ( sp )
|
|
|
|
|
m_separatorPos = sp->separatorPos();
|
|
|
|
|
}
|
|
|
|
@ -636,7 +636,7 @@ void KMdiDockContainer::save( KConfig* cfg, const TQString& group_or_prefix )
|
|
|
|
|
if ( parentDockWidget() && parentDockWidget() ->parent() )
|
|
|
|
|
{
|
|
|
|
|
KDockSplitter * sp = static_cast<KDockSplitter*>( parentDockWidget() ->
|
|
|
|
|
parent() ->qt_cast( "KDockSplitter" ) );
|
|
|
|
|
parent() ->tqt_cast( "KDockSplitter" ) );
|
|
|
|
|
if ( sp )
|
|
|
|
|
cfg->writeEntry( "separatorPos", m_separatorPos );
|
|
|
|
|
}
|
|
|
|
|