summaryrefslogtreecommitdiffstats
path: root/lib/kofficeui/KoRuler.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-21 14:05:41 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-21 14:05:41 -0600
commit2d6954f69caf63ed5057bd8e1405a65d7d970292 (patch)
tree88e6436b2e81d4e68313f02a9021054252e14cc4 /lib/kofficeui/KoRuler.cpp
parentf0de9e167e289ab7dc33e57f077c1f04ec7c68c8 (diff)
downloadkoffice-2d6954f69caf63ed5057bd8e1405a65d7d970292.tar.gz
koffice-2d6954f69caf63ed5057bd8e1405a65d7d970292.zip
Rename obsolete tq methods to standard names
Diffstat (limited to 'lib/kofficeui/KoRuler.cpp')
-rw-r--r--lib/kofficeui/KoRuler.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/lib/kofficeui/KoRuler.cpp b/lib/kofficeui/KoRuler.cpp
index cc8f5189..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;
@@ -211,7 +211,7 @@ void KoRuler::drawHorizontal( TQPainter *_painter )
TQPainter p( &buffer );
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( colorGroup().brush( TQColorGroup::Base ) );
@@ -373,7 +373,7 @@ void KoRuler::drawVertical( TQPainter *_painter )
TQPainter p( &buffer );
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
@@ -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 )
@@ -1195,7 +1195,7 @@ TQSize KoRuler::sizeHint() const
void KoRuler::setPageLayout( const KoPageLayout& _layout )
{
- d->tqlayout = _layout;
+ d->layout = _layout;
update();
}