summaryrefslogtreecommitdiffstats
path: root/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compatibility/kmdi/qextmdi/kdockwidget.cpp')
-rw-r--r--lib/compatibility/kmdi/qextmdi/kdockwidget.cpp204
1 files changed, 102 insertions, 102 deletions
diff --git a/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp b/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp
index 0e63ed8a..b233202f 100644
--- a/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp
+++ b/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp
@@ -99,8 +99,8 @@ static const char* const not_close_xpm[]={
*
* @author Max Judin.
*/
-KDockMainWindow::KDockMainWindow( TQWidget* tqparent, const char *name, WFlags f)
-:KMainWindow( tqparent, name, f )
+KDockMainWindow::KDockMainWindow( TQWidget* parent, const char *name, WFlags f)
+:KMainWindow( parent, name, f )
{
TQString new_name = TQString(name) + TQString("_DockManager");
dockManager = new KDockManager( this, new_name.latin1() );
@@ -122,7 +122,7 @@ void KDockMainWindow::setMainDockWidget( KDockWidget* mdw )
void KDockMainWindow::setView( TQWidget *view )
{
if ( view->isA("KDockWidget") ){
- if ( TQT_BASE_OBJECT(view->tqparent()) != TQT_BASE_OBJECT(this) ) ((KDockWidget*)view)->applyToWidget( this );
+ if ( TQT_BASE_OBJECT(view->parent()) != TQT_BASE_OBJECT(this) ) ((KDockWidget*)view)->applyToWidget( this );
}
#ifndef NO_KDE2
@@ -132,9 +132,9 @@ void KDockMainWindow::setView( TQWidget *view )
#endif
}
-KDockWidget* KDockMainWindow::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* tqparent, const TQString& strCaption, const TQString& strTabPageLabel)
+KDockWidget* KDockMainWindow::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel)
{
- return new KDockWidget( dockManager, name.latin1(), pixmap, tqparent, strCaption, strTabPageLabel );
+ return new KDockWidget( dockManager, name.latin1(), pixmap, parent, strCaption, strTabPageLabel );
}
void KDockMainWindow::makeDockVisible( KDockWidget* dock )
@@ -185,15 +185,15 @@ void KDockMainWindow::slotDockWidgetUndocked()
}
/*************************************************************************/
-KDockWidgetAbstractHeaderDrag::KDockWidgetAbstractHeaderDrag( KDockWidgetAbstractHeader* tqparent, KDockWidget* dock, const char* name )
-:TQFrame( tqparent, name )
+KDockWidgetAbstractHeaderDrag::KDockWidgetAbstractHeaderDrag( KDockWidgetAbstractHeader* parent, KDockWidget* dock, const char* name )
+:TQFrame( parent, name )
{
dw = dock;
installEventFilter( dock->dockManager() );
}
/*************************************************************************/
-KDockWidgetHeaderDrag::KDockWidgetHeaderDrag( KDockWidgetAbstractHeader* tqparent, KDockWidget* dock, const char* name )
-:KDockWidgetAbstractHeaderDrag( tqparent, dock, name )
+KDockWidgetHeaderDrag::KDockWidgetHeaderDrag( KDockWidgetAbstractHeader* parent, KDockWidget* dock, const char* name )
+:KDockWidgetAbstractHeaderDrag( parent, dock, name )
{
}
@@ -208,13 +208,13 @@ void KDockWidgetHeaderDrag::paintEvent( TQPaintEvent* )
paint.end();
}
/*************************************************************************/
-KDockWidgetAbstractHeader::KDockWidgetAbstractHeader( KDockWidget* tqparent, const char* name )
-:TQFrame( tqparent, name )
+KDockWidgetAbstractHeader::KDockWidgetAbstractHeader( KDockWidget* parent, const char* name )
+:TQFrame( parent, name )
{
}
/*************************************************************************/
-KDockWidgetHeader::KDockWidgetHeader( KDockWidget* tqparent, const char* name )
-:KDockWidgetAbstractHeader( tqparent, name )
+KDockWidgetHeader::KDockWidgetHeader( KDockWidget* parent, const char* name )
+:KDockWidgetAbstractHeader( parent, name )
{
#ifdef BORDERLESS_WINDOWS
setCursor(TQCursor(ArrowCursor));
@@ -224,14 +224,14 @@ KDockWidgetHeader::KDockWidgetHeader( KDockWidget* tqparent, const char* name )
tqlayout = new TQHBoxLayout( this );
tqlayout->setResizeMode( TQLayout::Minimum );
- drag = new KDockWidgetHeaderDrag( this, tqparent );
+ drag = new KDockWidgetHeaderDrag( this, parent );
closeButton = new KDockButton_Private( this, "DockCloseButton" );
TQToolTip::add( closeButton, i18n("Close") );
closeButton->setPixmap( tqstyle().stylePixmap (TQStyle::SP_TitleBarCloseButton , this));
closeButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
- connect( closeButton, TQT_SIGNAL(clicked()), tqparent, TQT_SIGNAL(headerCloseButtonClicked()));
- connect( closeButton, TQT_SIGNAL(clicked()), tqparent, TQT_SLOT(undock()));
+ connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerCloseButtonClicked()));
+ connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(undock()));
stayButton = new KDockButton_Private( this, "DockStayButton" );
TQToolTip::add( stayButton, i18n("Freeze the window tqgeometry", "Freeze") );
@@ -244,14 +244,14 @@ KDockWidgetHeader::KDockWidgetHeader( KDockWidget* tqparent, const char* name )
TQToolTip::add( dockbackButton, i18n("Dock this window", "Dock") );
dockbackButton->setPixmap( const_cast< const char** >(dockback_xpm));
dockbackButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
- connect( dockbackButton, TQT_SIGNAL(clicked()), tqparent, TQT_SIGNAL(headerDockbackButtonClicked()));
- connect( dockbackButton, TQT_SIGNAL(clicked()), tqparent, TQT_SLOT(dockBack()));
+ connect( dockbackButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerDockbackButtonClicked()));
+ connect( dockbackButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(dockBack()));
d->toDesktopButton = new KDockButton_Private( this, "ToDesktopButton" );
TQToolTip::add( d->toDesktopButton, i18n("Detach") );
d->toDesktopButton->setPixmap( const_cast< const char** >(todesktop_xpm));
d->toDesktopButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
- connect( d->toDesktopButton, TQT_SIGNAL(clicked()), tqparent, TQT_SLOT(toDesktop()));
+ connect( d->toDesktopButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(toDesktop()));
stayButton->hide();
d->dummy = new TQWidget( this );
@@ -273,7 +273,7 @@ void KDockWidgetHeader::setTopLevel( bool isTopLevel )
{
d->topLevel = isTopLevel;
if ( isTopLevel ){
- KDockWidget* par = (KDockWidget*)tqparent();
+ KDockWidget* par = (KDockWidget*)parent();
if( par) {
if( par->isDockBackPossible())
dockbackButton->show();
@@ -425,12 +425,12 @@ void KDockWidgetHeader::setDragEnabled(bool b)
#ifndef NO_KDE2
void KDockWidgetHeader::saveConfig( KConfig* c )
{
- c->writeEntry( TQString("%1%2").tqarg(tqparent()->name()).tqarg(":stayButton"), stayButton->isOn() );
+ c->writeEntry( TQString("%1%2").tqarg(parent()->name()).tqarg(":stayButton"), stayButton->isOn() );
}
void KDockWidgetHeader::loadConfig( KConfig* c )
{
- setDragEnabled( !c->readBoolEntry( TQString("%1%2").tqarg(tqparent()->name()).tqarg(":stayButton"), false ) );
+ setDragEnabled( !c->readBoolEntry( TQString("%1%2").tqarg(parent()->name()).tqarg(":stayButton"), false ) );
}
#endif
@@ -479,11 +479,11 @@ public:
/*************************************************************************/
-KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const TQPixmap &pixmap, TQWidget* tqparent, const TQString& strCaption, const TQString& strTabPageLabel, WFlags f)
+KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel, WFlags f)
#ifdef BORDERLESS_WINDOWS
-: TQWidget( tqparent, name, f )//| WType_Dialog | WStyle_Customize | WStyle_NoBorder )
+: TQWidget( parent, name, f )//| WType_Dialog | WStyle_Customize | WStyle_NoBorder )
#else
-: TQWidget( tqparent, name, f )
+: TQWidget( parent, name, f )
#endif
,formerBrotherDockWidget(0L)
,currentDockPos(DockNone)
@@ -495,7 +495,7 @@ KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const TQP
{
d = new KDockWidgetPrivate(); // create private data
- d->_parent = tqparent;
+ d->_parent = parent;
tqlayout = new TQVBoxLayout( this );
tqlayout->setResizeMode( TQLayout::Minimum );
@@ -526,7 +526,7 @@ KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const TQP
widget = 0L;
TQObject::connect(this, TQT_SIGNAL(hasUndocked()), manager->main, TQT_SLOT(slotDockWidgetUndocked()) );
- applyToWidget( tqparent, TQPoint(0,0) );
+ applyToWidget( parent, TQPoint(0,0) );
}
void KDockWidget::setPixmap(const TQPixmap& pixmap) {
@@ -585,7 +585,7 @@ void KDockWidget::leaveEvent(TQEvent *e)
{
TQWidget::leaveEvent(e);
#ifdef BORDERLESS_WINDOWS
- if (tqparent()) return;
+ if (parent()) return;
// setCursor(TQCursor(ArrowCursor));
#endif
}
@@ -593,7 +593,7 @@ void KDockWidget::leaveEvent(TQEvent *e)
void KDockWidget::mousePressEvent(TQMouseEvent* mme)
{
#ifdef BORDERLESS_WINDOWS
- if (!tqparent())
+ if (!parent())
{
kdDebug(282)<<"KDockWidget::mousePressEvent"<<endl;
@@ -663,7 +663,7 @@ void KDockWidget::mouseMoveEvent(TQMouseEvent* mme)
{
TQWidget::mouseMoveEvent(mme);
#ifdef BORDERLESS_WINDOWS
- if (tqparent()) return;
+ if (parent()) return;
if (d->resizing)
{
@@ -772,14 +772,14 @@ void KDockWidget::setEnableDocking( int pos )
void KDockWidget::updateHeader()
{
- if ( tqparent() ){
+ if ( parent() ){
#ifdef BORDERLESS_WINDOWS
tqlayout->setMargin(0);
setMouseTracking(false);
setCursor(TQCursor(ArrowCursor));
#endif
- if ( (TQT_BASE_OBJECT(tqparent()) == TQT_BASE_OBJECT(manager->main)) || isGroup || (eDocking == KDockWidget::DockNone) ){
+ if ( (TQT_BASE_OBJECT(parent()) == TQT_BASE_OBJECT(manager->main)) || isGroup || (eDocking == KDockWidget::DockNone) ){
header->hide();
} else {
header->setTopLevel( false );
@@ -800,7 +800,7 @@ void KDockWidget::updateHeader()
void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p )
{
- if ( TQT_BASE_OBJECT(tqparent()) != TQT_BASE_OBJECT(s) )
+ if ( TQT_BASE_OBJECT(parent()) != TQT_BASE_OBJECT(s) )
{
hide();
reparent(s, 0, TQPoint(0,0), false);
@@ -840,11 +840,11 @@ void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p )
void KDockWidget::show()
{
- if ( tqparent() || manager->main->isVisible() )
- if ( !tqparent() ){
+ if ( parent() || manager->main->isVisible() )
+ if ( !parent() ){
emit manager->setDockDefaultPos( this );
emit setDockDefaultPos();
- if ( tqparent() ){
+ if ( parent() ){
makeDockVisible();
} else {
TQWidget::show();
@@ -864,9 +864,9 @@ void KDockWidget::setDockWindowType (NET::WindowType windowType)
#endif
-void KDockWidget::setDockWindowTransient (TQWidget *tqparent, bool transientEnabled)
+void KDockWidget::setDockWindowTransient (TQWidget *parent, bool transientEnabled)
{
- d->_parent = tqparent;
+ d->_parent = parent;
d->transient = transientEnabled;
applyToWidget( parentWidget(), TQPoint(0,0) );
}
@@ -900,8 +900,8 @@ bool KDockWidget::event( TQEvent *event )
break;
case TQEvent::CaptionChange:
if ( parentWidget() ){
- if ( tqparent()->inherits("KDockSplitter") ){
- ((KDockSplitter*)(tqparent()))->updateName();
+ if ( parent()->inherits("KDockSplitter") ){
+ ((KDockSplitter*)(parent()))->updateName();
}
if ( parentDockTabGroup() ){
setDockTabName( parentDockTabGroup() );
@@ -920,18 +920,18 @@ bool KDockWidget::event( TQEvent *event )
KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos)
{
- if (!tqparent()) return 0;
- if (!tqparent()->inherits("KDockSplitter")) return 0;
+ if (!parent()) return 0;
+ if (!parent()->inherits("KDockSplitter")) return 0;
Qt::Orientation orientation=((pos==DockLeft) || (pos==DockRight)) ?Qt::Vertical:Qt::Horizontal;
- if (((KDockSplitter*)(tqparent()))->orientation()==orientation)
+ if (((KDockSplitter*)(parent()))->orientation()==orientation)
{
KDockWidget *neighbor=
((pos==DockLeft)||(pos==DockTop))?
- static_cast<KDockWidget*>(((KDockSplitter*)(tqparent()))->getFirst()):
- static_cast<KDockWidget*>(((KDockSplitter*)(tqparent()))->getLast());
+ static_cast<KDockWidget*>(((KDockSplitter*)(parent()))->getFirst()):
+ static_cast<KDockWidget*>(((KDockSplitter*)(parent()))->getLast());
if (neighbor==this)
- return (static_cast<KDockWidget*>(TQT_TQWIDGET(tqparent()->tqparent()))->findNearestDockWidget(pos));
+ return (static_cast<KDockWidget*>(TQT_TQWIDGET(parent()->parent()))->findNearestDockWidget(pos));
else
if (neighbor->getWidget() && (neighbor->getWidget()->qt_cast("KDockTabGroup")))
return (KDockWidget*)(((KDockTabGroup*)neighbor->getWidget())->page(0));
@@ -939,7 +939,7 @@ KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos)
return neighbor;
}
else
- return (static_cast<KDockWidget*>(TQT_TQWIDGET(tqparent()->tqparent()))->findNearestDockWidget(pos));
+ return (static_cast<KDockWidget*>(TQT_TQWIDGET(parent()->parent()))->findNearestDockWidget(pos));
return 0;
}
@@ -983,10 +983,10 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
// kdDebug(282)<<"KDockWidget::manualDock(): success = false (2)"<<endl;
}
- if ( tqparent() && !tqparent()->inherits("KDockSplitter") && !parentDockTabGroup() &&
- !(dynamic_cast<KDockContainer*>(tqparent())) && !parentDockContainer()){
+ if ( parent() && !parent()->inherits("KDockSplitter") && !parentDockTabGroup() &&
+ !(dynamic_cast<KDockContainer*>(parent())) && !parentDockContainer()){
// kdDebug(282)<<"KDockWidget::manualDock(): success = false (3)"<<endl;
-// kdDebug(282)<<tqparent()->name()<<endl;
+// kdDebug(282)<<parent()->name()<<endl;
succes = false;
}
@@ -1037,7 +1037,7 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
currentDockPos = KDockWidget::DockCenter;
emit manager->change();
- return (KDockWidget*)parentTab->tqparent();
+ return (KDockWidget*)parentTab->parent();
}
else
{
@@ -1199,7 +1199,7 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
KDockTabGroup* KDockWidget::parentDockTabGroup() const
{
- if ( !tqparent() ) return 0L;
+ if ( !parent() ) return 0L;
TQWidget* candidate = parentWidget()->parentWidget();
if ( candidate && candidate->inherits("KDockTabGroup") ) return (KDockTabGroup*)candidate;
return 0L;
@@ -1207,7 +1207,7 @@ KDockTabGroup* KDockWidget::parentDockTabGroup() const
TQWidget *KDockWidget::parentDockContainer() const
{
- if (!tqparent()) return 0L;
+ if (!parent()) return 0L;
TQWidget* candidate = parentWidget()->parentWidget();
if (candidate && dynamic_cast<KDockContainer*>(candidate)) return candidate;
return 0L;
@@ -1218,18 +1218,18 @@ void KDockWidget::setForcedFixedWidth(int w)
{
d->forcedWidth=w;
setFixedWidth(w);
- if (!tqparent()) return;
- if (tqparent()->inherits("KDockSplitter"))
- static_cast<KDockSplitter*>(tqparent()->qt_cast("KDockSplitter"))->setForcedFixedWidth(this,w);
+ if (!parent()) return;
+ if (parent()->inherits("KDockSplitter"))
+ static_cast<KDockSplitter*>(parent()->qt_cast("KDockSplitter"))->setForcedFixedWidth(this,w);
}
void KDockWidget::setForcedFixedHeight(int h)
{
d->forcedHeight=h;
setFixedHeight(h);
- if (!tqparent()) return;
- if (tqparent()->inherits("KDockSplitter"))
- static_cast<KDockSplitter*>(tqparent()->qt_cast("KDockSplitter"))->setForcedFixedHeight(this,h);
+ if (!parent()) return;
+ if (parent()->inherits("KDockSplitter"))
+ static_cast<KDockSplitter*>(parent()->qt_cast("KDockSplitter"))->setForcedFixedHeight(this,h);
}
int KDockWidget::forcedFixedWidth()
@@ -1249,9 +1249,9 @@ void KDockWidget::restoreFromForcedFixedSize()
setMaximumWidth(32000);
setMinimumHeight(0);
setMaximumHeight(32000);
- if (!tqparent()) return;
- if (tqparent()->inherits("KDockSplitter"))
- static_cast<KDockSplitter*>(tqparent()->qt_cast("KDockSplitter"))->restoreFromForcedFixedSize(this);
+ if (!parent()) return;
+ if (parent()->inherits("KDockSplitter"))
+ static_cast<KDockSplitter*>(parent()->qt_cast("KDockSplitter"))->restoreFromForcedFixedSize(this);
}
void KDockWidget::toDesktop()
@@ -1314,8 +1314,8 @@ void KDockWidget::undock()
lastTab->applyToWidget( 0L );
lastTab->move( parentTab->mapToGlobal(parentTab->frameGeometry().topLeft()) );
- // KDockTabGroup always have a tqparent that is a KDockWidget
- KDockWidget* parentOfTab = (KDockWidget*)parentTab->tqparent();
+ // KDockTabGroup always have a parent that is a KDockWidget
+ KDockWidget* parentOfTab = (KDockWidget*)parentTab->parent();
delete parentTab; // KDockTabGroup
TQWidget* parentOfDockWidget = parentOfTab->parentWidget();
@@ -1328,13 +1328,13 @@ void KDockWidget::undock()
split->deactivate();
if ( split->getFirst() == parentOfTab ){
split->activate( lastTab );
- if ( ((KDockWidget*)split->tqparent())->splitterOrientation ==Qt::Vertical )
+ if ( ((KDockWidget*)split->parent())->splitterOrientation ==Qt::Vertical )
emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockLeft );
else
emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockTop );
} else {
split->activate( 0L, lastTab );
- if ( ((KDockWidget*)split->tqparent())->splitterOrientation ==Qt::Vertical )
+ if ( ((KDockWidget*)split->parent())->splitterOrientation ==Qt::Vertical )
emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockRight );
else
emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockBottom );
@@ -1357,7 +1357,7 @@ void KDockWidget::undock()
}
} else {
/*********************************************************************************************/
- //TQWidget* containerWidget = (TQWidget*)tqparent();
+ //TQWidget* containerWidget = (TQWidget*)parent();
bool undockedFromContainer=false;
if (d->container)
{
@@ -1430,7 +1430,7 @@ void KDockWidget::setWidget( TQWidget* mw )
{
if ( !mw ) return;
- if ( TQT_BASE_OBJECT(mw->tqparent()) != TQT_BASE_OBJECT(this) ){
+ if ( TQT_BASE_OBJECT(mw->parent()) != TQT_BASE_OBJECT(this) ){
mw->reparent(this, 0, TQPoint(0,0), false);
}
@@ -1479,20 +1479,20 @@ void KDockWidget::setDockTabName( KDockTabGroup* tab )
tab->parentWidget()->setCaption( listOfCaption );
tab->parentWidget()->tqrepaint( false ); // KDockWidget->tqrepaint
- if ( tab->parentWidget()->tqparent() )
- if ( tab->parentWidget()->tqparent()->inherits("KDockSplitter") )
- ((KDockSplitter*)(tab->parentWidget()->tqparent()))->updateName();
+ if ( tab->parentWidget()->parent() )
+ if ( tab->parentWidget()->parent()->inherits("KDockSplitter") )
+ ((KDockSplitter*)(tab->parentWidget()->parent()))->updateName();
}
bool KDockWidget::mayBeHide() const
{
- bool f = (TQT_BASE_OBJECT(tqparent()) != TQT_BASE_OBJECT(manager->main));
+ bool f = (TQT_BASE_OBJECT(parent()) != TQT_BASE_OBJECT(manager->main));
return ( !isGroup && !isTabGroup && f && isVisible() && ( eDocking != (int)KDockWidget::DockNone ) );
}
bool KDockWidget::mayBeShow() const
{
- bool f = (TQT_BASE_OBJECT(tqparent()) != TQT_BASE_OBJECT(manager->main));
+ bool f = (TQT_BASE_OBJECT(parent()) != TQT_BASE_OBJECT(manager->main));
return ( !isGroup && !isTabGroup && f && !isVisible() );
}
@@ -1532,7 +1532,7 @@ void KDockWidget::makeDockVisible()
p->show();
p = p->parentWidget();
}
- if( !tqparent() ) // is undocked
+ if( !parent() ) // is undocked
dockBack();
show();
}
@@ -1582,7 +1582,7 @@ void KDockWidget::dockBack()
// else dockback to the dockmainwindow (default behavior)
manualDock( ((KDockMainWindow*)manager->main)->getMainDockWidget(), formerDockPos, d->splitPosInPercent, TQPoint(0,0), false, d->index);
formerBrotherDockWidget = 0L;
- if (tqparent())
+ if (parent())
makeDockVisible();
}
@@ -1753,7 +1753,7 @@ bool KDockManager::eventFilter( TQObject *obj, TQEvent *event )
#ifdef BORDERLESS_WINDOWS
//BEGIN TEST
KDockWidget *oldMoveWidget;
- if (!curdw->tqparent())
+ if (!curdw->parent())
{
curdw->move(TQCursor::pos()-d->dragOffset);
pDockWdgAtCursor = findDockWidgetAt( TQCursor::pos()-TQPoint(0,d->dragOffset.y()+3) );
@@ -2019,7 +2019,7 @@ void KDockManager::drop()
drawDragRectangle(); // only the old rect will be deleted
return;
}
- if ( !currentMoveWidget && !currentDragWidget->tqparent() ) {
+ if ( !currentMoveWidget && !currentDragWidget->parent() ) {
currentDragWidget->move( TQCursor::pos() - d->dragOffset );
}
else {
@@ -2159,7 +2159,7 @@ void KDockManager::writeConfig(TQDomElement &base)
TQObjectListIt it(*childDock);
KDockWidget *obj1;
while ( (obj1=(KDockWidget*)it.current()) ) {
- if ( TQT_BASE_OBJECT(obj1->tqparent()) == TQT_BASE_OBJECT(main) )
+ if ( TQT_BASE_OBJECT(obj1->parent()) == TQT_BASE_OBJECT(main) )
mainWidgetStr = TQString::tqfromLatin1(obj1->name());
nList.append(obj1->name());
++it;
@@ -2210,7 +2210,7 @@ void KDockManager::writeConfig(TQDomElement &base)
list.append( ((KDockTabGroup*)obj->widget)->page( i )->name() );
groupEl.appendChild(createListEntry(doc, "tabs", "tab", list));
groupEl.appendChild(createNumberEntry(doc, "currentTab", ((KDockTabGroup*)obj->widget)->currentPageIndex()));
- if (!obj->tqparent()) {
+ if (!obj->parent()) {
groupEl.appendChild(createStringEntry(doc, "dockBackTo", obj->formerBrotherDockWidget ? obj->formerBrotherDockWidget->name() : ""));
groupEl.appendChild(createNumberEntry(doc, "dockBackToPos", obj->formerDockPos));
}
@@ -2219,15 +2219,15 @@ void KDockManager::writeConfig(TQDomElement &base)
groupEl = doc.createElement("dock");
groupEl.appendChild(createStringEntry(doc, "tabCaption", obj->tabPageLabel()));
groupEl.appendChild(createStringEntry(doc, "tabToolTip", obj->toolTipString()));
- if (!obj->tqparent()) {
+ if (!obj->parent()) {
groupEl.appendChild(createStringEntry(doc, "dockBackTo", obj->formerBrotherDockWidget ? obj->formerBrotherDockWidget->name() : ""));
groupEl.appendChild(createNumberEntry(doc, "dockBackToPos", obj->formerDockPos));
}
}
groupEl.appendChild(createStringEntry(doc, "name", TQString::tqfromLatin1(obj->name())));
- groupEl.appendChild(createBoolEntry(doc, "hasParent", obj->tqparent()));
- if ( !obj->tqparent() ) {
+ groupEl.appendChild(createBoolEntry(doc, "hasParent", obj->parent()));
+ if ( !obj->parent() ) {
groupEl.appendChild(createRectEntry(doc, "geometry", TQRect(main->frameGeometry().topLeft(), main->size())));
groupEl.appendChild(createBoolEntry(doc, "visible", obj->isVisible()));
}
@@ -2276,7 +2276,7 @@ void KDockManager::readConfig(TQDomElement &base)
KDockWidget *obj1;
while ( (obj1=(KDockWidget*)it.current()) ) {
if ( !obj1->isGroup && !obj1->isTabGroup ) {
- if ( obj1->tqparent() )
+ if ( obj1->parent() )
obj1->undock();
else
obj1->hide();
@@ -2494,7 +2494,7 @@ void KDockManager::writeConfig( KConfig* c, TQString group )
++it;
//debug(" +Add subdock %s", obj->name());
nList.append( obj->name() );
- if ( TQT_BASE_OBJECT(obj->tqparent()) == TQT_BASE_OBJECT(main) )
+ if ( TQT_BASE_OBJECT(obj->parent()) == TQT_BASE_OBJECT(main) )
c->writeEntry( "Main:view", obj->name() );
}
@@ -2527,12 +2527,12 @@ void KDockManager::writeConfig( KConfig* c, TQString group )
if ( (findList.find( obj->firstName ) != findList.end()) && (findList.find( obj->lastName ) != findList.end() )){
c->writeEntry( cname+":type", "GROUP");
- if ( !obj->tqparent() ){
- c->writeEntry( cname+":tqparent", "___null___");
+ if ( !obj->parent() ){
+ c->writeEntry( cname+":parent", "___null___");
c->writeEntry( cname+":tqgeometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) );
c->writeEntry( cname+":visible", obj->isVisible());
} else {
- c->writeEntry( cname+":tqparent", "yes");
+ c->writeEntry( cname+":parent", "yes");
}
c->writeEntry( cname+":first_name", obj->firstName );
c->writeEntry( cname+":last_name", obj->lastName );
@@ -2559,14 +2559,14 @@ void KDockManager::writeConfig( KConfig* c, TQString group )
/*************************************************************************************************/
if ( obj->isTabGroup){
c->writeEntry( cname+":type", "TAB_GROUP");
- if ( !obj->tqparent() ){
- c->writeEntry( cname+":tqparent", "___null___");
+ if ( !obj->parent() ){
+ c->writeEntry( cname+":parent", "___null___");
c->writeEntry( cname+":tqgeometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) );
c->writeEntry( cname+":visible", obj->isVisible());
c->writeEntry( cname+":dockBackTo", obj->formerBrotherDockWidget ? obj->formerBrotherDockWidget->name() : "");
c->writeEntry( cname+":dockBackToPos", obj->formerDockPos);
} else {
- c->writeEntry( cname+":tqparent", "yes");
+ c->writeEntry( cname+":parent", "yes");
}
TQStrList list;
for ( int i = 0; i < ((KDockTabGroup*)obj->widget)->count(); ++i )
@@ -2583,7 +2583,7 @@ void KDockManager::writeConfig( KConfig* c, TQString group )
/*************************************************************************************************/
c->writeEntry( cname+":tabCaption", obj->tabPageLabel());
c->writeEntry( cname+":tabToolTip", obj->toolTipString());
- if ( !obj->tqparent() ){
+ if ( !obj->parent() ){
c->writeEntry( cname+":type", "NULL_DOCK");
c->writeEntry( cname+":tqgeometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) );
c->writeEntry( cname+":visible", obj->isVisible());
@@ -2646,7 +2646,7 @@ void KDockManager::readConfig( KConfig* c, TQString group )
++it;
if ( !obj->isGroup && !obj->isTabGroup )
{
- if ( obj->tqparent() ) obj->undock(); else obj->hide();
+ if ( obj->parent() ) obj->undock(); else obj->hide();
}
}
@@ -2659,7 +2659,7 @@ void KDockManager::readConfig( KConfig* c, TQString group )
TQString type = c->readEntry( oname + ":type" );
obj = 0L;
- if ( type == "NULL_DOCK" || c->readEntry( oname + ":tqparent") == "___null___" ){
+ if ( type == "NULL_DOCK" || c->readEntry( oname + ":parent") == "___null___" ){
TQRect r = c->readRectEntry( oname + ":tqgeometry" );
obj = getDockWidgetFromName( oname );
obj->applyToWidget( 0L );
@@ -2753,7 +2753,7 @@ void KDockManager::readConfig( KConfig* c, TQString group )
TQString type = c->readEntry( oname + ":type" );
obj = 0L;
- if ( type == "NULL_DOCK" || c->readEntry( oname + ":tqparent") == "___null___" ){
+ if ( type == "NULL_DOCK" || c->readEntry( oname + ":parent") == "___null___" ){
obj = getDockWidgetFromName( oname );
c->setGroup( group );
TQString name = c->readEntry( oname + ":dockBackTo" );
@@ -2986,8 +2986,8 @@ void KDockManager::setSpecialBottomDockContainer(KDockWidget* container) {
}
-KDockArea::KDockArea( TQWidget* tqparent, const char *name)
-:TQWidget( tqparent, name)
+KDockArea::KDockArea( TQWidget* parent, const char *name)
+:TQWidget( parent, name)
{
TQString new_name = TQString(name) + TQString("_DockManager");
dockManager = new KDockManager( this, new_name.latin1() );
@@ -2999,9 +2999,9 @@ KDockArea::~KDockArea()
delete dockManager;
}
-KDockWidget* KDockArea::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* tqparent, const TQString& strCaption, const TQString& strTabPageLabel)
+KDockWidget* KDockArea::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel)
{
- return new KDockWidget( dockManager, name.latin1(), pixmap, tqparent, strCaption, strTabPageLabel );
+ return new KDockWidget( dockManager, name.latin1(), pixmap, parent, strCaption, strTabPageLabel );
}
void KDockArea::makeDockVisible( KDockWidget* dock )
@@ -3119,10 +3119,10 @@ void KDockContainer::activateOverlapMode(int nonOverlapSize) {
m_nonOverlapSize=nonOverlapSize;
m_overlapMode=true;
if (parentDockWidget()) {
- if (parentDockWidget()->tqparent()) {
+ if (parentDockWidget()->parent()) {
kdDebug(282)<<"KDockContainer::activateOverlapMode: recalculating sizes"<<endl;
KDockSplitter *sp= static_cast<KDockSplitter*>(parentDockWidget()->
- tqparent()->qt_cast("KDockSplitter"));
+ parent()->qt_cast("KDockSplitter"));
if (sp) sp->resizeEvent(0);
}
}
@@ -3132,10 +3132,10 @@ void KDockContainer::deactivateOverlapMode() {
if (!m_overlapMode) return;
m_overlapMode=false;
if (parentDockWidget()) {
- if (parentDockWidget()->tqparent()) {
+ if (parentDockWidget()->parent()) {
kdDebug(282)<<"KDockContainer::deactivateOverlapMode: recalculating sizes"<<endl;
KDockSplitter *sp= static_cast<KDockSplitter*>(parentDockWidget()->
- tqparent()->qt_cast("KDockSplitter"));
+ parent()->qt_cast("KDockSplitter"));
if (sp) sp->resizeEvent(0);
}
}