From b734531e6ffac5f1436eddcfca00a0aa6cc99b1b Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Wed, 9 Nov 2005 18:23:36 +0000 Subject: [PATCH] qt3support-- / warning-- svn path=/trunk/KDE/kdegraphics/kpdf/; revision=479237 --- ui/pageview.cpp | 20 ++++++++++---------- ui/pageviewutils.cpp | 2 +- ui/presentationwidget.cpp | 2 +- ui/propertiesdialog.cpp | 8 ++++---- ui/thumbnaillist.cpp | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/ui/pageview.cpp b/ui/pageview.cpp index 8f7e0f117..938e3eeab 100644 --- a/ui/pageview.cpp +++ b/ui/pageview.cpp @@ -586,7 +586,7 @@ void PageView::keyPressEvent( QKeyEvent * e ) bool found = d->document->searchText( PAGEVIEW_SEARCH_ID, d->typeAheadString, true, false, KPDFDocument::NextMatch, true, qRgb( 128, 255, 128 ), true ); QString status = found ? i18n("Text found: \"%1\".") : i18n("Text not found: \"%1\"."); - d->messageWindow->display( status.arg(d->typeAheadString.lower()), + d->messageWindow->display( status.arg(d->typeAheadString.toLower()), found ? PageViewMessage::Find : PageViewMessage::Warning, 4000 ); d->findTimeoutTimer->start( 3000, true ); } @@ -606,7 +606,7 @@ void PageView::keyPressEvent( QKeyEvent * e ) // because it activates the accel releaseKeyboard(); if ( d->document->continueSearch( PAGEVIEW_SEARCH_ID ) ) - d->messageWindow->display( i18n("Text found: \"%1\".").arg(d->typeAheadString.lower()), + d->messageWindow->display( i18n("Text found: \"%1\".").arg(d->typeAheadString.toLower()), PageViewMessage::Find, 3000 ); d->findTimeoutTimer->start( 3000, true ); // it is needed to grab the keyboard becase people may have Space assigned to a @@ -626,7 +626,7 @@ void PageView::keyPressEvent( QKeyEvent * e ) bool found = d->document->searchText( PAGEVIEW_SEARCH_ID, d->typeAheadString, false, false, KPDFDocument::NextMatch, true, qRgb( 128, 255, 128 ), true ); QString status = found ? i18n("Text found: \"%1\".") : i18n("Text not found: \"%1\"."); - d->messageWindow->display( status.arg(d->typeAheadString.lower()), + d->messageWindow->display( status.arg(d->typeAheadString.toLower()), found ? PageViewMessage::Find : PageViewMessage::Warning, 4000 ); d->findTimeoutTimer->start( 3000, true ); } @@ -953,7 +953,7 @@ void PageView::contentsMouseReleaseEvent( QMouseEvent * e ) } // find out new zoom ratio and normalized view center (relative to the contentsRect) - double zoom = QMIN( (double)visibleWidth() / (double)selRect.width(), (double)visibleHeight() / (double)selRect.height() ); + double zoom = qMin( (double)visibleWidth() / (double)selRect.width(), (double)visibleHeight() / (double)selRect.height() ); double nX = (double)(selRect.left() + selRect.right()) / (2.0 * (double)contentsWidth()); double nY = (double)(selRect.top() + selRect.bottom()) / (2.0 * (double)contentsHeight()); @@ -1066,7 +1066,7 @@ void PageView::contentsMouseReleaseEvent( QMouseEvent * e ) QString type( KImageIO::type( fileName ) ); if ( type.isNull() ) type = "PNG"; - copyPix.save( fileName, type.latin1() ); + copyPix.save( fileName, type.toLatin1() ); d->messageWindow->display( i18n( "Image [%1x%2] saved to %3 file." ).arg( copyPix.width() ).arg( copyPix.height() ).arg( type ) ); } } @@ -1307,7 +1307,7 @@ void PageView::updateItemSize( PageViewItem * item, int colWidth, int rowHeight { double scaleW = (double)colWidth / (double)width; double scaleH = (double)rowHeight / (double)height; - zoom = QMIN( scaleW, scaleH ); + zoom = qMin( scaleW, scaleH ); item->setWHZ( (int)(zoom * width), (int)(zoom * height), zoom ); d->zoomFactor = zoom; } @@ -1351,8 +1351,8 @@ void PageView::selectionEndPoint( int x, int y ) { // clip selection to the viewport QRect viewportRect( contentsX(), contentsY(), visibleWidth(), visibleHeight() ); - x = QMAX( QMIN( x, viewportRect.right() ), viewportRect.left() ); - y = QMAX( QMIN( y, viewportRect.bottom() ), viewportRect.top() ); + x = qMax( qMin( x, viewportRect.right() ), viewportRect.left() ); + y = qMax( qMin( y, viewportRect.bottom() ), viewportRect.top() ); // if selection changed update rect if ( d->mouseSelectionRect.right() != x || d->mouseSelectionRect.bottom() != y ) { @@ -1458,7 +1458,7 @@ void PageView::updateZoomText() { // use current page zoom as zoomFactor if in ZoomFit/* mode if ( d->zoomMode != ZoomFixed && d->items.count() > 0 ) - d->zoomFactor = d->items[ QMAX( 0, (int)d->document->currentPage() ) ]->zoomFactor(); + d->zoomFactor = d->items[ qMax( 0, (int)d->document->currentPage() ) ]->zoomFactor(); float newFactor = d->zoomFactor; d->aZoom->clear(); @@ -1622,7 +1622,7 @@ void PageView::slotRelayoutPages() } else // viewContinuous is FALSE { - PageViewItem * currentItem = d->items[ QMAX( 0, (int)d->document->currentPage() ) ]; + PageViewItem * currentItem = d->items[ qMax( 0, (int)d->document->currentPage() ) ]; // setup varialbles for a 1(row) x N(columns) grid int nCols = KpdfSettings::viewColumns(), diff --git a/ui/pageviewutils.cpp b/ui/pageviewutils.cpp index c1c4c00ac..3a8488207 100644 --- a/ui/pageviewutils.cpp +++ b/ui/pageviewutils.cpp @@ -73,7 +73,7 @@ void PageViewMessage::display( const QString & message, Icon icon, int durationM } textXOffset = 2 + symbol.width(); width += textXOffset; - height = QMAX( height, symbol.height() ); + height = qMax( height, symbol.height() ); } QRect geometry( 0, 0, width + 10, height + 8 ); QRect geometry2( 0, 0, width + 9, height + 7 ); diff --git a/ui/presentationwidget.cpp b/ui/presentationwidget.cpp index 6331252ed..b753889d7 100644 --- a/ui/presentationwidget.cpp +++ b/ui/presentationwidget.cpp @@ -578,7 +578,7 @@ void PresentationWidget::generateContentsPage( int pageNum, QPainter & p ) // fill unpainted areas with background color QRegion unpainted( QRect( 0, 0, m_width, m_height ) ); QVector rects = unpainted.subtract( frame->geometry ).rects(); - for ( uint i = 0; i < rects.count(); i++ ) + for ( int i = 0; i < rects.count(); i++ ) { const QRect & r = rects[i]; p.fillRect( r, KpdfSettings::slidesBackgroundColor() ); diff --git a/ui/propertiesdialog.cpp b/ui/propertiesdialog.cpp index 1288a9daa..cefa2f262 100644 --- a/ui/propertiesdialog.cpp +++ b/ui/propertiesdialog.cpp @@ -34,7 +34,7 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, KPDFDocument *doc) } // mime name based on mimetype id - QString mimeName = info->get( "mimeType" ).section( '/', -1 ).upper(); + QString mimeName = info->get( "mimeType" ).section( '/', -1 ).toUpper(); setCaption( i18n("%1 Properties").arg( mimeName ) ); QDomElement docElement = info->documentElement(); @@ -57,7 +57,7 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, KPDFDocument *doc) row++; // refine maximum width of 'value' labels - valMaxWidth = QMAX( valMaxWidth, fontMetrics().width( valueString ) ); + valMaxWidth = qMax( valMaxWidth, fontMetrics().width( valueString ) ); } // add the number of pages if the generator hasn't done it already @@ -85,10 +85,10 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, KPDFDocument *doc) int width = layout->minimumSize().width() + valMaxWidth + marginHint() + spacingHint() + marginHint() + 30; if (page2Layout) { - width = QMAX( width, page2Layout->sizeHint().width() + marginHint() + spacingHint() + 31 ); + width = qMax( width, page2Layout->sizeHint().width() + marginHint() + spacingHint() + 31 ); } // stay inside the 2/3 of the screen width QRect screenContainer = KGlobalSettings::desktopGeometry( this ); - width = QMIN( width, 2*screenContainer.width()/3 ); + width = qMin( width, 2*screenContainer.width()/3 ); resize(width, 1); } diff --git a/ui/thumbnaillist.cpp b/ui/thumbnaillist.cpp index d313770ed..54eb28758 100644 --- a/ui/thumbnaillist.cpp +++ b/ui/thumbnaillist.cpp @@ -170,7 +170,7 @@ void ThumbnailList::notifyViewportChanged( bool /*smoothMove*/ ) m_selected->setSelected( true ); if ( KpdfSettings::syncThumbnailsViewport() ) { - int yOffset = QMAX( visibleHeight() / 4, m_selected->height() / 2 ); + int yOffset = qMax( visibleHeight() / 4, m_selected->height() / 2 ); ensureVisible( 0, childY( m_selected ) + m_selected->height()/2, 0, yOffset ); } break;