summaryrefslogtreecommitdiffstats
path: root/experimental/tqtinterface/qt4/src/widgets/tqdockarea.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'experimental/tqtinterface/qt4/src/widgets/tqdockarea.cpp')
-rw-r--r--experimental/tqtinterface/qt4/src/widgets/tqdockarea.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/experimental/tqtinterface/qt4/src/widgets/tqdockarea.cpp b/experimental/tqtinterface/qt4/src/widgets/tqdockarea.cpp
index 5aed4893d..72f65c2cf 100644
--- a/experimental/tqtinterface/qt4/src/widgets/tqdockarea.cpp
+++ b/experimental/tqtinterface/qt4/src/widgets/tqdockarea.cpp
@@ -367,7 +367,7 @@ int TQDockAreaLayout::layoutItems( const TQRect &rect, bool testonly )
if ( dw->isHidden() )
continue;
++visibleWindows;
- // tqfind position for the widget: This is the maximum of the
+ // find position for the widget: This is the maximum of the
// end of the previous widget and the offset of the widget. If
// the position + the width of the widget dosn't fit into the
// dock, try moving it a bit back, if possible.
@@ -484,9 +484,9 @@ int TQDockAreaLayout::widthForHeight( int h ) const
fill the available space as compactly as possible. TQDockAreas can
contain TQToolBars since TQToolBar is a TQDockWindow subclass.
- TQMainWindow tqcontains four TQDockAreas which you can use for your
+ TQMainWindow contains four TQDockAreas which you can use for your
TQToolBars and TQDockWindows, so in most situations you do not need
- to use the TQDockArea class directly. Although TQMainWindow tqcontains
+ to use the TQDockArea class directly. Although TQMainWindow contains
support for its own dock areas it isn't convenient for adding new
TQDockAreas. If you need to create your own dock areas we suggest
that you create a subclass of TQWidget and add your TQDockAreas to
@@ -517,9 +517,9 @@ int TQDockAreaLayout::widthForHeight( int h ) const
To dock or undock a dock window use TQDockWindow::dock() and
TQDockWindow::undock() respectively. If you want to control which
dock windows can dock in a dock area use setAcceptDockWindow(). To
- see if a dock area tqcontains a particular dock window use
+ see if a dock area contains a particular dock window use
\l{hasDockWindow()}; to see how many dock windows a dock area
- tqcontains use count().
+ contains use count().
The streaming operators can write the positions of the dock
windows in the dock area to a TQTextStream. The positions can be
@@ -614,7 +614,7 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, int index )
{
invalidateFixedSizes();
TQDockWindow *dockWindow = 0;
- int dockWindowIndex = tqfindDockWindow( w );
+ int dockWindowIndex = findDockWindow( w );
if ( dockWindowIndex == -1 ) {
dockWindow = w;
dockWindow->reparent( this, TQPoint( 0, 0 ), TRUE );
@@ -643,15 +643,15 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, int index )
}
/*!
- Returns TRUE if the dock area tqcontains the dock window \a w;
+ Returns TRUE if the dock area contains the dock window \a w;
otherwise returns FALSE. If \a index is not 0 it will be set as
- follows: if the dock area tqcontains the dock window \a *index is
+ follows: if the dock area contains the dock window \a *index is
set to \a w's index position; otherwise \a *index is set to -1.
*/
bool TQDockArea::hasDockWindow( TQDockWindow *w, int *index )
{
- int i = dockWindows->tqfindRef( w );
+ int i = dockWindows->findRef( w );
if ( index )
*index = i;
return i != -1;
@@ -662,7 +662,7 @@ int TQDockArea::lineOf( int index )
TQPtrList<TQDockWindow> lineStarts = tqlayout->lineStarts();
int i = 0;
for ( TQDockWindow *w = lineStarts.first(); w; w = lineStarts.next(), ++i ) {
- if ( dockWindows->tqfind( w ) >= index )
+ if ( dockWindows->find( w ) >= index )
return i;
}
return i;
@@ -703,20 +703,20 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, const TQPoint &p, const TQRect
}
TQDockWindow *dockWindow = 0;
- int dockWindowIndex = tqfindDockWindow( w );
+ int dockWindowIndex = findDockWindow( w );
TQPtrList<TQDockWindow> lineStarts = tqlayout->lineStarts();
TQValueList<TQRect> lines = tqlayout->lineList();
bool wasAloneInLine = FALSE;
TQPoint pos = mapFromGlobal( p );
TQRect lr = *lines.at( lineOf( dockWindowIndex ) );
if ( dockWindowIndex != -1 ) {
- if ( lineStarts.tqfind( w ) != -1 &&
- ( (dockWindowIndex < (int)dockWindows->count() - 1 && lineStarts.tqfind( dockWindows->at( dockWindowIndex + 1 ) ) != -1) ||
+ if ( lineStarts.find( w ) != -1 &&
+ ( (dockWindowIndex < (int)dockWindows->count() - 1 && lineStarts.find( dockWindows->at( dockWindowIndex + 1 ) ) != -1) ||
dockWindowIndex == (int)dockWindows->count() - 1 ) )
wasAloneInLine = TRUE;
dockWindow = dockWindows->take( dockWindowIndex );
if ( !wasAloneInLine ) { // only do the pre-tqlayout if the widget isn't the only one in its line
- if ( lineStarts.tqfindRef( dockWindow ) != -1 && dockWindowIndex < (int)dockWindows->count() )
+ if ( lineStarts.findRef( dockWindow ) != -1 && dockWindowIndex < (int)dockWindows->count() )
dockWindows->at( dockWindowIndex )->setNewLine( TRUE );
tqlayout->layoutItems( TQRect( 0, 0, width(), height() ), TRUE );
}
@@ -754,7 +754,7 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, const TQPoint &p, const TQRect
bool insertLine = FALSE;
int i = 0;
TQRect lineRect;
- // tqfind the line which we touched with the mouse
+ // find the line which we touched with the mouse
for ( TQValueList<TQRect>::Iterator it = lines.begin(); it != lines.end(); ++it, ++i ) {
if ( point_pos( pos, orientation(), TRUE ) >= point_pos( (*it).topLeft(), orientation(), TRUE ) &&
point_pos( pos, orientation(), TRUE ) <= point_pos( (*it).topLeft(), orientation(), TRUE ) +
@@ -782,7 +782,7 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, const TQPoint &p, const TQRect
}
}
- if ( !insertLine && wasAloneInLine && lr.tqcontains( pos ) ) // if we are alone in a line and just moved in there, re-insert it
+ if ( !insertLine && wasAloneInLine && lr.contains( pos ) ) // if we are alone in a line and just moved in there, re-insert it
insertLine = TRUE;
#if defined(TQDOCKAREA_DEBUG)
@@ -807,14 +807,14 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, const TQPoint &p, const TQRect
for ( dw = lineStarts.first(); dw; dw = lineStarts.next() )
dw->setNewLine( TRUE );
- // tqfind the index of the first widget in the search line
+ // find the index of the first widget in the search line
int searchLine = dockLine;
#if defined(TQDOCKAREA_DEBUG)
qDebug( "search line start of %d", searchLine );
#endif
TQDockWindow *lsw = lineStarts.at( searchLine );
- int index = dockWindows->tqfind( lsw );
- if ( index == -1 ) { // the linestart widget hasn't been found, try to tqfind it harder
+ int index = dockWindows->find( lsw );
+ if ( index == -1 ) { // the linestart widget hasn't been found, try to find it harder
if ( lsw == w && dockWindowIndex <= (int)dockWindows->count())
index = dockWindowIndex;
else
@@ -826,7 +826,7 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, const TQPoint &p, const TQRect
qDebug( " which starts at %d", index );
#endif
if ( !insertLine ) { // if we insert the docking widget in the existing line
- // tqfind the index for the widget
+ // find the index for the widget
bool inc = TRUE;
bool firstTime = TRUE;
for ( dw = dockWindows->current(); dw; dw = dockWindows->next() ) {
@@ -834,7 +834,7 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, const TQPoint &p, const TQRect
dw->setFixedExtentWidth( -1 );
else
dw->setFixedExtentHeight( -1 );
- if ( !firstTime && lineStarts.tqfind( dw ) != -1 ) // we are in the next line, so break
+ if ( !firstTime && lineStarts.find( dw ) != -1 ) // we are in the next line, so break
break;
if ( point_pos( pos, orientation() ) <
point_pos( fix_pos( dw ), orientation() ) + size_extent( dw->size(), orientation() ) / 2 ) {
@@ -849,7 +849,7 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, const TQPoint &p, const TQRect
#endif
// if we insert it just before a widget which has a new line, transfer the newline to the docking widget
// but not if we didn't only mave a widget in its line which was alone in the line before
- if ( !( wasAloneInLine && lr.tqcontains( pos ) )
+ if ( !( wasAloneInLine && lr.contains( pos ) )
&& index >= 0 && index < (int)dockWindows->count() &&
dockWindows->at( index )->newLine() && lineOf( index ) == dockLine ) {
#if defined(TQDOCKAREA_DEBUG)
@@ -857,7 +857,7 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, const TQPoint &p, const TQRect
#endif
dockWindows->at( index )->setNewLine( FALSE );
dockWindow->setNewLine( TRUE );
- } else if ( wasAloneInLine && lr.tqcontains( pos ) ) {
+ } else if ( wasAloneInLine && lr.contains( pos ) ) {
dockWindow->setNewLine( TRUE );
} else { // if we are somewhere in a line, get rid of the newline
dockWindow->setNewLine( FALSE );
@@ -910,13 +910,13 @@ void TQDockArea::removeDockWindow( TQDockWindow *w, bool makeFloating, bool swap
{
w->removeEventFilter( this );
TQDockWindow *dockWindow = 0;
- int i = tqfindDockWindow( w );
+ int i = findDockWindow( w );
if ( i == -1 )
return;
dockWindow = dockWindows->at( i );
dockWindows->remove( i );
TQPtrList<TQDockWindow> lineStarts = tqlayout->lineStarts();
- if ( fixNewLines && lineStarts.tqfindRef( dockWindow ) != -1 && i < (int)dockWindows->count() )
+ if ( fixNewLines && lineStarts.findRef( dockWindow ) != -1 && i < (int)dockWindows->count() )
dockWindows->at( i )->setNewLine( TRUE );
if ( makeFloating ) {
TQWidget *p = parentWidget() ? parentWidget() : tqtopLevelWidget();
@@ -929,9 +929,9 @@ void TQDockArea::removeDockWindow( TQDockWindow *w, bool makeFloating, bool swap
tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ) );
}
-int TQDockArea::tqfindDockWindow( TQDockWindow *w )
+int TQDockArea::findDockWindow( TQDockWindow *w )
{
- return dockWindows ? dockWindows->tqfindRef( w ) : -1;
+ return dockWindows ? dockWindows->findRef( w ) : -1;
}
void TQDockArea::updateLayout()
@@ -964,7 +964,7 @@ bool TQDockArea::eventFilter( TQObject *o, TQEvent *e )
void TQDockArea::invalidNextOffset( TQDockWindow *dw )
{
- int i = dockWindows->tqfind( dw );
+ int i = dockWindows->find( dw );
if ( i == -1 || i >= (int)dockWindows->count() - 1 )
return;
if ( ( dw = dockWindows->at( ++i ) ) )
@@ -1020,7 +1020,7 @@ void TQDockArea::lineUp( bool keepNewLines )
TQDockArea::DockWindowData *TQDockArea::dockWindowData( TQDockWindow *w )
{
DockWindowData *data = new DockWindowData;
- data->index = tqfindDockWindow( w );
+ data->index = findDockWindow( w );
if ( data->index == -1 ) {
delete data;
return 0;
@@ -1028,7 +1028,7 @@ TQDockArea::DockWindowData *TQDockArea::dockWindowData( TQDockWindow *w )
TQPtrList<TQDockWindow> lineStarts = tqlayout->lineStarts();
int i = -1;
for ( TQDockWindow *dw = dockWindows->first(); dw; dw = dockWindows->next() ) {
- if ( lineStarts.tqfindRef( dw ) != -1 )
+ if ( lineStarts.findRef( dw ) != -1 )
++i;
if ( dw == w )
break;
@@ -1056,7 +1056,7 @@ void TQDockArea::dockWindow( TQDockWindow *dockWindow, DockWindowData *data )
TQPtrList<TQDockWindow> lineStarts = tqlayout->lineStarts();
int index = 0;
if ( (int)lineStarts.count() > data->line )
- index = dockWindows->tqfind( lineStarts.at( data->line ) );
+ index = dockWindows->find( lineStarts.at( data->line ) );
if ( index == -1 ) {
index = 0;
(void)dockWindows->at( index );
@@ -1064,7 +1064,7 @@ void TQDockArea::dockWindow( TQDockWindow *dockWindow, DockWindowData *data )
bool firstTime = TRUE;
int offset = data->offset;
for ( TQDockWindow *dw = dockWindows->current(); dw; dw = dockWindows->next() ) {
- if ( !firstTime && lineStarts.tqfind( dw ) != -1 )
+ if ( !firstTime && lineStarts.find( dw ) != -1 )
break;
if ( offset <
point_pos( fix_pos( dw ), orientation() ) + size_extent( dw->size(), orientation() ) / 2 )
@@ -1104,7 +1104,7 @@ bool TQDockArea::isDockWindowAccepted( TQDockWindow *dw )
{
if ( !dw )
return FALSE;
- if ( forbiddenWidgets.tqfindRef( dw ) != -1 )
+ if ( forbiddenWidgets.findRef( dw ) != -1 )
return FALSE;
TQMainWindow *mw = ::tqqt_cast<TQMainWindow*>(parentWidget());
@@ -1131,7 +1131,7 @@ void TQDockArea::setAcceptDockWindow( TQDockWindow *dw, bool accept )
{
if ( accept )
forbiddenWidgets.removeRef( dw );
- else if ( forbiddenWidgets.tqfindRef( dw ) == -1 )
+ else if ( forbiddenWidgets.findRef( dw ) == -1 )
forbiddenWidgets.append( dw );
}
@@ -1147,7 +1147,7 @@ void TQDockArea::invalidateFixedSizes()
int TQDockArea::maxSpace( int hint, TQDockWindow *dw )
{
- int index = tqfindDockWindow( dw );
+ int index = findDockWindow( dw );
if ( index == -1 || index + 1 >= (int)dockWindows->count() ) {
if ( orientation() == Qt::Horizontal )
return dw->width();
@@ -1224,7 +1224,7 @@ void TQDockArea::setFixedExtent( int d, TQDockWindow *dw )
bool TQDockArea::isLastDockWindow( TQDockWindow *dw )
{
- int i = dockWindows->tqfind( dw );
+ int i = dockWindows->find( dw );
if ( i == -1 || i >= (int)dockWindows->count() - 1 )
return TRUE;
TQDockWindow *w = 0;