qt3support-- / warning--

svn path=/trunk/KDE/kdegraphics/kpdf/; revision=479237
remotes/origin/kpdf
Laurent Montel 21 years ago
parent 9251a80928
commit b734531e6f
  1. 20
      ui/pageview.cpp
  2. 2
      ui/pageviewutils.cpp
  3. 2
      ui/presentationwidget.cpp
  4. 8
      ui/propertiesdialog.cpp
  5. 2
      ui/thumbnaillist.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(),

@ -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 );

@ -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<QRect> 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() );

@ -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);
}

@ -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;

Loading…
Cancel
Save