diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2021-03-30 14:11:34 +0300 |
---|---|---|
committer | Mavridis Philippe <mavridisf@gmail.com> | 2021-03-30 14:11:34 +0300 |
commit | d991b7f387775dc1071fb0c0af78de1c613ca991 (patch) | |
tree | eb7c978130acb1b2c93eeea98be2f647372c6fac /src/komposelayout.cpp | |
parent | 1bd3c5b42f1570b2100a4986f638f2723ee37ec4 (diff) | |
download | kompose-d991b7f387775dc1071fb0c0af78de1c613ca991.tar.gz kompose-d991b7f387775dc1071fb0c0af78de1c613ca991.zip |
Qt3->TQt conversion.
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
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; |