diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:55:46 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:55:46 -0600 |
commit | 676f6ed378c861a872de8cfce3dd5efe1780f769 (patch) | |
tree | d2b21aa5311322aadc3c5c64a4932fdf371acc98 /src/gvcore/imageview.cpp | |
parent | 2b7143e0539396c75306f6e78bf0a5641ed1acfc (diff) | |
download | gwenview-676f6ed378c861a872de8cfce3dd5efe1780f769.tar.gz gwenview-676f6ed378c861a872de8cfce3dd5efe1780f769.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 2b7143e0539396c75306f6e78bf0a5641ed1acfc.
Diffstat (limited to 'src/gvcore/imageview.cpp')
-rw-r--r-- | src/gvcore/imageview.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/gvcore/imageview.cpp b/src/gvcore/imageview.cpp index cbfc459..a6c5b9f 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 geometry. +as the original tqgeometry. 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; pos<nbValues; ++pos) { - TQString txt=TQString("%1%").arg( int(zoomValues[pos]*100) ); + TQString txt=TQString("%1%").tqarg( int(zoomValues[pos]*100) ); mZoomCombo->insertItem(txt); } } @@ -423,7 +423,7 @@ ImageView::~ImageView() { void ImageView::slotLoaded() { if (d->mDocument->isNull()) { resizeContents(0,0); - viewport()->repaint(false); + viewport()->tqrepaint(false); return; } @@ -488,7 +488,7 @@ KToggleAction* ImageView::zoomToFit() const { void ImageView::updateFromSettings() { - // Reset, so that next repaint doesn't possibly take longer because of + // Reset, so that next tqrepaint 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<TQRect> rects = region.rects(); + TQMemArray<TQRect> rects = region.tqrects(); 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 repaint whole paint at once, adjust height and schedule the rest + // can't tqrepaint 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()->repaint(area,false) +// When a part of the picture needs to be updated: viewport()->tqrepaint(area,false) // All other paints will be changed to progressive painting. void ImageView::fullRepaint() { if( !viewport()->isUpdatesEnabled()) return; cancelPending(); - viewport()->repaint(false); + viewport()->tqrepaint(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 )).rects(); + TQMemArray< TQRect > rects = TQRegion(d->mValidImageArea.intersect( imageRect )).tqrects(); 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 repaint on focus changes, as the focus is not + // and there's no need to tqrepaint 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()->repaint( d->imageToWidget( imageRect ), false ); + viewport()->tqrepaint( d->imageToWidget( imageRect ), false ); } @@ -1339,7 +1339,7 @@ double ImageView::computeZoomToFit() const { return 1.0; } TQSize size=d->mDocument->image().size(); - size.scale(width(),height(),TQSize::ScaleMin); + size.tqscale(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(); // geometry is not valid before first show() + int sw = verticalScrollBar()->tqsizeHint().width(); // tqgeometry is not valid before first show() int w = width(); int dw = d->mDocument->width(); switch( vScrollBarMode()) { @@ -1370,7 +1370,7 @@ double ImageView::computeZoomToHeight() const { if (d->mDocument->isNull()) { return 1.0; } - int sh = horizontalScrollBar()->sizeHint().height(); + int sh = horizontalScrollBar()->tqsizeHint().height(); int h = height(); int dh = d->mDocument->height(); switch( vScrollBarMode()) { @@ -1425,11 +1425,11 @@ void ImageView::updateImageOffset() { int zpixHeight=int(d->mDocument->height() * d->mZoom); if (zpixWidth>viewWidth && hScrollBarMode()!=AlwaysOff) { - // use sizeHint() - geometry is not valid before first show() - viewHeight-=horizontalScrollBar()->sizeHint().height(); + // use tqsizeHint() - tqgeometry is not valid before first show() + viewHeight-=horizontalScrollBar()->tqsizeHint().height(); } if (zpixHeight>viewHeight && vScrollBarMode()!=AlwaysOff) { - viewWidth-=verticalScrollBar()->sizeHint().width(); + viewWidth-=verticalScrollBar()->tqsizeHint().width(); } d->mXOffset=TQMAX(0,(viewWidth-zpixWidth)/2); @@ -1457,7 +1457,7 @@ void ImageView::updateZoomActions() { if (d->mZoomMode==ZOOM_FREE) { d->mZoomIn->setEnabled(d->mZoom<MAX_ZOOM); d->mZoomOut->setEnabled(d->mZoom>1/MAX_ZOOM); - TQString zoomText=TQString("%1%").arg(int(d->mZoom*100)); + TQString zoomText=TQString("%1%").tqarg(int(d->mZoom*100)); d->mZoomCombo->setCurrentText(zoomText); } else { d->mZoomIn->setEnabled(true); |