diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:56:31 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:56:31 -0600 |
commit | c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 (patch) | |
tree | 1ee1912ac4bb966475f0db0f2a78678661b4b4a5 /kspread/kspread_canvas.cc | |
parent | 94844816550ad672ccfcdc25659c625546239998 (diff) | |
download | koffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.tar.gz koffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 94844816550ad672ccfcdc25659c625546239998.
Diffstat (limited to 'kspread/kspread_canvas.cc')
-rw-r--r-- | kspread/kspread_canvas.cc | 130 |
1 files changed, 65 insertions, 65 deletions
diff --git a/kspread/kspread_canvas.cc b/kspread/kspread_canvas.cc index 08ab33e0..3f482e27 100644 --- a/kspread/kspread_canvas.cc +++ b/kspread/kspread_canvas.cc @@ -47,7 +47,7 @@ #include <tqapplication.h> #include <tqbuffer.h> -#include <clipboard.h> +#include <tqclipboard.h> #include <tqdrawutil.h> #include <tqlabel.h> #include <tqpoint.h> @@ -547,7 +547,7 @@ void Canvas::validateSelection() ypos = sheet->dblRowPos( moveY ); } //d->validationInfo->setGeometry( 3, y + 3, len + 2, hei + 2 ); - d->validationInfo->setAlignment( TQt::AlignVCenter ); + d->validationInfo->tqsetAlignment( TQt::AlignVCenter ); TQPainter painter; painter.begin( this ); int len = 0; @@ -1011,7 +1011,7 @@ void Canvas::mouseMoveEvent( TQMouseEvent * _ev ) (int) _ev->y() ); if ( ( obj = getObject( p, activeSheet() ) ) && obj->isSelected() ) { - KoRect const bound = obj->geometry(); + KoRect const bound = obj->tqgeometry(); TQRect zoomedBound = doc()->zoomRect( KoRect(bound.left(), bound.top(), bound.width(), bound.height() ) ); @@ -1056,7 +1056,7 @@ void Canvas::mouseMoveEvent( TQMouseEvent * _ev ) } //Check to see if the mouse is over a highlight range size grip and if it is, change the cursor - //shape to a resize arrow + //tqshape to a resize arrow if (highlightRangeSizeGripAt(ev_PosX,ev_PosY)) { if ( sheet->layoutDirection()==Sheet::RightToLeft ) @@ -1177,7 +1177,7 @@ void Canvas::mouseReleaseEvent( TQMouseEvent* /*_ev*/) doc()->addCommand( cmd ); } else { - repaint(); + tqrepaint(); } d->m_isMoving = false; break; @@ -1253,13 +1253,13 @@ void Canvas::processLeftClickAnchor() if ( KRun::isExecutableFile( d->anchor , type ) ) { - //TQString question = i18n("Do you want to open this link to '%1'?\n").arg(d->anchor); + //TQString question = i18n("Do you want to open this link to '%1'?\n").tqarg(d->anchor); //question += i18n("Note that opening a link to a local file may " // "compromise your system's security."); TQString question = i18n("This link points to the program or script '%1'.\n" - "Malicious programs can harm your computer. Are you sure that you want to run this program?").arg(d->anchor); + "Malicious programs can harm your computer. Are you sure that you want to run this program?").tqarg(d->anchor); // this will also start local programs, so adding a "don't warn again" // checkbox will probably be too dangerous int choice = KMessageBox::warningYesNo(this, question, i18n("Open Link?")); @@ -1352,9 +1352,9 @@ void Canvas::mousePressEvent( TQMouseEvent * _ev ) d->m_resizeObject = obj; - d->m_ratio = static_cast<double>( obj->geometry().width() ) / - static_cast<double>( obj->geometry().height() ); - d->m_rectBeforeResize = obj->geometry(); + d->m_ratio = static_cast<double>( obj->tqgeometry().width() ) / + static_cast<double>( obj->tqgeometry().height() ); + d->m_rectBeforeResize = obj->tqgeometry(); } KoPoint docPoint ( doc()->unzoomPoint( _ev->pos() ) ); @@ -1816,7 +1816,7 @@ void Canvas::dropEvent( TQDropEvent * _ev ) } - b = _ev->encodedData( TextDrag::selectionMimeType() ); + b = _ev->tqencodedData( TextDrag::selectionMimeType() ); sheet->paste( b, TQRect( col, row, 1, 1 ), makeUndo ); if ( _ev->source() == this ) @@ -2150,13 +2150,13 @@ void Canvas::processEscapeKey(TQKeyEvent * event) case MT_RESIZE_RU: case MT_RESIZE_RD: { - TQRect oldBoundingRect = doc()->zoomRect( d->m_resizeObject->geometry()/*getRepaintRect()*/); + TQRect oldBoundingRect = doc()->zoomRect( d->m_resizeObject->tqgeometry()/*getRepaintRect()*/); d->m_resizeObject->setGeometry( d->m_rectBeforeResize ); oldBoundingRect.moveBy( (int)( -xOffset()*doc()->zoomedResolutionX() ) , (int)( -yOffset() * doc()->zoomedResolutionY()) ); activeSheet()->setRegionPaintDirty( oldBoundingRect ); - repaint( oldBoundingRect ); + tqrepaint( oldBoundingRect ); repaintObject( d->m_resizeObject ); d->m_ratio = 0.0; d->m_resizeObject = 0; @@ -3290,7 +3290,7 @@ KSpread::EmbeddedObject *Canvas::getObject( const TQPoint &pos, Sheet *_sheet ) { if ( itObject.current()->sheet() == _sheet ) { - KoRect const bound = ( itObject.current() )->geometry(); + KoRect const bound = ( itObject.current() )->tqgeometry(); TQRect zoomedBound = doc()->zoomRect( KoRect(bound.left(), bound.top(), bound.width(), bound.height() ) ); @@ -3429,7 +3429,7 @@ void Canvas::resizeObject( ModifyType _modType, const KoPoint & point, bool keep { EmbeddedObject *obj = d->m_resizeObject; - KoRect objRect = obj->geometry(); + KoRect objRect = obj->tqgeometry(); objRect.moveBy( -xOffset(), -yOffset() ); TQRect oldBoundingRect( doc()->zoomRect( objRect ) ); @@ -3440,22 +3440,22 @@ void Canvas::resizeObject( ModifyType _modType, const KoPoint & point, bool keep if ( _modType == MT_RESIZE_UP || _modType == MT_RESIZE_LU || _modType == MT_RESIZE_RU ) { top = true; -// snapStatus |= KoGuides::SNAP_HORIZ; +// snaptqStatus |= KoGuides::SNAP_HORIZ; } if ( _modType == MT_RESIZE_DN || _modType == MT_RESIZE_LD || _modType == MT_RESIZE_RD ) { bottom = true; -// snapStatus |= KoGuides::SNAP_HORIZ; +// snaptqStatus |= KoGuides::SNAP_HORIZ; } if ( _modType == MT_RESIZE_LF || _modType == MT_RESIZE_LU || _modType == MT_RESIZE_LD ) { left = true; -// snapStatus |= KoGuides::SNAP_VERT; +// snaptqStatus |= KoGuides::SNAP_VERT; } if ( _modType == MT_RESIZE_RT || _modType == MT_RESIZE_RU || _modType == MT_RESIZE_RD ) { right = true; -// snapStatus |= KoGuides::SNAP_VERT; +// snaptqStatus |= KoGuides::SNAP_VERT; } double newLeft = objRect.left(); @@ -3572,34 +3572,34 @@ void Canvas::resizeObject( ModifyType _modType, const KoPoint & point, bool keep // { // sp.setY( rect.bottom() ); // } -// m_gl.repaintSnapping( sp, snapStatus ); +// m_gl.repaintSnapping( sp, snaptqStatus ); // } - repaint( oldBoundingRect ); + tqrepaint( oldBoundingRect ); repaintObject( obj ); emit objectSizeChanged(); } } -void Canvas::finishResizeObject( const TQString &/*name*/, bool /*layout*/ ) +void Canvas::finishResizeObject( const TQString &/*name*/, bool /*tqlayout*/ ) { if ( d->m_resizeObject ) { - KoPoint move = KoPoint( d->m_resizeObject->geometry().x() - d->m_rectBeforeResize.x(), - d->m_resizeObject->geometry().y() - d->m_rectBeforeResize.y() ); - KoSize size = KoSize( d->m_resizeObject->geometry().width() - d->m_rectBeforeResize.width(), - d->m_resizeObject->geometry().height() - d->m_rectBeforeResize.height() ); + KoPoint move = KoPoint( d->m_resizeObject->tqgeometry().x() - d->m_rectBeforeResize.x(), + d->m_resizeObject->tqgeometry().y() - d->m_rectBeforeResize.y() ); + KoSize size = KoSize( d->m_resizeObject->tqgeometry().width() - d->m_rectBeforeResize.width(), + d->m_resizeObject->tqgeometry().height() - d->m_rectBeforeResize.height() ); - if ( ( d->m_resizeObject->geometry() ) != d->m_rectBeforeResize ) + if ( ( d->m_resizeObject->tqgeometry() ) != d->m_rectBeforeResize ) { ChangeObjectGeometryCommand *resizeCmd = new ChangeObjectGeometryCommand( d->m_resizeObject, move, size ); // the command is not executed as the object is allready resized. doc()->addCommand( resizeCmd ); } -// if ( layout ) -// doc()->layout( m_resizeObject ); +// if ( tqlayout ) +// doc()->tqlayout( m_resizeObject ); d->m_ratio = 0.0; d->m_isResizing = false; @@ -3669,7 +3669,7 @@ void Canvas::deleteEditor (bool saveChanges, bool array) TQString t = d->cellEditor->text(); // Delete the cell editor first and after that update the document. - // That means we get a synchronous repaint after the cell editor + // That means we get a synchronous tqrepaint after the cell editor // widget is gone. Otherwise we may get painting errors. delete d->cellEditor; d->cellEditor = 0; @@ -3775,7 +3775,7 @@ bool Canvas::createEditor( EditorType ed, bool addFocus, bool captureArrowKeys ) TQColor color = cell->format()->textColor( markerColumn(), markerRow() ); if ( !color.isValid() ) - color = TQApplication::palette().active().text(); + color = TQApplication::tqpalette().active().text(); g.setColor( TQColorGroup::Text, color); color = cell->bgColor( markerColumn(), markerRow() ); @@ -3819,8 +3819,8 @@ bool Canvas::createEditor( EditorType ed, bool addFocus, bool captureArrowKeys ) void Canvas::repaintObject( EmbeddedObject *obj ) { - //Calculate where the object appears on the canvas widget and then repaint that part of the widget - TQRect canvasRelativeGeometry = doc()->zoomRect( obj->geometry() ); + //Calculate where the object appears on the canvas widget and then tqrepaint that part of the widget + TQRect canvasRelativeGeometry = doc()->zoomRect( obj->tqgeometry() ); canvasRelativeGeometry.moveBy( (int)( -xOffset()*doc()->zoomedResolutionX() ) , (int)( -yOffset() * doc()->zoomedResolutionY()) ); @@ -3828,17 +3828,17 @@ void Canvas::repaintObject( EmbeddedObject *obj ) /* if ( !obj->isSelected() ) { - KoRect g = obj->geometry(); + KoRect g = obj->tqgeometry(); g.moveBy( -xOffset(), -yOffset() ); - TQRect geometry( doc()->zoomRect( g ) ); + TQRect tqgeometry( doc()->zoomRect( g ) ); - update( geometry ); + update( tqgeometry ); } else { TQPainter p(this); p.translate( -xOffset() * doc()->zoomedResolutionX() , -yOffset() * doc()->zoomedResolutionY() ); - obj->draw(&p); //this goes faster than calling repaint + obj->draw(&p); //this goes faster than calling tqrepaint p.end(); }*/ } @@ -3888,7 +3888,7 @@ void Canvas::copyOasisObjects() for( ; itObject.current(); ++itObject ) { if ( itObject.current()->isSelected() ) - p.drawPixmap( itObject.current()->geometry().toTQRect().left() - r.left(), itObject.current()->geometry().toTQRect().top() - r.top(), itObject.current()->toPixmap( 1.0 , 1.0 ) ); + p.drawPixmap( itObject.current()->tqgeometry().toTQRect().left() - r.left(), itObject.current()->tqgeometry().toTQRect().top() - r.top(), itObject.current()->toPixmap( 1.0 , 1.0 ) ); } p.end(); if (!pixmap.isNull()) @@ -3899,7 +3899,7 @@ void Canvas::copyOasisObjects() } TQDragObject *dragObject = multiDrag; - TQApplication::clipboard()->setData( dragObject, TQClipboard::Clipboard ); + TQApplication::tqclipboard()->setData( dragObject, TQClipboard::Clipboard ); } void Canvas::closeEditor() @@ -4064,7 +4064,7 @@ void Canvas::paintUpdates() } else { - matrix = painter.worldMatrix(); + matrix = painter.tqworldMatrix(); } @@ -4109,7 +4109,7 @@ void Canvas::paintUpdates() { cell = sheet->cellAt( x, y ); - // recalc and relayout only for non default cells + // recalc and retqlayout only for non default cells if (!cell->isDefault()) { if (cell->calcDirtyFlag()) cell->calc(); @@ -4202,7 +4202,7 @@ void Canvas::paintUpdates() paintHighlightedRanges(painter, unzoomedRect); paintNormalMarker(painter, unzoomedRect); - //restore clip region with children area + //restore clip region with tqchildren area painter.restore(); //painter.setClipRegion( rgnComplete ); } @@ -4223,7 +4223,7 @@ void Canvas::clipoutChildren( TQPainter& painter ) const { if ( ( itObject.current() )->sheet() == activeSheet() ) { - TQRect childGeometry = doc()->zoomRect( itObject.current()->geometry()); + TQRect childGeometry = doc()->zoomRect( itObject.current()->tqgeometry()); //The clipping region is given in device coordinates //so subtract the current offset (scroll position) of the canvas @@ -4232,7 +4232,7 @@ void Canvas::clipoutChildren( TQPainter& painter ) const if (painter.window().intersects(childGeometry)) rgn -= childGeometry; - //painter.fillRect( doc()->zoomRect( itObject.current()->geometry() ), TQColor("red" ) ); + //painter.fillRect( doc()->zoomRect( itObject.current()->tqgeometry() ), TQColor("red" ) ); } } @@ -4263,11 +4263,11 @@ void Canvas::paintChildren( TQPainter& painter, TQWMatrix& /*matrix*/ ) for( ; itObject.current(); ++itObject ) { - TQRect const zoomedObjectGeometry = doc()->zoomRect( itObject.current()->geometry() ); + TQRect const zoomedObjectGeometry = doc()->zoomRect( itObject.current()->tqgeometry() ); if ( ( itObject.current() )->sheet() == activeSheet() && zoomedWindowGeometry.intersects( zoomedObjectGeometry ) ) { - //To prevent unnecessary redrawing of the embedded object, we only repaint + //To prevent unnecessary redrawing of the embedded object, we only tqrepaint //if one or more of the cells underneath the object has been marked as 'dirty'. TQRect canvasRelativeGeometry = zoomedObjectGeometry; @@ -4656,7 +4656,7 @@ VBorder::~VBorder() delete m_scrollTimer; } -TQSize VBorder::sizeHint() const +TQSize VBorder::tqsizeHint() const { return TQSize( 40, 10 ); } @@ -5036,9 +5036,9 @@ void VBorder::paintSizeIndicator( int mouseY, bool firstTime ) TQString tmpSize; if ( m_iResizePos != y ) - tmpSize = i18n("Height: %1 %2").arg( KoUnit::toUserValue( m_pCanvas->doc()->unzoomItY( m_iResizePos - y ), + tmpSize = i18n("Height: %1 %2").tqarg( KoUnit::toUserValue( m_pCanvas->doc()->unzoomItY( m_iResizePos - y ), m_pView->doc()->unit() ) ) - .arg( m_pView->doc()->unitName() ); + .tqarg( m_pView->doc()->unitName() ); else tmpSize = i18n( "Hide Row" ); @@ -5057,7 +5057,7 @@ void VBorder::paintSizeIndicator( int mouseY, bool firstTime ) else m_lSize->setGeometry( 3, y + 3, len + 2,hei + 2 ); - m_lSize->setAlignment( TQt::AlignVCenter ); + m_lSize->tqsetAlignment( TQt::AlignVCenter ); m_lSize->setText( tmpSize ); m_lSize->setPalette( TQToolTip::palette() ); m_lSize->show(); @@ -5095,7 +5095,7 @@ void VBorder::paintEvent( TQPaintEvent* _ev ) TQColor highlightColor = View::highlightColor(); TQPen pen( TQt::black, 1 ); painter.setPen( pen ); - // painter.setBackgroundColor( colorGroup().base() ); + // painter.setBackgroundColor( tqcolorGroup().base() ); // painter.eraseRect( _ev->rect() ); @@ -5146,7 +5146,7 @@ void VBorder::paintEvent( TQPaintEvent* _ev ) } else { - TQColor c = colorGroup().background(); + TQColor c = tqcolorGroup().background(); TQBrush fill( c ); qDrawPlainRect ( &painter, 0, zoomedYPos, width, height+1, c.dark(150), 1, &fill ); @@ -5156,10 +5156,10 @@ void VBorder::paintEvent( TQPaintEvent* _ev ) // Reset painter painter.setFont( normalFont ); - painter.setPen( colorGroup().text() ); + painter.setPen( tqcolorGroup().text() ); if ( selected ) - painter.setPen( colorGroup().highlightedText() ); + painter.setPen( tqcolorGroup().highlightedText() ); else if ( highlighted ) painter.setFont( boldFont ); @@ -5212,7 +5212,7 @@ HBorder::~HBorder() delete m_scrollTimer; } -TQSize HBorder::sizeHint() const +TQSize HBorder::tqsizeHint() const { return TQSize( 40, 10 ); } @@ -5738,9 +5738,9 @@ void HBorder::paintSizeIndicator( int mouseX, bool firstTime ) TQString tmpSize; if ( m_iResizePos != x ) tmpSize = i18n("Width: %1 %2") - .arg( KGlobal::locale()->formatNumber( KoUnit::toUserValue( m_pCanvas->doc()->unzoomItX( (sheet->layoutDirection()==Sheet::RightToLeft) ? x - m_iResizePos : m_iResizePos - x ), + .tqarg( KGlobal::locale()->formatNumber( KoUnit::toUserValue( m_pCanvas->doc()->unzoomItX( (sheet->layoutDirection()==Sheet::RightToLeft) ? x - m_iResizePos : m_iResizePos - x ), m_pView->doc()->unit() ))) - .arg( m_pView->doc()->unitName() ); + .tqarg( m_pView->doc()->unitName() ); else tmpSize = i18n( "Hide Column" ); @@ -5758,7 +5758,7 @@ void HBorder::paintSizeIndicator( int mouseX, bool firstTime ) else m_lSize->setGeometry( x + 3, 3, len + 2, hei + 2 ); - m_lSize->setAlignment( TQt::AlignVCenter ); + m_lSize->tqsetAlignment( TQt::AlignVCenter ); m_lSize->setText( tmpSize ); m_lSize->setPalette( TQToolTip::palette() ); m_lSize->show(); @@ -5866,7 +5866,7 @@ void HBorder::paintEvent( TQPaintEvent* _ev ) } else { - TQColor c = colorGroup().background(); + TQColor c = tqcolorGroup().background(); TQBrush fill( c ); qDrawPlainRect ( &painter, zoomedXPos, 0, width+1, height, c.dark(150), 1, &fill ); @@ -5874,10 +5874,10 @@ void HBorder::paintEvent( TQPaintEvent* _ev ) // Reset painter painter.setFont( normalFont ); - painter.setPen( colorGroup().text() ); + painter.setPen( tqcolorGroup().text() ); if ( selected ) - painter.setPen( colorGroup().highlightedText() ); + painter.setPen( tqcolorGroup().highlightedText() ); else if ( highlighted ) painter.setFont( boldFont ); if ( !m_pView->activeSheet()->getShowColumnNumber() ) @@ -5929,7 +5929,7 @@ void HBorder::paintEvent( TQPaintEvent* _ev ) } else { - TQColor c = colorGroup().background(); + TQColor c = tqcolorGroup().background(); TQBrush fill( c ); qDrawPlainRect ( &painter, zoomedXPos, 0, width+1, height, c.dark(150), 1, &fill ); @@ -5937,10 +5937,10 @@ void HBorder::paintEvent( TQPaintEvent* _ev ) // Reset painter painter.setFont( normalFont ); - painter.setPen( colorGroup().text() ); + painter.setPen( tqcolorGroup().text() ); if ( selected ) - painter.setPen( colorGroup().highlightedText() ); + painter.setPen( tqcolorGroup().highlightedText() ); else if ( highlighted ) painter.setFont( boldFont ); if ( !m_pView->activeSheet()->getShowColumnNumber() ) @@ -5991,7 +5991,7 @@ ToolTip::ToolTip( Canvas* canvas ) // this is a hack of course, because it's not available from TQToolTip TQLabel *tip_findLabel() { - TQWidgetList *list = TQApplication::allWidgets(); + TQWidgetList *list = TQApplication::tqallWidgets(); TQWidgetListIt it( *list ); TQWidget * w; while ( (w=it.current()) != 0 ) |