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.cpp210
1 files changed, 105 insertions, 105 deletions
diff --git a/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp b/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp
index fdb463dc..38af2a94 100644
--- a/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp
+++ b/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp
@@ -324,7 +324,7 @@ void KDockWidgetHeader::setDragPanel( KDockWidgetHeaderDrag* nd )
delete drag;
drag = nd;
- if (drag->tqparentWidget()!=this) {
+ if (drag->parentWidget()!=this) {
drag->reparent(this,TQPoint(0,0));
}
@@ -354,7 +354,7 @@ void KDockWidgetHeader::setDragPanel( KDockWidgetHeaderDrag* nd )
void KDockWidgetHeader::addButton(KDockButton_Private* btn) {
if (!btn) return;
- if (btn->tqparentWidget()!=this) {
+ if (btn->parentWidget()!=this) {
btn->reparent(this,TQPoint(0,0));
}
btn->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
@@ -385,7 +385,7 @@ void KDockWidgetHeader::addButton(KDockButton_Private* btn) {
}
void KDockWidgetHeader::removeButton(KDockButton_Private* btn) {
- if (btn->tqparentWidget()==this) {
+ if (btn->parentWidget()==this) {
if (d->btns.tqcontainsRef(btn)) d->btns.removeRef(btn);
delete btn;
}
@@ -533,10 +533,10 @@ void KDockWidget::setPixmap(const TQPixmap& pixmap) {
delete pix;
pix=new TQPixmap(pixmap);
setIcon(*pix);
- KDockTabGroup *dtg=tqparentDockTabGroup();
+ KDockTabGroup *dtg=parentDockTabGroup();
if (dtg)
dtg->changeTab(this,pixmap,dtg->tabLabel(this));
- TQWidget *contWid=tqparentDockContainer();
+ TQWidget *contWid=parentDockContainer();
if (contWid) {
KDockContainer *x = dynamic_cast<KDockContainer*>(contWid);
if (x) {
@@ -859,7 +859,7 @@ void KDockWidget::show()
void KDockWidget::setDockWindowType (NET::WindowType windowType)
{
d->windowType = windowType;
- applyToWidget( tqparentWidget(), TQPoint(0,0) );
+ applyToWidget( parentWidget(), TQPoint(0,0) );
}
#endif
@@ -868,7 +868,7 @@ void KDockWidget::setDockWindowTransient (TQWidget *tqparent, bool transientEnab
{
d->_parent = tqparent;
d->transient = transientEnabled;
- applyToWidget( tqparentWidget(), TQPoint(0,0) );
+ applyToWidget( parentWidget(), TQPoint(0,0) );
}
TQWidget *KDockWidget::transientTo() {
@@ -899,13 +899,13 @@ bool KDockWidget::event( TQEvent *event )
emit manager->change();
break;
case TQEvent::CaptionChange:
- if ( tqparentWidget() ){
+ if ( parentWidget() ){
if ( tqparent()->inherits("KDockSplitter") ){
((KDockSplitter*)(tqparent()))->updateName();
}
- if ( tqparentDockTabGroup() ){
- setDockTabName( tqparentDockTabGroup() );
- tqparentDockTabGroup()->setTabLabel( this, tabPageLabel() );
+ if ( parentDockTabGroup() ){
+ setDockTabName( parentDockTabGroup() );
+ parentDockTabGroup()->setTabLabel( this, tabPageLabel() );
}
}
break;
@@ -983,8 +983,8 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
// kdDebug(282)<<"KDockWidget::manualDock(): success = false (2)"<<endl;
}
- if ( tqparent() && !tqparent()->inherits("KDockSplitter") && !tqparentDockTabGroup() &&
- !(dynamic_cast<KDockContainer*>(tqparent())) && !tqparentDockContainer()){
+ if ( tqparent() && !tqparent()->inherits("KDockSplitter") && !parentDockTabGroup() &&
+ !(dynamic_cast<KDockContainer*>(tqparent())) && !parentDockContainer()){
// kdDebug(282)<<"KDockWidget::manualDock(): success = false (3)"<<endl;
// kdDebug(282)<<tqparent()->name()<<endl;
succes = false;
@@ -1021,28 +1021,28 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
}
// kdDebug(282)<<"Looking for KDockTabGroup"<<endl;
- KDockTabGroup* tqparentTab = target->tqparentDockTabGroup();
- if ( tqparentTab ){
+ KDockTabGroup* parentTab = target->parentDockTabGroup();
+ if ( parentTab ){
// add to existing TabGroup
- applyToWidget( tqparentTab );
- tqparentTab->insertTab( this, icon() ? *icon() : TQPixmap(),
+ applyToWidget( parentTab );
+ parentTab->insertTab( this, icon() ? *icon() : TQPixmap(),
tabPageLabel(), tabIndex );
- TQWidget *wantTransient=tqparentTab->transientTo();
+ TQWidget *wantTransient=parentTab->transientTo();
target->setDockWindowTransient(wantTransient,wantTransient);
- setDockTabName( tqparentTab );
+ setDockTabName( parentTab );
if( !toolTipStr.isEmpty())
- tqparentTab->setTabToolTip( this, toolTipStr);
+ parentTab->setTabToolTip( this, toolTipStr);
currentDockPos = KDockWidget::DockCenter;
emit manager->change();
- return (KDockWidget*)tqparentTab->tqparent();
+ return (KDockWidget*)parentTab->tqparent();
}
else
{
// kdDebug(282)<<"Looking for KDockContainer"<<endl;
- TQWidget *contWid=target->tqparentDockContainer();
+ TQWidget *contWid=target->parentDockContainer();
if (!contWid) contWid=target->widget;
if (contWid)
{
@@ -1060,21 +1060,21 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
cont->insertWidget( this, icon() ? *icon() : TQPixmap(),
tabPageLabel(), tabIndex );
setLatestKDockContainer(contWid);
-// setDockTabName( tqparentTab );
+// setDockTabName( parentTab );
if( !toolTipStr.isEmpty())
cont->setToolTip( this, toolTipStr);
currentDockPos = KDockWidget::DockCenter;
emit manager->change();
- return (KDockWidget*)(cont->tqparentDockWidget());
+ return (KDockWidget*)(cont->parentDockWidget());
}
}
}
// create a new dockwidget that will contain the target and this
- TQWidget* tqparentDock = target->tqparentWidget();
- KDockWidget* newDock = new KDockWidget( manager, "tempName", TQPixmap(TQString("")), tqparentDock );
+ TQWidget* parentDock = target->parentWidget();
+ KDockWidget* newDock = new KDockWidget( manager, "tempName", TQPixmap(TQString("")), parentDock );
newDock->currentDockPos = target->currentDockPos;
if ( dockPos == KDockWidget::DockCenter ){
@@ -1084,9 +1084,9 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
}
newDock->eDocking = (target->eDocking & eDocking) & (~(int)KDockWidget::DockCenter);
- newDock->applyToWidget( tqparentDock );
+ newDock->applyToWidget( parentDock );
- if ( !tqparentDock ){
+ if ( !parentDock ){
// dock to a toplevel dockwidget means newDock is toplevel now
newDock->move( target->frameGeometry().topLeft() );
newDock->resize( target->tqgeometry().size() );
@@ -1178,9 +1178,9 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
panner->show();
}
- if ( tqparentDock ){
- if ( tqparentDock->inherits("KDockSplitter") ){
- KDockSplitter* sp = (KDockSplitter*)tqparentDock;
+ if ( parentDock ){
+ if ( parentDock->inherits("KDockSplitter") ){
+ KDockSplitter* sp = (KDockSplitter*)parentDock;
sp->deactivate();
if ( sp->getFirst() == target )
sp->activate( newDock, 0L );
@@ -1197,18 +1197,18 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
return newDock;
}
-KDockTabGroup* KDockWidget::tqparentDockTabGroup() const
+KDockTabGroup* KDockWidget::parentDockTabGroup() const
{
if ( !tqparent() ) return 0L;
- TQWidget* candidate = tqparentWidget()->tqparentWidget();
+ TQWidget* candidate = parentWidget()->parentWidget();
if ( candidate && candidate->inherits("KDockTabGroup") ) return (KDockTabGroup*)candidate;
return 0L;
}
-TQWidget *KDockWidget::tqparentDockContainer() const
+TQWidget *KDockWidget::parentDockContainer() const
{
if (!tqparent()) return 0L;
- TQWidget* candidate = tqparentWidget()->tqparentWidget();
+ TQWidget* candidate = parentWidget()->parentWidget();
if (candidate && dynamic_cast<KDockContainer*>(candidate)) return candidate;
return 0L;
}
@@ -1276,8 +1276,8 @@ void KDockWidget::undock()
manager->d->dragRect = TQRect ();
manager->drawDragRectangle ();
- TQWidget* tqparentW = tqparentWidget();
- if ( !tqparentW ){
+ TQWidget* parentW = parentWidget();
+ if ( !parentW ){
hide();
if (!d->blockHasUndockedSignal)
emit hasUndocked();
@@ -1290,70 +1290,70 @@ void KDockWidget::undock()
manager->blockSignals(true);
manager->undockProcess = true;
- bool isV = tqparentW->isVisibleToTLW();
+ bool isV = parentW->isVisibleToTLW();
//UNDOCK HAS TO BE IMPLEMENTED CORRECTLY :)
- KDockTabGroup* tqparentTab = tqparentDockTabGroup();
- if ( tqparentTab ){
- d->index = tqparentTab->indexOf( this); // memorize the page position in the tab widget
- tqparentTab->removePage( this );
+ KDockTabGroup* parentTab = parentDockTabGroup();
+ if ( parentTab ){
+ d->index = parentTab->indexOf( this); // memorize the page position in the tab widget
+ parentTab->removePage( this );
/*
- TQWidget *wantTransient=tqparentTab->transientTo();
+ TQWidget *wantTransient=parentTab->transientTo();
target->setDockWindowTransient(wantTransient,wantTransient);
*/
- setFormerBrotherDockWidget((KDockWidget*)tqparentTab->page(0));
+ setFormerBrotherDockWidget((KDockWidget*)parentTab->page(0));
applyToWidget( 0L );
- if ( tqparentTab->count() == 1 ){
+ if ( parentTab->count() == 1 ){
// last subdock widget in the tab control
- KDockWidget* lastTab = (KDockWidget*)tqparentTab->page(0);
- tqparentTab->removePage( lastTab );
-/* TQWidget *wantTransient=tqparentTab->transientTo();
+ KDockWidget* lastTab = (KDockWidget*)parentTab->page(0);
+ parentTab->removePage( lastTab );
+/* TQWidget *wantTransient=parentTab->transientTo();
target->setDockWindowTransient(wantTransient,wantTransient);*/
lastTab->applyToWidget( 0L );
- lastTab->move( tqparentTab->mapToGlobal(tqparentTab->frameGeometry().topLeft()) );
+ lastTab->move( parentTab->mapToGlobal(parentTab->frameGeometry().topLeft()) );
// KDockTabGroup always have a tqparent that is a KDockWidget
- KDockWidget* tqparentOfTab = (KDockWidget*)tqparentTab->tqparent();
- delete tqparentTab; // KDockTabGroup
+ KDockWidget* parentOfTab = (KDockWidget*)parentTab->tqparent();
+ delete parentTab; // KDockTabGroup
- TQWidget* tqparentOfDockWidget = tqparentOfTab->tqparentWidget();
- if ( !tqparentOfDockWidget ){
+ TQWidget* parentOfDockWidget = parentOfTab->parentWidget();
+ if ( !parentOfDockWidget ){
if ( isV ) lastTab->show();
} else {
- if ( tqparentOfDockWidget->inherits("KDockSplitter") ){
- KDockSplitter* split = (KDockSplitter*)tqparentOfDockWidget;
+ if ( parentOfDockWidget->inherits("KDockSplitter") ){
+ KDockSplitter* split = (KDockSplitter*)parentOfDockWidget;
lastTab->applyToWidget( split );
split->deactivate();
- if ( split->getFirst() == tqparentOfTab ){
+ if ( split->getFirst() == parentOfTab ){
split->activate( lastTab );
if ( ((KDockWidget*)split->tqparent())->splitterOrientation ==Qt::Vertical )
- emit ((KDockWidget*)split->getAnother(tqparentOfTab))->docking( tqparentOfTab, KDockWidget::DockLeft );
+ emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockLeft );
else
- emit ((KDockWidget*)split->getAnother(tqparentOfTab))->docking( tqparentOfTab, KDockWidget::DockTop );
+ emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockTop );
} else {
split->activate( 0L, lastTab );
if ( ((KDockWidget*)split->tqparent())->splitterOrientation ==Qt::Vertical )
- emit ((KDockWidget*)split->getAnother(tqparentOfTab))->docking( tqparentOfTab, KDockWidget::DockRight );
+ emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockRight );
else
- emit ((KDockWidget*)split->getAnother(tqparentOfTab))->docking( tqparentOfTab, KDockWidget::DockBottom );
+ emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockBottom );
}
split->show();
} else {
- lastTab->applyToWidget( tqparentOfDockWidget );
+ lastTab->applyToWidget( parentOfDockWidget );
}
lastTab->show();
}
manager->blockSignals(false);
- emit manager->replaceDock( tqparentOfTab, lastTab );
- lastTab->currentDockPos = tqparentOfTab->currentDockPos;
- emit tqparentOfTab->iMBeingClosed();
+ emit manager->replaceDock( parentOfTab, lastTab );
+ lastTab->currentDockPos = parentOfTab->currentDockPos;
+ emit parentOfTab->iMBeingClosed();
manager->blockSignals(true);
- delete tqparentOfTab;
+ delete parentOfTab;
} else {
- setDockTabName( tqparentTab );
+ setDockTabName( parentTab );
}
} else {
/*********************************************************************************************/
@@ -1366,41 +1366,41 @@ void KDockWidget::undock()
KDockContainer* dc = dynamic_cast<KDockContainer*>(d->container.operator->());
if (dc) {
dc->undockWidget(this);
- setFormerBrotherDockWidget(dc->tqparentDockWidget());
+ setFormerBrotherDockWidget(dc->parentDockWidget());
}
applyToWidget( 0L );
}
if (!undockedFromContainer) {
/*********************************************************************************************/
- if ( tqparentW->inherits("KDockSplitter") ){
- KDockSplitter* tqparentSplitterOfDockWidget = (KDockSplitter*)tqparentW;
- d->splitPosInPercent = tqparentSplitterOfDockWidget->separatorPos();
+ if ( parentW->inherits("KDockSplitter") ){
+ KDockSplitter* parentSplitterOfDockWidget = (KDockSplitter*)parentW;
+ d->splitPosInPercent = parentSplitterOfDockWidget->separatorPos();
- KDockWidget* secondWidget = (KDockWidget*)tqparentSplitterOfDockWidget->getAnother( this );
- KDockWidget* group = (KDockWidget*)tqparentSplitterOfDockWidget->tqparentWidget();
+ KDockWidget* secondWidget = (KDockWidget*)parentSplitterOfDockWidget->getAnother( this );
+ KDockWidget* group = (KDockWidget*)parentSplitterOfDockWidget->parentWidget();
setFormerBrotherDockWidget(secondWidget);
applyToWidget( 0L );
group->hide();
- if ( !group->tqparentWidget() ){
+ if ( !group->parentWidget() ){
secondWidget->applyToWidget( 0L, group->frameGeometry().topLeft() );
secondWidget->resize( group->width(), group->height() );
} else {
- TQWidget* obj = group->tqparentWidget();
+ TQWidget* obj = group->parentWidget();
secondWidget->applyToWidget( obj );
if ( obj->inherits("KDockSplitter") ){
- KDockSplitter* tqparentOfGroup = (KDockSplitter*)obj;
- tqparentOfGroup->deactivate();
+ KDockSplitter* parentOfGroup = (KDockSplitter*)obj;
+ parentOfGroup->deactivate();
- if ( tqparentOfGroup->getFirst() == group )
- tqparentOfGroup->activate( secondWidget );
+ if ( parentOfGroup->getFirst() == group )
+ parentOfGroup->activate( secondWidget );
else
- tqparentOfGroup->activate( 0L, secondWidget );
+ parentOfGroup->activate( 0L, secondWidget );
}
}
secondWidget->currentDockPos = group->currentDockPos;
secondWidget->formerDockPos = group->formerDockPos;
- delete tqparentSplitterOfDockWidget;
+ delete parentSplitterOfDockWidget;
manager->blockSignals(false);
emit manager->replaceDock( group, secondWidget );
emit group->iMBeingClosed();
@@ -1475,13 +1475,13 @@ void KDockWidget::setDockTabName( KDockTabGroup* tab )
listOfCaption.remove( listOfCaption.length()-1, 1 );
listOfName.remove( listOfName.length()-1, 1 );
- tab->tqparentWidget()->setName( listOfName.utf8() );
- tab->tqparentWidget()->setCaption( listOfCaption );
+ tab->parentWidget()->setName( listOfName.utf8() );
+ tab->parentWidget()->setCaption( listOfCaption );
- tab->tqparentWidget()->tqrepaint( false ); // KDockWidget->tqrepaint
- if ( tab->tqparentWidget()->tqparent() )
- if ( tab->tqparentWidget()->tqparent()->inherits("KDockSplitter") )
- ((KDockSplitter*)(tab->tqparentWidget()->tqparent()))->updateName();
+ tab->parentWidget()->tqrepaint( false ); // KDockWidget->tqrepaint
+ if ( tab->parentWidget()->tqparent() )
+ if ( tab->parentWidget()->tqparent()->inherits("KDockSplitter") )
+ ((KDockSplitter*)(tab->parentWidget()->tqparent()))->updateName();
}
bool KDockWidget::mayBeHide() const
@@ -1514,11 +1514,11 @@ void KDockWidget::changeHideShowState()
void KDockWidget::makeDockVisible()
{
- if ( tqparentDockTabGroup() ){
- tqparentDockTabGroup()->showPage( this );
+ if ( parentDockTabGroup() ){
+ parentDockTabGroup()->showPage( this );
}
- if (tqparentDockContainer()) {
- TQWidget *contWid=tqparentDockContainer();
+ if (parentDockContainer()) {
+ TQWidget *contWid=parentDockContainer();
KDockContainer *x = dynamic_cast<KDockContainer*>(contWid);
if (x) {
x->showWidget(this);
@@ -1526,11 +1526,11 @@ void KDockWidget::makeDockVisible()
}
if ( isVisible() ) return;
- TQWidget* p = tqparentWidget();
+ TQWidget* p = parentWidget();
while ( p ){
if ( !p->isVisible() )
p->show();
- p = p->tqparentWidget();
+ p = p->parentWidget();
}
if( !tqparent() ) // is undocked
dockBack();
@@ -1676,7 +1676,7 @@ void KDockManager::activate()
while ( (obj=(KDockWidget*)it.current()) ) {
++it;
if ( obj->widget ) obj->widget->show();
- if ( !obj->tqparentDockTabGroup() ){
+ if ( !obj->parentDockTabGroup() ){
obj->show();
}
}
@@ -1847,7 +1847,7 @@ KDockWidget* KDockManager::findDockWidgetAt( const TQPoint& pos )
if (!childDockWidgetList) return 0L;
if ( childDockWidgetList->tqfind(w) != -1 ) return 0L;
- if ( currentDragWidget->isGroup && ((KDockWidget*)w)->tqparentDockTabGroup() ) return 0L;
+ if ( currentDragWidget->isGroup && ((KDockWidget*)w)->parentDockTabGroup() ) return 0L;
KDockWidget* www = (KDockWidget*)w;
if ( www->sDocking == (int)KDockWidget::DockNone ) return 0L;
@@ -1931,9 +1931,9 @@ void KDockManager::startDrag( KDockWidget* w )
|| ( w->currentDockPos == KDockWidget::DockTop) || ( w->currentDockPos == KDockWidget::DockBottom)) {
w->prevSideDockPosBeforeDrag = w->currentDockPos;
- if ( w->tqparentWidget()->inherits("KDockSplitter") ){
- KDockSplitter* tqparentSplitterOfDockWidget = (KDockSplitter*)(w->tqparentWidget());
- w->d->splitPosInPercent = tqparentSplitterOfDockWidget->separatorPos();
+ if ( w->parentWidget()->inherits("KDockSplitter") ){
+ KDockSplitter* parentSplitterOfDockWidget = (KDockSplitter*)(w->parentWidget());
+ w->d->splitPosInPercent = parentSplitterOfDockWidget->separatorPos();
}
}
@@ -1949,7 +1949,7 @@ void KDockManager::dragMove( KDockWidget* dw, TQPoint pos )
KDockWidget::DockPosition oldPos = curPos;
TQSize r = dw->widget->size();
- if ( dw->tqparentDockTabGroup() ){
+ if ( dw->parentDockTabGroup() ){
curPos = KDockWidget::DockCenter;
if ( oldPos != curPos ) {
d->dragRect.setRect( p.x()+2, p.y()+2, r.width()-4, r.height()-4 );
@@ -3118,10 +3118,10 @@ KDockContainer::~KDockContainer(){
void KDockContainer::activateOverlapMode(int nonOverlapSize) {
m_nonOverlapSize=nonOverlapSize;
m_overlapMode=true;
- if (tqparentDockWidget()) {
- if (tqparentDockWidget()->tqparent()) {
+ if (parentDockWidget()) {
+ if (parentDockWidget()->tqparent()) {
kdDebug(282)<<"KDockContainer::activateOverlapMode: recalculating sizes"<<endl;
- KDockSplitter *sp= static_cast<KDockSplitter*>(tqparentDockWidget()->
+ KDockSplitter *sp= static_cast<KDockSplitter*>(parentDockWidget()->
tqparent()->qt_cast("KDockSplitter"));
if (sp) sp->resizeEvent(0);
}
@@ -3131,10 +3131,10 @@ void KDockContainer::activateOverlapMode(int nonOverlapSize) {
void KDockContainer::deactivateOverlapMode() {
if (!m_overlapMode) return;
m_overlapMode=false;
- if (tqparentDockWidget()) {
- if (tqparentDockWidget()->tqparent()) {
+ if (parentDockWidget()) {
+ if (parentDockWidget()->tqparent()) {
kdDebug(282)<<"KDockContainer::deactivateOverlapMode: recalculating sizes"<<endl;
- KDockSplitter *sp= static_cast<KDockSplitter*>(tqparentDockWidget()->
+ KDockSplitter *sp= static_cast<KDockSplitter*>(parentDockWidget()->
tqparent()->qt_cast("KDockSplitter"));
if (sp) sp->resizeEvent(0);
}
@@ -3152,7 +3152,7 @@ bool KDockContainer::dockDragMove(KDockWidget*, TQMouseEvent *) { return false;}
bool KDockContainer::dockDragLeave(KDockWidget*, TQMouseEvent *) { return false;}
-KDockWidget *KDockContainer::tqparentDockWidget(){return 0;}
+KDockWidget *KDockContainer::parentDockWidget(){return 0;}
TQStringList KDockContainer::containedWidgets() const {
TQStringList tmp;