diff options
Diffstat (limited to 'src/komposelayout.cpp')
-rw-r--r-- | src/komposelayout.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/komposelayout.cpp b/src/komposelayout.cpp index 5dfd1a9..178ec2b 100644 --- a/src/komposelayout.cpp +++ b/src/komposelayout.cpp @@ -31,7 +31,7 @@ KomposeLayout::KomposeLayout( KomposeWidget *parent, int type, int dist, const char *name ) - : QObject(parent, name), + : TQObject(parent, name), spacing(dist), widgetsChanged(false), currentRows(0), @@ -39,7 +39,7 @@ KomposeLayout::KomposeLayout( KomposeWidget *parent, int type, int dist, const c parentWidget(parent) { setType( type ); - currentSize = QSize( 1, 1 ); + currentSize = TQSize( 1, 1 ); } KomposeLayout::~KomposeLayout() @@ -92,7 +92,7 @@ void KomposeLayout::rearrangeContents() emptyContainers.clear(); // Check for empty containers - QPtrListIterator<KomposeWidget> it( list ); + TQPtrListIterator<KomposeWidget> it( list ); KomposeWidget *task; while ( (task = it.current()) != 0 ) { @@ -110,7 +110,7 @@ void KomposeLayout::rearrangeContents() } // Arrange filled containers - QRect filledRect( 0, + TQRect filledRect( 0, 0, parentWidget->width(), parentWidget->height() - ( 40 + 2*spacing ) ); @@ -118,7 +118,7 @@ void KomposeLayout::rearrangeContents() rearrangeContents( filledRect, filledContainers ); // Arrange empty containers - QRect emptyRect( 0, + TQRect emptyRect( 0, parentWidget->height() - ( 40 + 2*spacing ), parentWidget->width(), ( 40 + 2*spacing ) ); @@ -129,7 +129,7 @@ void KomposeLayout::rearrangeContents() } else // default type (generic) { - QRect availRect( 0, + TQRect availRect( 0, 0, parentWidget->width(), parentWidget->height()); @@ -146,7 +146,7 @@ void KomposeLayout::rearrangeContents() * availRect specifies the size&pos of the contents * Specify either rows or cols to set a fixed number of those (setting both won't work correctly) */ -void KomposeLayout::rearrangeContents( const QRect& availRect, const QPtrList<KomposeWidget> widgets, int rows, int columns, bool setMemberRowsCols ) +void KomposeLayout::rearrangeContents( const TQRect& availRect, const TQPtrList<KomposeWidget> widgets, int rows, int columns, bool setMemberRowsCols ) { // Check or empty list if (widgets.count() == 0) @@ -155,7 +155,7 @@ void KomposeLayout::rearrangeContents( const QRect& availRect, const QPtrList<Ko return; } - QPtrListIterator<KomposeWidget> it( widgets ); + TQPtrListIterator<KomposeWidget> it( widgets ); // Calculate grid's rows & cols if ( rows != -1 ) // rows have been specified @@ -188,8 +188,8 @@ void KomposeLayout::rearrangeContents( const QRect& availRect, const QPtrList<Ko int w = (availRect.width() - (columns+1) * spacing ) / columns; int h = (availRect.height() - (rows+1) * spacing ) / rows; - QValueList<QRect> geometryRects; - QValueList<int> maxRowHeights; + TQValueList<TQRect> geometryRects; + TQValueList<int> maxRowHeights; // Process rows for ( int i=0; i<rows; ++i ) { @@ -259,7 +259,7 @@ void KomposeLayout::rearrangeContents( const QRect& availRect, const QPtrList<Ko alignmentYoffset = h - widgeth; if ( j==0 && w > widgetw ) alignmentXoffset = w - widgetw; - QRect geom( availRect.x() + j * (w + spacing) + spacing + alignmentXoffset + xOffsetFromLastCol, + TQRect geom( availRect.x() + j * (w + spacing) + spacing + alignmentXoffset + xOffsetFromLastCol, availRect.y() + i * (h + spacing) + spacing + alignmentYoffset, widgetw, widgeth ); geometryRects.append(geom); @@ -274,8 +274,8 @@ void KomposeLayout::rearrangeContents( const QRect& availRect, const QPtrList<Ko } it.toFirst(); - QValueList<QRect>::iterator geomIt = geometryRects.begin(); - QValueList<int>::iterator maxRowHeightIt = maxRowHeights.begin(); + TQValueList<TQRect>::iterator geomIt = geometryRects.begin(); + TQValueList<int>::iterator maxRowHeightIt = maxRowHeights.begin(); int topOffset = 0; for ( int i=0; i<rows; ++i ) { @@ -286,7 +286,7 @@ void KomposeLayout::rearrangeContents( const QRect& availRect, const QPtrList<Ko if ( (task = it.current()) == 0) break; - QRect geom = *geomIt; + TQRect geom = *geomIt; geom.setY( geom.y() + topOffset ); // geom.setHeight( geom.height() - topOffset ); task->setGeometry( geom ); @@ -345,12 +345,12 @@ KomposeWidget* KomposeLayout::getNeighbour( const KomposeWidget* widget, int dir * Search for neighbour in the given list (called from inside) */ KomposeWidget* KomposeLayout::getNeighbour( - QPtrList<KomposeWidget> listToSearch, + TQPtrList<KomposeWidget> listToSearch, const KomposeWidget* widget, int direction, int wrap ) { - QPtrListIterator<KomposeWidget> it( listToSearch ); + TQPtrListIterator<KomposeWidget> it( listToSearch ); KomposeWidget *task; KomposeWidget *neighbour; |