summaryrefslogtreecommitdiffstats
path: root/src/gvcore/imageview.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-15 15:29:45 -0600
committerTimothy Pearson <[email protected]>2011-12-15 15:29:45 -0600
commit2b7143e0539396c75306f6e78bf0a5641ed1acfc (patch)
treedb4ea3490b6703f775f11931c6e7c22f943816bd /src/gvcore/imageview.cpp
parentff1cff2a1e9b7860d4d3779cf20bf79afbe52470 (diff)
downloadgwenview-2b7143e0539396c75306f6e78bf0a5641ed1acfc.tar.gz
gwenview-2b7143e0539396c75306f6e78bf0a5641ed1acfc.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'src/gvcore/imageview.cpp')
-rw-r--r--src/gvcore/imageview.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/gvcore/imageview.cpp b/src/gvcore/imageview.cpp
index a6c5b9f..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; pos<nbValues; ++pos) {
- TQString txt=TQString("%1%").tqarg( int(zoomValues[pos]*100) );
+ TQString txt=TQString("%1%").arg( int(zoomValues[pos]*100) );
mZoomCombo->insertItem(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<TQRect> rects = region.tqrects();
+ TQMemArray<TQRect> 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()->tqsizeHint().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()) {
@@ -1370,7 +1370,7 @@ double ImageView::computeZoomToHeight() const {
if (d->mDocument->isNull()) {
return 1.0;
}
- int sh = horizontalScrollBar()->tqsizeHint().height();
+ int sh = horizontalScrollBar()->sizeHint().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 tqsizeHint() - tqgeometry is not valid before first show()
- viewHeight-=horizontalScrollBar()->tqsizeHint().height();
+ // use sizeHint() - geometry is not valid before first show()
+ viewHeight-=horizontalScrollBar()->sizeHint().height();
}
if (zpixHeight>viewHeight && vScrollBarMode()!=AlwaysOff) {
- viewWidth-=verticalScrollBar()->tqsizeHint().width();
+ viewWidth-=verticalScrollBar()->sizeHint().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%").tqarg(int(d->mZoom*100));
+ TQString zoomText=TQString("%1%").arg(int(d->mZoom*100));
d->mZoomCombo->setCurrentText(zoomText);
} else {
d->mZoomIn->setEnabled(true);