|
|
@ -122,7 +122,7 @@ void KDockMainWindow::setMainDockWidget( KDockWidget* mdw )
|
|
|
|
void KDockMainWindow::setView( TQWidget *view )
|
|
|
|
void KDockMainWindow::setView( TQWidget *view )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if ( view->isA("KDockWidget") ){
|
|
|
|
if ( view->isA("KDockWidget") ){
|
|
|
|
if ( TQT_BASE_OBJECT(view->parent()) != TQT_BASE_OBJECT(this) ) ((KDockWidget*)view)->applyToWidget( this );
|
|
|
|
if ( view->parent() != this ) ((KDockWidget*)view)->applyToWidget( this );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef NO_KDE2
|
|
|
|
#ifndef NO_KDE2
|
|
|
@ -778,7 +778,7 @@ void KDockWidget::updateHeader()
|
|
|
|
setCursor(TQCursor(ArrowCursor));
|
|
|
|
setCursor(TQCursor(ArrowCursor));
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
if ( (TQT_BASE_OBJECT(parent()) == TQT_BASE_OBJECT(manager->main)) || isGroup || (eDocking == KDockWidget::DockNone) ){
|
|
|
|
if ( (parent() == manager->main) || isGroup || (eDocking == KDockWidget::DockNone) ){
|
|
|
|
header->hide();
|
|
|
|
header->hide();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
header->setTopLevel( false );
|
|
|
|
header->setTopLevel( false );
|
|
|
@ -799,7 +799,7 @@ void KDockWidget::updateHeader()
|
|
|
|
|
|
|
|
|
|
|
|
void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p )
|
|
|
|
void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if ( TQT_BASE_OBJECT(parent()) != TQT_BASE_OBJECT(s) )
|
|
|
|
if ( parent() != s )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
hide();
|
|
|
|
hide();
|
|
|
|
reparent(s, 0, TQPoint(0,0), false);
|
|
|
|
reparent(s, 0, TQPoint(0,0), false);
|
|
|
@ -1449,7 +1449,7 @@ void KDockWidget::setWidget( TQWidget* mw )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if ( !mw ) return;
|
|
|
|
if ( !mw ) return;
|
|
|
|
|
|
|
|
|
|
|
|
if ( TQT_BASE_OBJECT(mw->parent()) != TQT_BASE_OBJECT(this) ){
|
|
|
|
if ( mw->parent() != this ){
|
|
|
|
mw->reparent(this, 0, TQPoint(0,0), false);
|
|
|
|
mw->reparent(this, 0, TQPoint(0,0), false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1505,13 +1505,13 @@ void KDockWidget::setDockTabName( KDockTabGroup* tab )
|
|
|
|
|
|
|
|
|
|
|
|
bool KDockWidget::mayBeHide() const
|
|
|
|
bool KDockWidget::mayBeHide() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool f = (TQT_BASE_OBJECT(parent()) != TQT_BASE_OBJECT(manager->main));
|
|
|
|
bool f = (parent() != manager->main);
|
|
|
|
return ( !isGroup && !isTabGroup && f && isVisible() && ( eDocking != (int)KDockWidget::DockNone ) );
|
|
|
|
return ( !isGroup && !isTabGroup && f && isVisible() && ( eDocking != (int)KDockWidget::DockNone ) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool KDockWidget::mayBeShow() const
|
|
|
|
bool KDockWidget::mayBeShow() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool f = (TQT_BASE_OBJECT(parent()) != TQT_BASE_OBJECT(manager->main));
|
|
|
|
bool f = (parent() != manager->main);
|
|
|
|
return ( !isGroup && !isTabGroup && f && !isVisible() );
|
|
|
|
return ( !isGroup && !isTabGroup && f && !isVisible() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -2213,7 +2213,7 @@ void KDockManager::writeConfig(TQDomElement &base)
|
|
|
|
TQObjectListIt it(*childDock);
|
|
|
|
TQObjectListIt it(*childDock);
|
|
|
|
KDockWidget *obj1;
|
|
|
|
KDockWidget *obj1;
|
|
|
|
while ( (obj1=(KDockWidget*)it.current()) ) {
|
|
|
|
while ( (obj1=(KDockWidget*)it.current()) ) {
|
|
|
|
if ( TQT_BASE_OBJECT(obj1->parent()) == TQT_BASE_OBJECT(main) )
|
|
|
|
if ( obj1->parent() == main )
|
|
|
|
mainWidgetStr = TQString::fromLatin1(obj1->name());
|
|
|
|
mainWidgetStr = TQString::fromLatin1(obj1->name());
|
|
|
|
nList.append(obj1->name());
|
|
|
|
nList.append(obj1->name());
|
|
|
|
++it;
|
|
|
|
++it;
|
|
|
@ -2548,7 +2548,7 @@ void KDockManager::writeConfig( TDEConfig* c, TQString group )
|
|
|
|
++it;
|
|
|
|
++it;
|
|
|
|
//debug(" +Add subdock %s", obj->name());
|
|
|
|
//debug(" +Add subdock %s", obj->name());
|
|
|
|
nList.append( obj->name() );
|
|
|
|
nList.append( obj->name() );
|
|
|
|
if ( TQT_BASE_OBJECT(obj->parent()) == TQT_BASE_OBJECT(main) )
|
|
|
|
if ( obj->parent() == main )
|
|
|
|
c->writeEntry( "Main:view", obj->name() );
|
|
|
|
c->writeEntry( "Main:view", obj->name() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|