diff options
Diffstat (limited to 'kdeui/kdockwidget.cpp')
-rw-r--r-- | kdeui/kdockwidget.cpp | 272 |
1 files changed, 136 insertions, 136 deletions
diff --git a/kdeui/kdockwidget.cpp b/kdeui/kdockwidget.cpp index dc5213c3c..b7d124f43 100644 --- a/kdeui/kdockwidget.cpp +++ b/kdeui/kdockwidget.cpp @@ -151,7 +151,7 @@ void KDockMainWindow::makeDockInvisible( KDockWidget* dock ) void KDockMainWindow::makeWidgetDockVisible( TQWidget* widget ) { - makeDockVisible( dockManager->findWidgetParentDock(widget) ); + makeDockVisible( dockManager->tqfindWidgetParentDock(widget) ); } void KDockMainWindow::writeDockConfig(TQDomElement &base) @@ -203,7 +203,7 @@ void KDockWidgetHeaderDrag::paintEvent( TQPaintEvent* ) paint.begin( this ); - style().drawPrimitive (TQStyle::PE_DockWindowHandle, &paint, TQRect(0,0,width(), height()), colorGroup()); + style().drawPrimitive (TQStyle::PE_DockWindowHandle, &paint, TQRect(0,0,width(), height()), tqcolorGroup()); paint.end(); } @@ -221,8 +221,8 @@ KDockWidgetHeader::KDockWidgetHeader( KDockWidget* parent, const char* name ) #endif d = new KDockWidgetHeaderPrivate( this ); - layout = new TQHBoxLayout( this ); - layout->setResizeMode( TQLayout::Minimum ); + tqlayout = new TQHBoxLayout( this ); + tqlayout->setResizeMode( TQLayout::Minimum ); drag = new KDockWidgetHeaderDrag( this, parent ); @@ -234,7 +234,7 @@ KDockWidgetHeader::KDockWidgetHeader( KDockWidget* parent, const char* name ) connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(undock())); stayButton = new KDockButton_Private( this, "DockStayButton" ); - TQToolTip::add( stayButton, i18n("Freeze the window geometry", "Freeze") ); + TQToolTip::add( stayButton, i18n("Freeze the window tqgeometry", "Freeze") ); stayButton->setToggleButton( true ); stayButton->setPixmap( const_cast< const char** >(not_close_xpm) ); stayButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height()); @@ -258,15 +258,15 @@ KDockWidgetHeader::KDockWidgetHeader( KDockWidget* parent, const char* name ) d->dummy->setFixedSize( 1,closeButton->pixmap()->height() ); - layout->addWidget( drag ); - layout->addWidget( dockbackButton ); - layout->addWidget( d->toDesktopButton ); - layout->addWidget( d->dummy); - layout->addWidget( stayButton ); - layout->addWidget( closeButton ); - layout->activate(); + tqlayout->addWidget( drag ); + tqlayout->addWidget( dockbackButton ); + tqlayout->addWidget( d->toDesktopButton ); + tqlayout->addWidget( d->dummy); + tqlayout->addWidget( stayButton ); + tqlayout->addWidget( closeButton ); + tqlayout->activate(); d->dummy->hide(); - drag->setFixedHeight( layout->minimumSize().height() ); + drag->setFixedHeight( tqlayout->tqminimumSize().height() ); } void KDockWidgetHeader::setTopLevel( bool isTopLevel ) @@ -290,7 +290,7 @@ void KDockWidgetHeader::setTopLevel( bool isTopLevel ) if( d->showToDesktopButton ) d->toDesktopButton->show(); } - layout->activate(); + tqlayout->activate(); bool dontShowDummy=drag->isVisibleTo(this) || dockbackButton->isVisibleTo(this) || d->toDesktopButton->isVisibleTo(this) || stayButton->isVisibleTo(this) || @@ -317,73 +317,73 @@ void KDockWidgetHeader::setDragPanel( KDockWidgetHeaderDrag* nd ) { if ( !nd ) return; - delete layout; - layout = new TQHBoxLayout( this ); - layout->setResizeMode( TQLayout::Minimum ); + delete tqlayout; + tqlayout = new TQHBoxLayout( this ); + tqlayout->setResizeMode( TQLayout::Minimum ); delete drag; drag = nd; - if (drag->parentWidget()!=this) { + if (drag->tqparentWidget()!=this) { drag->reparent(this,TQPoint(0,0)); } - layout->addWidget( drag ); - layout->addWidget( dockbackButton ); - layout->addWidget( d->dummy ); - layout->addWidget( d->toDesktopButton ); - layout->addWidget( stayButton ); + tqlayout->addWidget( drag ); + tqlayout->addWidget( dockbackButton ); + tqlayout->addWidget( d->dummy ); + tqlayout->addWidget( d->toDesktopButton ); + tqlayout->addWidget( stayButton ); bool dontShowDummy=drag->isVisibleTo(this) || dockbackButton->isVisibleTo(this) || d->toDesktopButton->isVisibleTo(this) || stayButton->isVisibleTo(this) || closeButton->isVisibleTo(this); for (TQPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) { - layout->addWidget(it.current()); + tqlayout->addWidget(it.current()); dontShowDummy=dontShowDummy || (it.current()->isVisibleTo(this)); } if (dontShowDummy) d->dummy->hide(); else d->dummy->show(); - layout->addWidget( closeButton ); - layout->activate(); - kdDebug(282)<<"KdockWidgetHeader::setDragPanel:minimum height="<<layout->minimumSize().height()<<endl; + tqlayout->addWidget( closeButton ); + tqlayout->activate(); + kdDebug(282)<<"KdockWidgetHeader::setDragPanel:minimum height="<<tqlayout->tqminimumSize().height()<<endl; //FIXME somebody left this here, but we don't know what the hell it's for. - drag->setFixedHeight( closeButton->height()); // /*layout->minimumS*/sizeHint().height() ); + drag->setFixedHeight( closeButton->height()); // /*tqlayout->minimumS*/tqsizeHint().height() ); } void KDockWidgetHeader::addButton(KDockButton_Private* btn) { if (!btn) return; - if (btn->parentWidget()!=this) { + if (btn->tqparentWidget()!=this) { btn->reparent(this,TQPoint(0,0)); } btn->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height()); - if (!d->btns.containsRef(btn)) d->btns.append(btn); + if (!d->btns.tqcontainsRef(btn)) d->btns.append(btn); btn->show(); - delete layout; - layout = new TQHBoxLayout( this ); - layout->setResizeMode( TQLayout::Minimum ); + delete tqlayout; + tqlayout = new TQHBoxLayout( this ); + tqlayout->setResizeMode( TQLayout::Minimum ); - layout->addWidget( drag ); - layout->addWidget( dockbackButton ); - layout->addWidget( d->toDesktopButton ); - layout->addWidget( d->dummy); - layout->addWidget( stayButton ); + tqlayout->addWidget( drag ); + tqlayout->addWidget( dockbackButton ); + tqlayout->addWidget( d->toDesktopButton ); + tqlayout->addWidget( d->dummy); + tqlayout->addWidget( stayButton ); bool dontShowDummy=drag->isVisibleTo(this) || dockbackButton->isVisibleTo(this) || d->toDesktopButton->isVisibleTo(this) || stayButton->isVisibleTo(this) || closeButton->isVisibleTo(this); for (TQPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) { - layout->addWidget(it.current()); + tqlayout->addWidget(it.current()); dontShowDummy=dontShowDummy || (it.current()->isVisibleTo(this)); } if (dontShowDummy) d->dummy->hide(); else d->dummy->show(); - layout->addWidget( closeButton ); - layout->activate(); - drag->setFixedHeight( layout->minimumSize().height() ); + tqlayout->addWidget( closeButton ); + tqlayout->activate(); + drag->setFixedHeight( tqlayout->tqminimumSize().height() ); } void KDockWidgetHeader::removeButton(KDockButton_Private* btn) { - if (btn->parentWidget()==this) { - if (d->btns.containsRef(btn)) d->btns.removeRef(btn); + if (btn->tqparentWidget()==this) { + if (d->btns.tqcontainsRef(btn)) d->btns.removeRef(btn); delete btn; } } @@ -494,8 +494,8 @@ KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const TQP d->_parent = parent; - layout = new TQVBoxLayout( this ); - layout->setResizeMode( TQLayout::Minimum ); + tqlayout = new TQVBoxLayout( this ); + tqlayout->setResizeMode( TQLayout::Minimum ); manager = dockManager; manager->childDock->append( this ); @@ -574,7 +574,7 @@ void KDockWidget::paintEvent(TQPaintEvent* pe) TQWidget::paintEvent(pe); TQPainter paint; paint.begin( this ); - style().drawPrimitive (TQStyle::PE_Panel, &paint, TQRect(0,0,width(), height()), colorGroup()); + style().drawPrimitive (TQStyle::PE_Panel, &paint, TQRect(0,0,width(), height()), tqcolorGroup()); paint.end(); } @@ -601,7 +601,7 @@ void KDockWidget::mousePressEvent(TQMouseEvent* mme) int styleheight; TQPoint mp; mp=mme->pos(); - styleheight=2*style().pixelMetric(TQStyle::PM_DefaultFrameWidth,this); + styleheight=2*style().tqpixelMetric(TQStyle::PM_DefaultFrameWidth,this); bbottom=mp.y()>=height()-styleheight; btop=mp.y()<=styleheight; bleft=mp.x()<=styleheight; @@ -689,7 +689,7 @@ void KDockWidget::mouseMoveEvent(TQMouseEvent* mme) int styleheight; TQPoint mp; mp=mme->pos(); - styleheight=2*style().pixelMetric(TQStyle::PM_DefaultFrameWidth,this); + styleheight=2*style().tqpixelMetric(TQStyle::PM_DefaultFrameWidth,this); bbottom=mp.y()>=height()-styleheight; btop=mp.y()<=styleheight; bleft=mp.x()<=styleheight; @@ -745,15 +745,15 @@ void KDockWidget::setHeader( KDockWidgetAbstractHeader* h ) if ( header ){ delete header; - delete layout; + delete tqlayout; header = h; - layout = new TQVBoxLayout( this ); - layout->setResizeMode( TQLayout::Minimum ); - layout->addWidget( header ); + tqlayout = new TQVBoxLayout( this ); + tqlayout->setResizeMode( TQLayout::Minimum ); + tqlayout->addWidget( header ); setWidget( widget ); } else { header = h; - layout->addWidget( header ); + tqlayout->addWidget( header ); } kdDebug(282)<<caption()<<": KDockWidget::setHeader"<<endl; setEnableDocking(eDocking); @@ -773,7 +773,7 @@ void KDockWidget::updateHeader() { if ( parent() ){ #ifdef BORDERLESS_WINDOWS - layout->setMargin(0); + tqlayout->setMargin(0); setMouseTracking(false); setCursor(TQCursor(ArrowCursor)); #endif @@ -791,7 +791,7 @@ void KDockWidget::updateHeader() header->setTopLevel( true ); header->show(); #ifdef BORDERLESS_WINDOWS - layout->setMargin(2*style().pixelMetric(TQStyle::PM_DefaultFrameWidth,this)); + tqlayout->setMargin(2*style().tqpixelMetric(TQStyle::PM_DefaultFrameWidth,this)); setMouseTracking(true); #endif } @@ -810,7 +810,7 @@ void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p ) } if ( manager && s == manager->main ){ - setGeometry( TQRect(TQPoint(0,0), manager->main->geometry().size()) ); + setGeometry( TQRect(TQPoint(0,0), manager->main->tqgeometry().size()) ); } if ( !s ) @@ -858,7 +858,7 @@ void KDockWidget::show() void KDockWidget::setDockWindowType (NET::WindowType windowType) { d->windowType = windowType; - applyToWidget( parentWidget(), TQPoint(0,0) ); + applyToWidget( tqparentWidget(), TQPoint(0,0) ); } #endif @@ -867,7 +867,7 @@ void KDockWidget::setDockWindowTransient (TQWidget *parent, bool transientEnable { d->_parent = parent; d->transient = transientEnabled; - applyToWidget( parentWidget(), TQPoint(0,0) ); + applyToWidget( tqparentWidget(), TQPoint(0,0) ); } TQWidget *KDockWidget::transientTo() { @@ -898,7 +898,7 @@ bool KDockWidget::event( TQEvent *event ) emit manager->change(); break; case TQEvent::CaptionChange: - if ( parentWidget() ){ + if ( tqparentWidget() ){ if ( parent()->inherits("KDockSplitter") ){ ((KDockSplitter*)(parent()))->updateName(); } @@ -917,7 +917,7 @@ bool KDockWidget::event( TQEvent *event ) return TQWidget::event( event ); } -KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos) +KDockWidget *KDockWidget::tqfindNearestDockWidget(DockPosition pos) { if (!parent()) return 0; if (!parent()->inherits("KDockSplitter")) return 0; @@ -930,7 +930,7 @@ KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos) static_cast<KDockWidget*>(((KDockSplitter*)(parent()))->getLast()); if (neighbor==this) - return (static_cast<KDockWidget*>(parent()->parent())->findNearestDockWidget(pos)); + return (static_cast<KDockWidget*>(parent()->parent())->tqfindNearestDockWidget(pos)); else if (neighbor->getWidget() && (neighbor->getWidget()->qt_cast("KDockTabGroup"))) return (KDockWidget*)(((KDockTabGroup*)neighbor->getWidget())->page(0)); @@ -938,7 +938,7 @@ KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos) return neighbor; } else - return (static_cast<KDockWidget*>(parent()->parent())->findNearestDockWidget(pos)); + return (static_cast<KDockWidget*>(parent()->parent())->tqfindNearestDockWidget(pos)); return 0; } @@ -1091,7 +1091,7 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, } // create a new dockwidget that will contain the target and this - TQWidget* parentDock = target->parentWidget(); + TQWidget* parentDock = target->tqparentWidget(); KDockWidget* newDock = new KDockWidget( manager, "tempName", TQPixmap(""), parentDock ); newDock->currentDockPos = target->currentDockPos; @@ -1107,7 +1107,7 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, if ( !parentDock ){ // dock to a toplevel dockwidget means newDock is toplevel now newDock->move( target->frameGeometry().topLeft() ); - newDock->resize( target->geometry().size() ); + newDock->resize( target->tqgeometry().size() ); if ( target->isVisibleToTLW() ) newDock->show(); } @@ -1142,7 +1142,7 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, tab->insertTab( this, icon() ? *icon() : TQPixmap(), tabPageLabel(), tabIndex ); - TQRect geom=newDock->geometry(); + TQRect geom=newDock->tqgeometry(); TQWidget *wantTransient=tab->transientTo(); newDock->setDockWindowTransient(wantTransient,wantTransient); newDock->setGeometry(geom); @@ -1209,7 +1209,7 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, newDock->show(); emit target->docking( this, dockPos ); - emit manager->replaceDock( target, newDock ); + emit manager->tqreplaceDock( target, newDock ); emit manager->change(); return newDock; @@ -1218,7 +1218,7 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, KDockTabGroup* KDockWidget::parentDockTabGroup() const { if ( !parent() ) return 0L; - TQWidget* candidate = parentWidget()->parentWidget(); + TQWidget* candidate = tqparentWidget()->tqparentWidget(); if ( candidate && candidate->inherits("KDockTabGroup") ) return (KDockTabGroup*)candidate; return 0L; } @@ -1226,7 +1226,7 @@ KDockTabGroup* KDockWidget::parentDockTabGroup() const TQWidget *KDockWidget::parentDockContainer() const { if (!parent()) return 0L; - TQWidget* candidate = parentWidget()->parentWidget(); + TQWidget* candidate = tqparentWidget()->tqparentWidget(); if (candidate && dynamic_cast<KDockContainer*>(candidate)) return candidate; return 0L; } @@ -1295,7 +1295,7 @@ void KDockWidget::undock() manager->d->dragRect = TQRect (); manager->drawDragRectangle (); - TQWidget* parentW = parentWidget(); + TQWidget* parentW = tqparentWidget(); if ( !parentW ){ hide(); if (!d->blockHasUndockedSignal) @@ -1337,7 +1337,7 @@ void KDockWidget::undock() KDockWidget* parentOfTab = (KDockWidget*)parentTab->parent(); delete parentTab; // KDockTabGroup - TQWidget* parentOfDockWidget = parentOfTab->parentWidget(); + TQWidget* parentOfDockWidget = parentOfTab->tqparentWidget(); if ( !parentOfDockWidget ){ if ( isV ) lastTab->show(); } else { @@ -1365,7 +1365,7 @@ void KDockWidget::undock() lastTab->show(); } manager->blockSignals(false); - emit manager->replaceDock( parentOfTab, lastTab ); + emit manager->tqreplaceDock( parentOfTab, lastTab ); lastTab->currentDockPos = parentOfTab->currentDockPos; emit parentOfTab->iMBeingClosed(); manager->blockSignals(true); @@ -1396,16 +1396,16 @@ void KDockWidget::undock() d->splitPosInPercent = parentSplitterOfDockWidget->separatorPosInPercent(); KDockWidget* secondWidget = (KDockWidget*)parentSplitterOfDockWidget->getAnother( this ); - KDockWidget* group = (KDockWidget*)parentSplitterOfDockWidget->parentWidget(); + KDockWidget* group = (KDockWidget*)parentSplitterOfDockWidget->tqparentWidget(); setFormerBrotherDockWidget(secondWidget); applyToWidget( 0L ); group->hide(); - if ( !group->parentWidget() ){ + if ( !group->tqparentWidget() ){ secondWidget->applyToWidget( 0L, group->frameGeometry().topLeft() ); secondWidget->resize( group->width(), group->height() ); } else { - TQWidget* obj = group->parentWidget(); + TQWidget* obj = group->tqparentWidget(); secondWidget->applyToWidget( obj ); if ( obj->inherits("KDockSplitter") ){ KDockSplitter* parentOfGroup = (KDockSplitter*)obj; @@ -1421,7 +1421,7 @@ void KDockWidget::undock() secondWidget->formerDockPos = group->formerDockPos; delete parentSplitterOfDockWidget; manager->blockSignals(false); - emit manager->replaceDock( group, secondWidget ); + emit manager->tqreplaceDock( group, secondWidget ); emit group->iMBeingClosed(); manager->blockSignals(true); delete group; @@ -1457,10 +1457,10 @@ void KDockWidget::setWidget( TQWidget* mw ) if (!mw->ownCursor()) mw->setCursor(TQCursor(ArrowCursor)); #endif widget = mw; - delete layout; + delete tqlayout; - layout = new TQVBoxLayout( this ); - layout->setResizeMode( TQLayout::Minimum ); + tqlayout = new TQVBoxLayout( this ); + tqlayout->setResizeMode( TQLayout::Minimum ); KDockContainer* dc = dynamic_cast<KDockContainer*>(widget); if (dc) @@ -1475,8 +1475,8 @@ void KDockWidget::setWidget( TQWidget* mw ) { header->show(); - layout->addWidget( header ); - layout->addWidget( widget,1 ); + tqlayout->addWidget( header ); + tqlayout->addWidget( widget,1 ); } updateHeader(); emit widgetSet(mw); @@ -1494,13 +1494,13 @@ void KDockWidget::setDockTabName( KDockTabGroup* tab ) listOfCaption.remove( listOfCaption.length()-1, 1 ); listOfName.remove( listOfName.length()-1, 1 ); - tab->parentWidget()->setName( listOfName.utf8() ); - tab->parentWidget()->setCaption( listOfCaption ); + tab->tqparentWidget()->setName( listOfName.utf8() ); + tab->tqparentWidget()->setCaption( listOfCaption ); - tab->parentWidget()->repaint( false ); // KDockWidget->repaint - if ( tab->parentWidget()->parent() ) - if ( tab->parentWidget()->parent()->inherits("KDockSplitter") ) - ((KDockSplitter*)(tab->parentWidget()->parent()))->updateName(); + tab->tqparentWidget()->tqrepaint( false ); // KDockWidget->tqrepaint + if ( tab->tqparentWidget()->parent() ) + if ( tab->tqparentWidget()->parent()->inherits("KDockSplitter") ) + ((KDockSplitter*)(tab->tqparentWidget()->parent()))->updateName(); } bool KDockWidget::mayBeHide() const @@ -1545,11 +1545,11 @@ void KDockWidget::makeDockVisible() } if ( isVisible() ) return; - TQWidget* p = parentWidget(); + TQWidget* p = tqparentWidget(); while ( p ){ if ( !p->isVisible() ) p->show(); - p = p->parentWidget(); + p = p->tqparentWidget(); } if( !parent() ) // is undocked dockBack(); @@ -1570,7 +1570,7 @@ void KDockWidget::loseFormerBrotherDockWidget() TQObject::disconnect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()), this, TQT_SLOT(loseFormerBrotherDockWidget()) ); formerBrotherDockWidget = 0L; - repaint(); + tqrepaint(); } void KDockWidget::dockBack() @@ -1723,16 +1723,16 @@ bool KDockManager::eventFilter( TQObject *obj, TQEvent *event ) if ( curdw->eDocking != (int)KDockWidget::DockNone ){ dropCancel = true; curdw->setFocus(); - qApp->processOneEvent(); + tqApp->processOneEvent(); currentDragWidget = curdw; currentMoveWidget = 0L; childDockWidgetList = new TQWidgetList(); childDockWidgetList->append( curdw ); - findChildDockWidget( curdw, childDockWidgetList ); + tqfindChildDockWidget( curdw, childDockWidgetList ); //d->oldDragRect = TQRect(); should fix rectangle not erased problem - d->dragRect = TQRect(curdw->geometry()); + d->dragRect = TQRect(curdw->tqgeometry()); TQPoint p = curdw->mapToGlobal(TQPoint(0,0)); d->dragRect.moveTopLeft(p); drawDragRectangle(); @@ -1754,7 +1754,7 @@ bool KDockManager::eventFilter( TQObject *obj, TQEvent *event ) if (d->readyToDrag) { d->readyToDrag = false; //d->oldDragRect = TQRect(); should fix rectangle not erased problem - d->dragRect = TQRect(curdw->geometry()); + d->dragRect = TQRect(curdw->tqgeometry()); TQPoint p = curdw->mapToGlobal(TQPoint(0,0)); d->dragRect.moveTopLeft(p); drawDragRectangle(); @@ -1775,17 +1775,17 @@ bool KDockManager::eventFilter( TQObject *obj, TQEvent *event ) if (!curdw->parent()) { curdw->move(TQCursor::pos()-d->dragOffset); - pDockWdgAtCursor = findDockWidgetAt( TQCursor::pos()-TQPoint(0,d->dragOffset.y()+3) ); + pDockWdgAtCursor = tqfindDockWidgetAt( TQCursor::pos()-TQPoint(0,d->dragOffset.y()+3) ); oldMoveWidget = currentMoveWidget; } else { - pDockWdgAtCursor = findDockWidgetAt( TQCursor::pos() ); + pDockWdgAtCursor = tqfindDockWidgetAt( TQCursor::pos() ); oldMoveWidget = currentMoveWidget; } //END TEST #else - pDockWdgAtCursor = findDockWidgetAt( TQCursor::pos() ); + pDockWdgAtCursor = tqfindDockWidgetAt( TQCursor::pos() ); KDockWidget* oldMoveWidget = currentMoveWidget; #endif @@ -1794,7 +1794,7 @@ bool KDockManager::eventFilter( TQObject *obj, TQEvent *event ) break; } else { if (dropCancel && curdw) { - d->dragRect = TQRect(curdw->geometry()); + d->dragRect = TQRect(curdw->tqgeometry()); TQPoint p = curdw->mapToGlobal(TQPoint(0,0)); d->dragRect.moveTopLeft(p); }else @@ -1835,7 +1835,7 @@ bool KDockManager::eventFilter( TQObject *obj, TQEvent *event ) return TQObject::eventFilter( obj, event ); } -KDockWidget* KDockManager::findDockWidgetAt( const TQPoint& pos ) +KDockWidget* KDockManager::tqfindDockWidgetAt( const TQPoint& pos ) { dropCancel = true; @@ -1850,10 +1850,10 @@ KDockWidget* KDockManager::findDockWidgetAt( const TQPoint& pos ) return 0L; } #if defined(_OS_WIN32_) || defined(Q_OS_WIN32) - p = p->topLevelWidget(); + p = p->tqtopLevelWidget(); #endif TQWidget* w = 0L; - findChildDockWidget( w, p, p->mapFromGlobal(pos) ); + tqfindChildDockWidget( w, p, p->mapFromGlobal(pos) ); if ( !w ){ if ( !p->inherits("KDockWidget") ) { return 0L; @@ -1865,7 +1865,7 @@ KDockWidget* KDockManager::findDockWidgetAt( const TQPoint& pos ) if (dynamic_cast<KDockContainer*>(w)) return 0L; if (!childDockWidgetList) return 0L; - if ( childDockWidgetList->find(w) != -1 ) return 0L; + if ( childDockWidgetList->tqfind(w) != -1 ) return 0L; if ( currentDragWidget->isGroup && ((KDockWidget*)w)->parentDockTabGroup() ) return 0L; KDockWidget* www = (KDockWidget*)w; @@ -1901,7 +1901,7 @@ KDockWidget* KDockManager::findDockWidgetAt( const TQPoint& pos ) return www; } -void KDockManager::findChildDockWidget( TQWidget*& ww, const TQWidget* p, const TQPoint& pos ) +void KDockManager::tqfindChildDockWidget( TQWidget*& ww, const TQWidget* p, const TQPoint& pos ) { if ( p->children() ) { TQWidget *w; @@ -1910,9 +1910,9 @@ void KDockManager::findChildDockWidget( TQWidget*& ww, const TQWidget* p, const while ( it.current() ) { if ( it.current()->isWidgetType() ) { w = (TQWidget*)it.current(); - if ( w->isVisible() && w->geometry().contains(pos) ) { + if ( w->isVisible() && w->tqgeometry().tqcontains(pos) ) { if ( w->inherits("KDockWidget") ) ww = w; - findChildDockWidget( ww, w, w->mapFromParent(pos) ); + tqfindChildDockWidget( ww, w, w->mapFromParent(pos) ); return; } } @@ -1922,7 +1922,7 @@ void KDockManager::findChildDockWidget( TQWidget*& ww, const TQWidget* p, const return; } -void KDockManager::findChildDockWidget( const TQWidget* p, TQWidgetList*& list ) +void KDockManager::tqfindChildDockWidget( const TQWidget* p, TQWidgetList*& list ) { if ( p->children() ) { TQWidget *w; @@ -1933,7 +1933,7 @@ void KDockManager::findChildDockWidget( const TQWidget* p, TQWidgetList*& list ) w = (TQWidget*)it.current(); if ( w->isVisible() ) { if ( w->inherits("KDockWidget") ) list->append( w ); - findChildDockWidget( w, list ); + tqfindChildDockWidget( w, list ); } } --it; @@ -1948,8 +1948,8 @@ void KDockManager::startDrag( KDockWidget* w ) || ( w->currentDockPos == KDockWidget::DockTop) || ( w->currentDockPos == KDockWidget::DockBottom)) { w->prevSideDockPosBeforeDrag = w->currentDockPos; - if ( w->parentWidget()->inherits("KDockSplitter") ){ - KDockSplitter* parentSplitterOfDockWidget = (KDockSplitter*)(w->parentWidget()); + if ( w->tqparentWidget()->inherits("KDockSplitter") ){ + KDockSplitter* parentSplitterOfDockWidget = (KDockSplitter*)(w->tqparentWidget()); w->d->splitPosInPercent = parentSplitterOfDockWidget->separatorPosInPercent(); } } @@ -2105,7 +2105,7 @@ static TQDomElement createStringEntry(TQDomDocument &doc, const TQString &tagNam static TQDomElement createBoolEntry(TQDomDocument &doc, const TQString &tagName, bool b) { - return createStringEntry(doc, tagName, TQString::fromLatin1(b? "true" : "false")); + return createStringEntry(doc, tagName, TQString::tqfromLatin1(b? "true" : "false")); } @@ -2144,7 +2144,7 @@ static TQDomElement createListEntry(TQDomDocument &doc, const TQString &tagName, TQStrListIterator it(list); for (; it.current(); ++it) { TQDomElement subel = doc.createElement(subTagName); - subel.appendChild(doc.createTextNode(TQString::fromLatin1(it.current()))); + subel.appendChild(doc.createTextNode(TQString::tqfromLatin1(it.current()))); el.appendChild(subel); } @@ -2214,7 +2214,7 @@ void KDockManager::writeConfig(TQDomElement &base) KDockWidget *obj1; while ( (obj1=(KDockWidget*)it.current()) ) { if ( obj1->parent() == main ) - mainWidgetStr = TQString::fromLatin1(obj1->name()); + mainWidgetStr = TQString::tqfromLatin1(obj1->name()); nList.append(obj1->name()); ++it; } @@ -2230,8 +2230,8 @@ void KDockManager::writeConfig(TQDomElement &base) TQStringList::Iterator nListIt=nList.begin(); while ( nListIt!=nList.end() ) { KDockWidget *obj = getDockWidgetFromName( *nListIt); - if ((obj->isGroup && (!obj->d->isContainer)) && (nameList.find( obj->firstName.latin1() ) == -1 - || nameList.find(obj->lastName.latin1()) == -1)) { + if ((obj->isGroup && (!obj->d->isContainer)) && (nameList.tqfind( obj->firstName.latin1() ) == -1 + || nameList.tqfind(obj->lastName.latin1()) == -1)) { // Skip until children are saved (why?) ++nListIt; // nList.next(); @@ -2279,10 +2279,10 @@ void KDockManager::writeConfig(TQDomElement &base) } } - groupEl.appendChild(createStringEntry(doc, "name", TQString::fromLatin1(obj->name()))); + groupEl.appendChild(createStringEntry(doc, "name", TQString::tqfromLatin1(obj->name()))); groupEl.appendChild(createBoolEntry(doc, "hasParent", obj->parent())); if ( !obj->parent() ) { - groupEl.appendChild(createRectEntry(doc, "geometry", TQRect(main->frameGeometry().topLeft(), main->size()))); + groupEl.appendChild(createRectEntry(doc, "tqgeometry", TQRect(main->frameGeometry().topLeft(), main->size()))); groupEl.appendChild(createBoolEntry(doc, "visible", obj->isVisible())); } if (obj->header && obj->header->inherits("KDockWidgetHeader")) { @@ -2306,7 +2306,7 @@ void KDockManager::writeConfig(TQDomElement &base) base.appendChild(createStringEntry(doc, "mainWidget", mainWidgetStr)); } - base.appendChild(createRectEntry(doc, "geometry", TQRect(main->frameGeometry().topLeft(), main->size()))); + base.appendChild(createRectEntry(doc, "tqgeometry", TQRect(main->frameGeometry().topLeft(), main->size()))); } @@ -2350,7 +2350,7 @@ void KDockManager::readConfig(TQDomElement &base) obj->setToolTipString(stringEntry(childEl, "tabToolTip")); if (!boolEntry(childEl, "hasParent")) { - TQRect r = rectEntry(childEl, "geometry"); + TQRect r = rectEntry(childEl, "tqgeometry"); obj = getDockWidgetFromName(stringEntry(childEl, "name")); obj->applyToWidget(0); obj->setGeometry(r); @@ -2434,7 +2434,7 @@ void KDockManager::readConfig(TQDomElement &base) } if (!boolEntry(childEl, "hasParent")) { - TQRect r = rectEntry(childEl, "geometry"); + TQRect r = rectEntry(childEl, "tqgeometry"); obj = getDockWidgetFromName(stringEntry(childEl, "name")); obj->applyToWidget(0); obj->setGeometry(r); @@ -2495,7 +2495,7 @@ void KDockManager::readConfig(TQDomElement &base) } // only resize + move non-mainwindows - TQRect mr = rectEntry(base, "geometry"); + TQRect mr = rectEntry(base, "tqgeometry"); main->move(mr.topLeft()); main->resize(mr.size()); } @@ -2538,7 +2538,7 @@ void KDockManager::writeConfig( KConfig* c, TQString group ) c->writeEntry( "Version", DOCK_CONFIG_VERSION ); TQStringList nameList; - TQStringList findList; + TQStringList tqfindList; TQObjectListIt it( *childDock ); KDockWidget * obj; @@ -2578,12 +2578,12 @@ void KDockManager::writeConfig( KConfig* c, TQString group ) } /*************************************************************************************************/ if ( obj->isGroup ){ - if ( (findList.find( obj->firstName ) != findList.end()) && (findList.find( obj->lastName ) != findList.end() )){ + if ( (tqfindList.tqfind( obj->firstName ) != tqfindList.end()) && (tqfindList.tqfind( obj->lastName ) != tqfindList.end() )){ c->writeEntry( cname+":type", "GROUP"); if ( !obj->parent() ){ c->writeEntry( cname+":parent", "___null___"); - c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); + c->writeEntry( cname+":tqgeometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); c->writeEntry( cname+":visible", obj->isVisible()); } else { c->writeEntry( cname+":parent", "yes"); @@ -2594,16 +2594,16 @@ void KDockManager::writeConfig( KConfig* c, TQString group ) c->writeEntry( cname+":sepPos", ((KDockSplitter*)obj->widget)->separatorPosInPercent() ); nameList.append( obj->name() ); - findList.append( obj->name() ); + tqfindList.append( obj->name() ); //debug(" Save %s", nList.current()); nList.remove(nListIt); nListIt=nList.begin(); //nList.first(); } else { /*************************************************************************************************/ //debug(" Skip %s", nList.current()); - //if ( findList.find( obj->firstName ) == -1 ) + //if ( tqfindList.tqfind( obj->firstName ) == -1 ) // debug(" ? Not found %s", obj->firstName); - //if ( findList.find( obj->lastName ) == -1 ) + //if ( tqfindList.tqfind( obj->lastName ) == -1 ) // debug(" ? Not found %s", obj->lastName); ++nListIt; // if ( !nList.current() ) nList.first(); @@ -2615,7 +2615,7 @@ void KDockManager::writeConfig( KConfig* c, TQString group ) c->writeEntry( cname+":type", "TAB_GROUP"); if ( !obj->parent() ){ c->writeEntry( cname+":parent", "___null___"); - c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); + 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); @@ -2629,7 +2629,7 @@ void KDockManager::writeConfig( KConfig* c, TQString group ) c->writeEntry( cname+":curTab", ((KDockTabGroup*)obj->widget)->currentPageIndex() ); nameList.append( obj->name() ); - findList.append( obj->name() ); // not really need !!! + tqfindList.append( obj->name() ); // not really need !!! //debug(" Save %s", nList.current()); nList.remove(nListIt); nListIt=nList.begin(); @@ -2639,7 +2639,7 @@ void KDockManager::writeConfig( KConfig* c, TQString group ) c->writeEntry( cname+":tabToolTip", obj->toolTipString()); if ( !obj->parent() ){ c->writeEntry( cname+":type", "NULL_DOCK"); - c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); + 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); @@ -2648,7 +2648,7 @@ void KDockManager::writeConfig( KConfig* c, TQString group ) } nameList.append( cname.latin1() ); //debug(" Save %s", nList.current()); - findList.append( obj->name() ); + tqfindList.append( obj->name() ); nList.remove(nListIt); nListIt=nList.begin(); } @@ -2714,7 +2714,7 @@ void KDockManager::readConfig( KConfig* c, TQString group ) obj = 0L; if ( type == "NULL_DOCK" || c->readEntry( oname + ":parent") == "___null___" ){ - TQRect r = c->readRectEntry( oname + ":geometry" ); + TQRect r = c->readRectEntry( oname + ":tqgeometry" ); obj = getDockWidgetFromName( oname ); obj->applyToWidget( 0L ); obj->setGeometry(r); @@ -2954,7 +2954,7 @@ void KDockManager::slotMenuActivated( int id ) data->dock->changeHideShowState(); } -KDockWidget* KDockManager::findWidgetParentDock( TQWidget* w ) const +KDockWidget* KDockManager::tqfindWidgetParentDock( TQWidget* w ) const { TQObjectListIt it( *childDock ); KDockWidget * dock; @@ -2994,14 +2994,14 @@ void KDockManager::drawDragRectangle() KDockMainWindow* pMain = 0L; KDockWidget* pTLDockWdg = 0L; TQWidget* topWdg; - if (pDockWdgAtRect->topLevelWidget() == main) { + if (pDockWdgAtRect->tqtopLevelWidget() == main) { isOverMainWdg = true; topWdg = pMain = (KDockMainWindow*) main; unclipped = pMain->testWFlags( WPaintUnclipped ); pMain->setWFlags( WPaintUnclipped ); } else { - topWdg = pTLDockWdg = (KDockWidget*) pDockWdgAtRect->topLevelWidget(); + topWdg = pTLDockWdg = (KDockWidget*) pDockWdgAtRect->tqtopLevelWidget(); unclipped = pTLDockWdg->testWFlags( WPaintUnclipped ); pTLDockWdg->setWFlags( WPaintUnclipped ); } @@ -3077,7 +3077,7 @@ void KDockArea::makeDockInvisible( KDockWidget* dock ) void KDockArea::makeWidgetDockVisible( TQWidget* widget ) { - makeDockVisible( dockManager->findWidgetParentDock(widget) ); + makeDockVisible( dockManager->tqfindWidgetParentDock(widget) ); } void KDockArea::writeDockConfig(TQDomElement &base) @@ -3326,6 +3326,6 @@ void KDockArea::virtual_hook( int, void* ) { /*KMainWindow::virtual_hook( id, data );*/ } -#ifndef NO_INCLUDE_MOCFILES // for Qt-only projects, because tmake doesn't take this name +#ifndef NO_INCLUDE_TQMOCFILES // for Qt-only projects, because tmake doesn't take this name #include "kdockwidget.moc" #endif |