diff options
author | Timothy Pearson <[email protected]> | 2011-08-09 22:25:47 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-08-09 22:25:47 -0500 |
commit | eaa7ee2e0bbca40ba3173c4304f81957e8964291 (patch) | |
tree | 4f793aa48a5080aedc94ce6e519c3b86708f2b88 /tqtinterface/qt4/src/workspace/tqworkspace.cpp | |
parent | 79a9d7a46a20d4a0923bc06fc471fdc2176ef865 (diff) | |
download | experimental-eaa7ee2e0bbca40ba3173c4304f81957e8964291.tar.gz experimental-eaa7ee2e0bbca40ba3173c4304f81957e8964291.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
Diffstat (limited to 'tqtinterface/qt4/src/workspace/tqworkspace.cpp')
-rw-r--r-- | tqtinterface/qt4/src/workspace/tqworkspace.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/tqtinterface/qt4/src/workspace/tqworkspace.cpp b/tqtinterface/qt4/src/workspace/tqworkspace.cpp index 164a670..a4e2687 100644 --- a/tqtinterface/qt4/src/workspace/tqworkspace.cpp +++ b/tqtinterface/qt4/src/workspace/tqworkspace.cpp @@ -87,7 +87,7 @@ MDI (multiple document interface) applications typically have one main window with a menu bar and toolbar, and a central widget that - is a TQWorkspace. The workspace itself tqcontains zero, one or more + is a TQWorkspace. The workspace itself contains zero, one or more document windows, each of which is a widget. The workspace itself is an ordinary TQt widget. It has a standard @@ -127,7 +127,7 @@ larger than the actual workspace, set the scrollBarsEnabled property to TRUE. - If the top-level window tqcontains a menu bar and a document window + If the top-level window contains a menu bar and a document window is maximised, TQWorkspace moves the document window's minimize, restore and close buttons from the document window's frame to the workspace window's menu bar. It then inserts a window operations @@ -418,7 +418,7 @@ void TQWorkspace::childEvent( TQChildEvent * e) if (e->inserted() && e->child()->isWidgetType()) { TQWidget* w = static_cast<TQWidget*>(static_cast<QWidget*>(e->child())); if ( !w || !w->testWFlags( (WFlags)(TQt::WStyle_Title | TQt::WStyle_NormalBorder | TQt::WStyle_DialogBorder) ) || w->testWFlags(TQt::WType_Dialog) - || d->icons.tqcontains( w ) || w == d->vbar || w == d->hbar || w == d->corner ) + || d->icons.contains( w ) || w == d->vbar || w == d->hbar || w == d->corner ) return; // nothing to do bool wasMaximized = w->isMaximized(); @@ -469,7 +469,7 @@ void TQWorkspace::childEvent( TQChildEvent * e) updateWorkspace(); } else if (e->removed() ) { - if ( d->windows.tqcontains( (TQWorkspaceChild*)e->child() ) ) { + if ( d->windows.contains( (TQWorkspaceChild*)e->child() ) ) { d->windows.removeRef( (TQWorkspaceChild*)e->child() ); d->focus.removeRef( (TQWorkspaceChild*)e->child() ); if (d->maxWindow == e->child()) @@ -564,7 +564,7 @@ void TQWorkspace::activateWindow( TQWidget* w, bool change_focus ) } if ( change_focus ) { - if ( d->focus.tqfind( d->active ) >=0 ) { + if ( d->focus.find( d->active ) >=0 ) { d->focus.removeRef( d->active ); d->focus.append( d->active ); } @@ -729,7 +729,7 @@ void TQWorkspace::place( TQWidget* w) void TQWorkspace::insertIcon( TQWidget* w ) { - if ( !w || d->icons.tqcontains( w ) ) + if ( !w || d->icons.contains( w ) ) return; d->icons.append( w ); if (w->parentWidget() != this ) @@ -763,7 +763,7 @@ void TQWorkspace::insertIcon( TQWidget* w ) void TQWorkspace::removeIcon( TQWidget* w) { - if ( !d->icons.tqcontains( w ) ) + if ( !d->icons.contains( w ) ) return; d->icons.remove( w ); w->hide(); @@ -888,7 +888,7 @@ void TQWorkspace::handleUndock(TQDockWindow *w) if ( l != w && l->tqgeometry().intersects(TQRect(sc_pt, w->size()))) sc.o++; } - if(maxRect.tqcontains(TQRect(sc_pt, w->size())) && + if(maxRect.contains(TQRect(sc_pt, w->size())) && (!possible || (sc.o < score.o) || ((score.o || sc.o == score.o) && score.x < sc.x))) { wpos = sc_pt; @@ -924,7 +924,7 @@ void TQWorkspace::dockWindowsShow() TQPtrList<TQDockWindow> lst = d->newdocks; d->newdocks.clear(); for(TQPtrListIterator<TQDockWindow> dw_it(lst); (*dw_it); ++dw_it) { - if(d->dockwindows.tqfind((*dw_it)) != -1) + if(d->dockwindows.find((*dw_it)) != -1) continue; handleUndock((*dw_it)); d->dockwindows.append((*dw_it)); @@ -1016,7 +1016,7 @@ void TQWorkspace::showEvent( TQShowEvent *e ) } else if(::tqqt_cast<TQStatusBar*>(w)) { if(activeWindow()) { TQWorkspaceChild *c; - if ( ( c = tqfindChild(activeWindow()) ) ) + if ( ( c = findChild(activeWindow()) ) ) c->setqStatusBar((TQStatusBar*)w); } } else if(::tqqt_cast<TQWorkspaceChild*>(w)) { @@ -1086,7 +1086,7 @@ void TQWorkspace::hideEvent( TQHideEvent * ) void TQWorkspace::minimizeWindow( TQWidget* w) { - TQWorkspaceChild* c = tqfindChild( w ); + TQWorkspaceChild* c = findChild( w ); if ( !w || (w && (!w->testWFlags( TQt::WStyle_Minimize ) || w->testWFlags( TQt::WStyle_Tool) )) ) return; @@ -1135,7 +1135,7 @@ void TQWorkspace::minimizeWindow( TQWidget* w) void TQWorkspace::normalizeWindow( TQWidget* w) { - TQWorkspaceChild* c = tqfindChild( w ); + TQWorkspaceChild* c = findChild( w ); if ( !w ) return; if ( c ) { @@ -1183,14 +1183,14 @@ void TQWorkspace::normalizeWindow( TQWidget* w) void TQWorkspace::maximizeWindow( TQWidget* w) { - TQWorkspaceChild* c = tqfindChild( w ); + TQWorkspaceChild* c = findChild( w ); if ( !w || (w && (!w->testWFlags( TQt::WStyle_Maximize ) || w->testWFlags( TQt::WStyle_Tool) )) ) return; if ( c ) { setUpdatesEnabled( FALSE ); - if (c->iconw && d->icons.tqcontains( c->iconw->parentWidget() ) ) + if (c->iconw && d->icons.contains( c->iconw->parentWidget() ) ) normalizeWindow( w ); TQWorkspace *fake = (TQWorkspace*)w; @@ -1250,7 +1250,7 @@ void TQWorkspace::showWindow( TQWidget* w) } -TQWorkspaceChild* TQWorkspace::tqfindChild( TQWidget* w) +TQWorkspaceChild* TQWorkspace::findChild( TQWidget* w) { TQPtrListIterator<TQWorkspaceChild> it( d->windows ); while ( it.current () ) { @@ -1320,7 +1320,7 @@ bool TQWorkspace::eventFilter( TQObject *o, TQEvent * e) return FALSE; } TQDockWindow *w = (TQDockWindow*)ce->child(); - if(d->newdocks.tqfind(w) == -1 && d->dockwindows.tqfind(w) == -1) { + if(d->newdocks.find(w) == -1 && d->dockwindows.find(w) == -1) { if(::tqqt_cast<TQToolBar*>(w)) d->newdocks.prepend(w); else @@ -1372,7 +1372,7 @@ bool TQWorkspace::eventFilter( TQObject *o, TQEvent * e) if ( !o->isA( "TQWorkspaceChild" ) || !isVisible() || e->spontaneous() ) break; if ( TQT_BASE_OBJECT(d->active) == TQT_BASE_OBJECT(o) ) { - int a = d->focus.tqfind( d->active ); + int a = d->focus.find( d->active ); if (a < 0) { printf("[WARNING] In TQWorkspace TQEvent::HideToParent handler: Expected active window to be present in focus list but this was not the case! Avoiding infinite loop but the root cause of this problem should be repaired. d->focus.count(): %d\n\r", d->focus.count()); break; @@ -1382,7 +1382,7 @@ bool TQWorkspace::eventFilter( TQObject *o, TQEvent * e) a = d->focus.count()-1; TQWorkspaceChild* c = d->focus.at( a ); if ( !c || TQT_BASE_OBJECT(c) == TQT_BASE_OBJECT(o) ) { - if ( c && c->iconw && d->icons.tqcontains( c->iconw->parentWidget() ) ) + if ( c && c->iconw && d->icons.contains( c->iconw->parentWidget() ) ) break; activateWindow( 0 ); break; @@ -1421,7 +1421,7 @@ bool TQWorkspace::eventFilter( TQObject *o, TQEvent * e) updateWorkspace(); break; case TQEvent::Show: - if ( o->isA("TQWorkspaceChild") && !d->focus.tqcontainsRef( (TQWorkspaceChild*)o ) ) { + if ( o->isA("TQWorkspaceChild") && !d->focus.containsRef( (TQWorkspaceChild*)o ) ) { d->focus.append( (TQWorkspaceChild*)o ); } updateWorkspace(); @@ -1791,7 +1791,7 @@ void TQWorkspace::activateNextWindow() return; } - int a = d->focus.tqfind( d->active ) + 1; + int a = d->focus.find( d->active ) + 1; a = a % d->focus.count(); @@ -1824,7 +1824,7 @@ void TQWorkspace::activatePrevWindow() return; } - int a = d->focus.tqfind( d->active ) - 1; + int a = d->focus.find( d->active ) - 1; if ( a < 0 ) a = d->focus.count()-1; @@ -2328,7 +2328,7 @@ bool TQWorkspaceChild::eventFilter( TQObject * o, TQEvent * e) switch ( e->type() ) { case TQEvent::Show: - if ( ((TQWorkspace*)parentWidget())->d->focus.tqfind( this ) < 0 ) + if ( ((TQWorkspace*)parentWidget())->d->focus.find( this ) < 0 ) ((TQWorkspace*)parentWidget())->d->focus.append( this ); if ( isVisibleTo( parentWidget() ) ) break; @@ -2463,7 +2463,7 @@ bool TQWorkspaceChild::focusNextPrevChild( bool next ) if ( candidate ) { TQObjectList *ol = queryList(); - bool ischild = ol->tqfindRef( TQT_TQOBJECT(candidate) ) != -1; + bool ischild = ol->findRef( TQT_TQOBJECT(candidate) ) != -1; delete ol; if ( !ischild ) { startingPoint = f->home(); @@ -2475,7 +2475,7 @@ bool TQWorkspaceChild::focusNextPrevChild( bool next ) if ( ( candidate->focusPolicy() & Qt::TabFocus ) == Qt::TabFocus && candidate->isEnabled() &&!candidate->focusProxy() && candidate->isVisible() ) lastValid = candidate; - if ( ol2->tqfindRef( TQT_TQOBJECT(nw) ) == -1 ) { + if ( ol2->findRef( TQT_TQOBJECT(nw) ) == -1 ) { candidate = lastValid; break; } @@ -2577,7 +2577,7 @@ void TQWorkspaceChild::setActive( bool b ) for ( o = ol->first(); o; o = ol->next() ) o->removeEventFilter( this ); if ( !hasFocus ) { - if ( lastfocusw && ol->tqcontains( TQT_TQOBJECT(lastfocusw) ) && + if ( lastfocusw && ol->contains( TQT_TQOBJECT(lastfocusw) ) && lastfocusw->focusPolicy() != Qt::NoFocus ) { // this is a bug if lastfocusw has been deleted, a new // widget has been created, and the new one is a child @@ -2587,7 +2587,7 @@ void TQWorkspaceChild::setActive( bool b ) } else if ( childWidget->focusPolicy() != Qt::NoFocus ) { childWidget->setFocus(); } else { - // tqfind something, anything, that accepts focus, and use that. + // find something, anything, that accepts focus, and use that. o = ol->first(); while( o && ((TQWidget*)o)->focusPolicy() == Qt::NoFocus ) o = ol->next(); |