From eba1d381626d92b860239417f21d813f02ee6394 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 19 Dec 2011 11:35:39 -0600 Subject: Remove additional unneeded tq method conversions --- src/gvcore/imageview.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/gvcore/imageview.cpp') diff --git a/src/gvcore/imageview.cpp b/src/gvcore/imageview.cpp index f9da66f..cbfc459 100644 --- a/src/gvcore/imageview.cpp +++ b/src/gvcore/imageview.cpp @@ -113,7 +113,7 @@ as approximate as possible). However when converting from widget to image and ba this can result in the final rectangle being smaller than the original. The widgetToImageBounding() function converts from widget to image coordinates in a way which makes sure the reverse conversion will be at least as large -as the original tqgeometry. +as the original geometry. There are no conversion functions for only width/height, as their conversion depends on the position (because of the rounding etc.). For similar reasons @@ -257,7 +257,7 @@ struct ImageView::Private { const double zoomValues[] = { 0.5, 1, 2 }; int nbValues=sizeof(zoomValues) / sizeof(double); for (int pos=0; posinsertItem(txt); } } @@ -423,7 +423,7 @@ ImageView::~ImageView() { void ImageView::slotLoaded() { if (d->mDocument->isNull()) { resizeContents(0,0); - viewport()->tqrepaint(false); + viewport()->repaint(false); return; } @@ -488,7 +488,7 @@ KToggleAction* ImageView::zoomToFit() const { void ImageView::updateFromSettings() { - // Reset, so that next tqrepaint doesn't possibly take longer because of + // Reset, so that next repaint doesn't possibly take longer because of // smoothing ImageViewConfig::setMaxRepaintSize(DEFAULT_MAX_REPAINT_SIZE); ImageViewConfig::setMaxScaleRepaintSize(DEFAULT_MAX_REPAINT_SIZE); @@ -625,7 +625,7 @@ void ImageView::drawContents(TQPainter* painter,int clipx,int clipy,int clipw,in TQRect widgetRect = TQRect(0, 0, visibleWidth(), visibleHeight()); TQRegion region = TQRegion(widgetRect) - imageRect; - TQMemArray rects = region.tqrects(); + TQMemArray rects = region.rects(); for(unsigned int pos = 0; pos < rects.count(); ++pos ) { painter->eraseRect(rects[pos]); } @@ -701,7 +701,7 @@ void ImageView::limitPaintSize( PendingPaint& paint ) { // don't paint more than max_size pixels at a time int maxHeight = ( maxSize + paint.rect.width() - 1 ) / paint.rect.width(); // round up maxHeight = TQMAX( maxHeight, 5 ); // at least 5 lines together - // can't tqrepaint whole paint at once, adjust height and schedule the rest + // can't repaint whole paint at once, adjust height and schedule the rest if( maxHeight < paint.rect.height()) { TQRect remaining = paint.rect; remaining.setTop( remaining.top() + maxHeight ); @@ -781,12 +781,12 @@ void ImageView::slotBusyLevelChanged( BusyLevel level ) { // How to do painting: // When something needs to be erased: TQPainter on viewport and eraseRect() // When whole picture needs to be repainted: fullRepaint() -// When a part of the picture needs to be updated: viewport()->tqrepaint(area,false) +// When a part of the picture needs to be updated: viewport()->repaint(area,false) // All other paints will be changed to progressive painting. void ImageView::fullRepaint() { if( !viewport()->isUpdatesEnabled()) return; cancelPending(); - viewport()->tqrepaint(false); + viewport()->repaint(false); } void ImageView::cancelPending() { @@ -832,7 +832,7 @@ void ImageView::performPaint( TQPainter* painter, int clipx, int clipy, int clip int extraPixels = ImageUtils::extraScalePixels( smoothAlgo, zoom()); TQRect imageRect = d->widgetToImageBounding( TQRect(clipx,clipy,clipw,cliph), extraPixels ); imageRect = imageRect.intersect( TQRect( 0, 0, d->mDocument->width(), d->mDocument->height())); - TQMemArray< TQRect > rects = TQRegion(d->mValidImageArea.intersect( imageRect )).tqrects(); + TQMemArray< TQRect > rects = TQRegion(d->mValidImageArea.intersect( imageRect )).rects(); for( unsigned int i = 1; i < rects.count(); ++i ) { addPendingPaint( secondPass, d->imageToWidget( rects[ i ] )); } @@ -1024,7 +1024,7 @@ bool ImageView::eventFilter(TQObject* obj, TQEvent* event) { return true; // Getting/loosing focus causes repaints, but repainting here is expensive, - // and there's no need to tqrepaint on focus changes, as the focus is not + // and there's no need to repaint on focus changes, as the focus is not // indicated. case TQEvent::FocusIn: case TQEvent::FocusOut: @@ -1313,7 +1313,7 @@ void ImageView::slotImageSizeUpdated() { void ImageView::slotImageRectUpdated(const TQRect& imageRect) { d->mValidImageArea += imageRect; - viewport()->tqrepaint( d->imageToWidget( imageRect ), false ); + viewport()->repaint( d->imageToWidget( imageRect ), false ); } @@ -1339,7 +1339,7 @@ double ImageView::computeZoomToFit() const { return 1.0; } TQSize size=d->mDocument->image().size(); - size.tqscale(width(),height(),TQSize::ScaleMin); + size.scale(width(),height(),TQSize::ScaleMin); double zoom=double(size.width())/d->mDocument->width(); if (zoom>1.0 && !ImageViewConfig::enlargeSmallImages()) return 1.0; @@ -1350,7 +1350,7 @@ double ImageView::computeZoomToWidth() const { if (d->mDocument->isNull()) { return 1.0; } - int sw = verticalScrollBar()->sizeHint().width(); // tqgeometry is not valid before first show() + int sw = verticalScrollBar()->sizeHint().width(); // geometry is not valid before first show() int w = width(); int dw = d->mDocument->width(); switch( vScrollBarMode()) { @@ -1425,7 +1425,7 @@ void ImageView::updateImageOffset() { int zpixHeight=int(d->mDocument->height() * d->mZoom); if (zpixWidth>viewWidth && hScrollBarMode()!=AlwaysOff) { - // use sizeHint() - tqgeometry is not valid before first show() + // use sizeHint() - geometry is not valid before first show() viewHeight-=horizontalScrollBar()->sizeHint().height(); } if (zpixHeight>viewHeight && vScrollBarMode()!=AlwaysOff) { @@ -1457,7 +1457,7 @@ void ImageView::updateZoomActions() { if (d->mZoomMode==ZOOM_FREE) { d->mZoomIn->setEnabled(d->mZoommZoomOut->setEnabled(d->mZoom>1/MAX_ZOOM); - TQString zoomText=TQString("%1%").tqarg(int(d->mZoom*100)); + TQString zoomText=TQString("%1%").arg(int(d->mZoom*100)); d->mZoomCombo->setCurrentText(zoomText); } else { d->mZoomIn->setEnabled(true); -- cgit v1.2.1