diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:32:11 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:32:11 -0600 |
commit | 94844816550ad672ccfcdc25659c625546239998 (patch) | |
tree | e35fc60fd736c645d59f6408af032774ad8023d3 /lib/kofficeui/KoRuler.cpp | |
parent | 2a811c38c74c03648ecf857e566c44483cbad706 (diff) | |
download | koffice-94844816550ad672ccfcdc25659c625546239998.tar.gz koffice-94844816550ad672ccfcdc25659c625546239998.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'lib/kofficeui/KoRuler.cpp')
-rw-r--r-- | lib/kofficeui/KoRuler.cpp | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/lib/kofficeui/KoRuler.cpp b/lib/kofficeui/KoRuler.cpp index 212becd7..b11b0604 100644 --- a/lib/kofficeui/KoRuler.cpp +++ b/lib/kofficeui/KoRuler.cpp @@ -44,7 +44,7 @@ public: bool whileMovingBorderLeft, whileMovingBorderRight; bool whileMovingBorderTop, whileMovingBorderBottom; TQPixmap pmFirst, pmLeft; - KoPageLayout tqlayout; + KoPageLayout layout; KoTabChooser *tabChooser; KoTabulatorList tabList; // Do we have to remove a certain tab in the DC Event? @@ -93,7 +93,7 @@ KoRuler::KoRuler( TQWidget *_parent, TQWidget *_canvas, Qt::Orientation _orienta d->canvas = _canvas; orientation = _orientation; - d->tqlayout = _layout; + d->layout = _layout; d->flags = _flags; d->m_bReadWrite=true; @@ -125,11 +125,11 @@ KoRuler::KoRuler( TQWidget *_parent, TQWidget *_canvas, Qt::Orientation _orienta d->removeTab.type = T_INVALID; if ( orientation == Qt::Horizontal ) { - frameStart = tqRound( zoomIt(d->tqlayout.ptLeft) ); - d->frameEnd = tqRound( zoomIt(d->tqlayout.ptWidth - d->tqlayout.ptRight) ); + frameStart = tqRound( zoomIt(d->layout.ptLeft) ); + d->frameEnd = tqRound( zoomIt(d->layout.ptWidth - d->layout.ptRight) ); } else { - frameStart = tqRound( zoomIt(d->tqlayout.ptTop) ); - d->frameEnd = tqRound( zoomIt(d->tqlayout.ptHeight - d->tqlayout.ptBottom) ); + frameStart = tqRound( zoomIt(d->layout.ptTop) ); + d->frameEnd = tqRound( zoomIt(d->layout.ptHeight - d->layout.ptBottom) ); } m_bFrameStartSet = false; @@ -209,12 +209,12 @@ void KoRuler::drawHorizontal( TQPainter *_painter ) // Use a double-buffer pixmap TQPainter p( &buffer ); - p.fillRect( 0, 0, width(), height(), TQBrush( tqcolorGroup().brush( TQColorGroup::Background ) ) ); + p.fillRect( 0, 0, width(), height(), TQBrush( colorGroup().brush( TQColorGroup::Background ) ) ); - int totalw = tqRound( zoomIt(d->tqlayout.ptWidth) ); + int totalw = tqRound( zoomIt(d->layout.ptWidth) ); TQString str; - p.setBrush( tqcolorGroup().brush( TQColorGroup::Base ) ); + p.setBrush( colorGroup().brush( TQColorGroup::Base ) ); // Draw white rect TQRect r; @@ -279,13 +279,13 @@ void KoRuler::drawHorizontal( TQPainter *_painter ) // Draw ending bar (at page width) //int constant=zoomIt(1); //p.drawLine( totalw - diffx + constant, 1, totalw - diffx + constant, height() - 1 ); - //p.setPen( tqcolorGroup().color( TQColorGroup::Base ) ); + //p.setPen( colorGroup().color( TQColorGroup::Base ) ); //p.drawLine( totalw - diffx, 1, totalw - diffx, height() - 1 ); // Draw starting bar (at 0) - //p.setPen( tqcolorGroup().color( TQColorGroup::Text ) ); + //p.setPen( colorGroup().color( TQColorGroup::Text ) ); //p.drawLine( -diffx, 1, -diffx, height() - 1 ); - //p.setPen( tqcolorGroup().color( TQColorGroup::Base ) ); + //p.setPen( colorGroup().color( TQColorGroup::Base ) ); //p.drawLine( -diffx - constant, 1, -diffx - constant, height() - 1 ); // Draw the indents triangles @@ -307,7 +307,7 @@ void KoRuler::drawHorizontal( TQPainter *_painter ) // Show the mouse position if ( d->action == A_NONE && showMPos ) { - p.setPen( tqcolorGroup().color( TQColorGroup::Text ) ); + p.setPen( colorGroup().color( TQColorGroup::Text ) ); p.drawLine( mposX, 1, mposX, height() - 1 ); } hasToDelete = false; @@ -325,7 +325,7 @@ void KoRuler::drawTabs( TQPainter &_painter ) { int ptPos = 0; - _painter.setPen( TQPen( tqcolorGroup().color( TQColorGroup::Text ), 2, SolidLine ) ); + _painter.setPen( TQPen( colorGroup().color( TQColorGroup::Text ), 2, SolidLine ) ); // Check if we're in a mousemove event, removing a tab. // In that case, we'll have to skip drawing that one. bool willRemove = d->mousePressed && willRemoveTab( d->oldMy ) && d->currTab.type != T_INVALID; @@ -356,7 +356,7 @@ void KoRuler::drawTabs( TQPainter &_painter ) _painter.drawLine( ptPos + 4, height() - 4, ptPos + 20 - 4, height() - 4 ); _painter.drawLine( ptPos + 20 / 2, 4, ptPos + 20 / 2, height() - 4 ); _painter.fillRect( ptPos + 20 / 2 + 2, height() - 9, 3, 3, - tqcolorGroup().color( TQColorGroup::Text ) ); + colorGroup().color( TQColorGroup::Text ) ); } break; default: break; } @@ -371,9 +371,9 @@ void KoRuler::drawVertical( TQPainter *_painter ) resize( TQMAX( fm.height() + 4, 20 ), height() ); TQPainter p( &buffer ); - p.fillRect( 0, 0, width(), height(), TQBrush( tqcolorGroup().brush( TQColorGroup::Background ) ) ); + p.fillRect( 0, 0, width(), height(), TQBrush( colorGroup().brush( TQColorGroup::Background ) ) ); - int totalh = tqRound( zoomIt(d->tqlayout.ptHeight) ); + int totalh = tqRound( zoomIt(d->layout.ptHeight) ); // Clip rect - this gives basically always a rect like (2,2,width-2,height-2) TQRect paintRect = _painter->clipRegion( TQPainter::CoordPainter ).boundingRect(); // Ruler rect @@ -382,7 +382,7 @@ void KoRuler::drawVertical( TQPainter *_painter ) if ( paintRect.intersects( rulerRect ) ) { TQString str; - p.setBrush( tqcolorGroup().brush( TQColorGroup::Base ) ); + p.setBrush( colorGroup().brush( TQColorGroup::Base ) ); // Draw white rect TQRect r; @@ -454,19 +454,19 @@ void KoRuler::drawVertical( TQPainter *_painter ) // Draw ending bar (at page height) //p.drawLine( 1, totalh - diffy + 1, width() - 1, totalh - diffy + 1 ); - //p.setPen( tqcolorGroup().color( TQColorGroup::Base ) ); + //p.setPen( colorGroup().color( TQColorGroup::Base ) ); //p.drawLine( 1, totalh - diffy, width() - 1, totalh - diffy ); // Draw starting bar (at 0) - //p.setPen( tqcolorGroup().color( TQColorGroup::Text ) ); + //p.setPen( colorGroup().color( TQColorGroup::Text ) ); //p.drawLine( 1, -diffy, width() - 1, -diffy ); - //p.setPen( tqcolorGroup().color( TQColorGroup::Base ) ); + //p.setPen( colorGroup().color( TQColorGroup::Base ) ); //p.drawLine( 1, -diffy - 1, width() - 1, -diffy - 1 ); } // Show the mouse position if ( d->action == A_NONE && showMPos ) { - p.setPen( tqcolorGroup().color( TQColorGroup::Text ) ); + p.setPen( colorGroup().color( TQColorGroup::Text ) ); p.drawLine( 1, mposY, width() - 1, mposY ); } hasToDelete = false; @@ -598,7 +598,7 @@ void KoRuler::mouseReleaseEvent( TQMouseEvent *e ) if ( d->canvas ) drawLine(d->oldMx, -1); update(); - emit newPageLayout( d->tqlayout ); + emit newPageLayout( d->layout ); } else if ( d->action == A_BR_TOP || d->action == A_BR_BOTTOM ) { d->whileMovingBorderTop = false; d->whileMovingBorderBottom = false; @@ -610,7 +610,7 @@ void KoRuler::mouseReleaseEvent( TQMouseEvent *e ) p.end(); } update(); - emit newPageLayout( d->tqlayout ); + emit newPageLayout( d->layout ); } else if ( d->action == A_FIRST_INDENT ) { if ( d->canvas ) drawLine(d->oldMx, -1); @@ -667,12 +667,12 @@ void KoRuler::mouseMoveEvent( TQMouseEvent *e ) hasToDelete = false; int pw = d->frameEnd - frameStart; - int ph = tqRound(zoomIt(d->tqlayout.ptHeight)); + int ph = tqRound(zoomIt(d->layout.ptHeight)); int left = frameStart - diffx; - int top = tqRound(zoomIt(d->tqlayout.ptTop)); + int top = tqRound(zoomIt(d->layout.ptTop)); top -= diffy; int right = d->frameEnd - diffx; - int bottom = tqRound(zoomIt(d->tqlayout.ptBottom)); + int bottom = tqRound(zoomIt(d->layout.ptBottom)); bottom = ph - bottom - diffy; // Cumulate first-line-indent int ip_first = tqRound( zoomIt( i_first + ( d->rtl ? d->i_right : i_left) ) ); @@ -693,13 +693,13 @@ void KoRuler::mouseMoveEvent( TQMouseEvent *e ) /////// ###### // At the moment, moving the left and right border indicators // is disabled when setFrameStartEnd has been called (i.e. in KWord) - // Changing the tqlayout margins directly from it would be utterly wrong + // Changing the layout margins directly from it would be utterly wrong // (just try the 2-columns modes...). What needs to be done is: // emitting a signal frameResized in mouseReleaseEvent, when a left/right // border has been moved, and in kword we need to update the margins from // there, if the left border of the 1st column or the right border of the // last column was moved... and find what to do with the other borders. - // And for normal frames, resize the frame without touching the page tqlayout. + // And for normal frames, resize the frame without touching the page layout. // All that is too much for now -> disabling. if ( !m_bFrameStartSet ) { @@ -747,7 +747,7 @@ void KoRuler::mouseMoveEvent( TQMouseEvent *e ) case A_BR_LEFT: { if ( d->canvas && mx < right-10 && mx+diffx-2 > 0) { drawLine( d->oldMx, mx ); - d->tqlayout.ptLeft = unZoomIt(static_cast<double>(mx + diffx)); + d->layout.ptLeft = unZoomIt(static_cast<double>(mx + diffx)); if( ip_left > right-left-15 ) { ip_left=right-left-15; ip_left=ip_left<0 ? 0 : ip_left; @@ -770,7 +770,7 @@ void KoRuler::mouseMoveEvent( TQMouseEvent *e ) case A_BR_RIGHT: { if ( d->canvas && mx > left+10 && mx+diffx <= pw-2) { drawLine( d->oldMx, mx ); - d->tqlayout.ptRight = unZoomIt(static_cast<double>(pw - ( mx + diffx ))); + d->layout.ptRight = unZoomIt(static_cast<double>(pw - ( mx + diffx ))); if( ip_left > right-left-15 ) { ip_left=right-left-15; ip_left=ip_left<0 ? 0 : ip_left; @@ -895,7 +895,7 @@ void KoRuler::mouseMoveEvent( TQMouseEvent *e ) p.drawLine( 0, d->oldMy, d->canvas->width(), d->oldMy ); p.drawLine( 0, my, d->canvas->width(), my ); p.end(); - d->tqlayout.ptTop = unZoomIt(static_cast<double>(my + diffy)); + d->layout.ptTop = unZoomIt(static_cast<double>(my + diffy)); d->oldMx = mx; d->oldMy = my; update(); @@ -910,7 +910,7 @@ void KoRuler::mouseMoveEvent( TQMouseEvent *e ) p.drawLine( 0, d->oldMy, d->canvas->width(), d->oldMy ); p.drawLine( 0, my, d->canvas->width(), my ); p.end(); - d->tqlayout.ptBottom = unZoomIt(static_cast<double>(ph - ( my + diffy ))); + d->layout.ptBottom = unZoomIt(static_cast<double>(ph - ( my + diffy ))); d->oldMx = mx; d->oldMy = my; update(); @@ -984,7 +984,7 @@ void KoRuler::handleDoubleClick() // Double-clicked nothing d->action = A_NONE; - emit doubleClicked(); // usually page tqlayout dialog + emit doubleClicked(); // usually page layout dialog } void KoRuler::setTabList( const KoTabulatorList & _tabList ) @@ -1176,7 +1176,7 @@ void KoRuler::slotMenuActivated( int i ) } } -TQSize KoRuler::tqminimumSizeHint() const +TQSize KoRuler::minimumSizeHint() const { TQSize size; TQFont font = KGlobalSettings::toolBarFont(); @@ -1188,14 +1188,14 @@ TQSize KoRuler::tqminimumSizeHint() const return size; } -TQSize KoRuler::tqsizeHint() const +TQSize KoRuler::sizeHint() const { - return tqminimumSizeHint(); + return minimumSizeHint(); } void KoRuler::setPageLayout( const KoPageLayout& _layout ) { - d->tqlayout = _layout; + d->layout = _layout; update(); } |