some more compile changes, now let's see basketball

svn path=/branches/work/kde4/playground/graphics/okular/; revision=521882
remotes/origin/old/work/newpageview
Albert Astals Cid 20 years ago
parent b261381531
commit cbb8e80154
  1. 4
      core/annotations.cpp
  2. 4
      core/annotations.h
  3. 2
      core/area.h
  4. 4
      shell/shell.cpp
  5. 32
      ui/pagepainter.cpp
  6. 2
      ui/pagepainter.h

@ -633,7 +633,7 @@ void HighlightAnnotation::store( QDomNode & node, QDomDocument & document ) cons
if ( highlightQuads.count() < 1 )
return;
// append highlight quads, all children describe quads
QLinkedList< Quad >::const_iterator it = highlightQuads.begin(), end = highlightQuads.end();
QList< Quad >::const_iterator it = highlightQuads.begin(), end = highlightQuads.end();
for ( ; it != end; ++it )
{
QDomElement quadElement = document.createElement( "quad" );
@ -765,7 +765,7 @@ void InkAnnotation::store( QDomNode & node, QDomDocument & document ) const
// append the optional attributes
if ( inkPaths.count() < 1 )
return;
QLinkedList< QLinkedList<NormalizedPoint> >::const_iterator pIt = inkPaths.begin(), pEnd = inkPaths.end();
QList< QLinkedList<NormalizedPoint> >::const_iterator pIt = inkPaths.begin(), pEnd = inkPaths.end();
for ( ; pIt != pEnd; ++pIt )
{
QDomElement pathElement = document.createElement( "path" );

@ -219,7 +219,7 @@ struct HighlightAnnotation : public Annotation
bool capEnd; // false (vtx 2-3) [K]
double feather; // 0.1 (in range 0..1) [K]
};
QLinkedList< Quad > highlightQuads; // not empty
QList< Quad > highlightQuads; // not empty
};
struct StampAnnotation : public Annotation
@ -237,7 +237,7 @@ struct InkAnnotation : public Annotation
AN_COMMONDECL( InkAnnotation, AInk )
// data fields
QLinkedList< QLinkedList<NormalizedPoint> > inkPaths;
QList< QLinkedList<NormalizedPoint> > inkPaths;
};
#endif

@ -255,7 +255,7 @@ RegularArea<NormalizedShape, Shape>::geometry( int xScale, int yScale, int dx, i
QList<Shape>* ret=new QList<Shape>;
Shape t;
foreach(const NormalizedShape ns, this)
foreach(const NormalizedShape ns, *this)
{
t=ns->geometry(xScale,yScale);
t.moveBy(dx,dy);

@ -126,8 +126,8 @@ void Shell::openURL( const KUrl & url )
if ( m_part )
{
bool openOk = m_part->openURL( url );
if ( openOk ) m_recent->addURL( url );
else m_recent->removeURL( url );
if ( openOk ) m_recent->addUrl( url );
else m_recent->removeUrl( url );
m_printAction->setEnabled( openOk );
}
}

@ -83,9 +83,9 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const KPDFPage * p
// vectors containing objects to draw
// make this a qcolor, rect map, since we dont need
// to know s_id here! we are only drawing this right?
QValueList< QPair<QColor, NormalizedRect *> > * bufferedHighlights = 0;
QValueList< Annotation * > * bufferedAnnotations = 0;
QValueList< Annotation * > * unbufferedAnnotations = 0;
QList< QPair<QColor, NormalizedRect *> > * bufferedHighlights = 0;
QList< Annotation * > * bufferedAnnotations = 0;
QList< Annotation * > * unbufferedAnnotations = 0;
// fill up lists with visible annotation/highlight objects
if ( canDrawHighlights || canDrawAnnotations )
{
@ -98,13 +98,13 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const KPDFPage * p
if ( canDrawHighlights )
{
if ( !bufferedHighlights )
bufferedHighlights = new QValueList< QPair<QColor, NormalizedRect *> >();
bufferedHighlights = new QList< QPair<QColor, NormalizedRect *> >();
/* else
{*/
NormalizedRect* limitRect = new NormalizedRect(nXMin, nYMin, nXMax, nYMax );
QValueList< HighlightAreaRect * >::const_iterator h2It = page->m_highlights.begin(), hEnd = page->m_highlights.end();
QValueList< NormalizedRect * >::const_iterator hIt;
QLinkedList< HighlightAreaRect * >::const_iterator h2It = page->m_highlights.begin(), hEnd = page->m_highlights.end();
QList< NormalizedRect * >::const_iterator hIt;
for ( ; h2It != hEnd; ++h2It )
for (hIt=(*h2It)->begin(); hIt!=(*h2It)->end(); ++hIt)
{
@ -117,7 +117,7 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const KPDFPage * p
// append annotations inside limits to the un/buffered list
if ( canDrawAnnotations )
{
QValueList< Annotation * >::const_iterator aIt = page->m_annotations.begin(), aEnd = page->m_annotations.end();
QLinkedList< Annotation * >::const_iterator aIt = page->m_annotations.begin(), aEnd = page->m_annotations.end();
for ( ; aIt != aEnd; ++aIt )
{
Annotation * ann = *aIt;
@ -128,13 +128,13 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const KPDFPage * p
type == Annotation::AInk /*|| (type == Annotation::AGeom && ann->style.opacity < 0.99)*/ )
{
if ( !bufferedAnnotations )
bufferedAnnotations = new QValueList< Annotation * >();
bufferedAnnotations = new QList< Annotation * >();
bufferedAnnotations->append( ann );
}
else
{
if ( !unbufferedAnnotations )
unbufferedAnnotations = new QValueList< Annotation * >();
unbufferedAnnotations = new QList< Annotation * >();
unbufferedAnnotations->append( ann );
}
}
@ -160,7 +160,7 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const KPDFPage * p
{
QImage destImage;
scalePixmapOnImage( destImage, pixmap, scaledWidth, scaledHeight, limits );
destPainter->drawPixmap( limits.left(), limits.top(), destImage, 0, 0,
destPainter->drawImage( limits.left(), limits.top(), destImage, 0, 0,
limits.width(),limits.height() );
}
@ -221,7 +221,7 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const KPDFPage * p
if ( bufferedHighlights )
{
// draw highlights that are inside the 'limits' paint region
QValueList< QPair<QColor, NormalizedRect *> >::const_iterator hIt = bufferedHighlights->begin(), hEnd = bufferedHighlights->end();
QList< QPair<QColor, NormalizedRect *> >::const_iterator hIt = bufferedHighlights->begin(), hEnd = bufferedHighlights->end();
for ( ; hIt != hEnd; ++hIt )
{
NormalizedRect * r = (*hIt).second;
@ -261,7 +261,7 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const KPDFPage * p
yScale = (double)scaledHeight / (double)limits.height();
// paint all buffered annotations in the page
QValueList< Annotation * >::const_iterator aIt = bufferedAnnotations->begin(), aEnd = bufferedAnnotations->end();
QList< Annotation * >::const_iterator aIt = bufferedAnnotations->begin(), aEnd = bufferedAnnotations->end();
for ( ; aIt != aEnd; ++aIt )
{
Annotation * a = *aIt;
@ -365,10 +365,10 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const KPDFPage * p
for ( int p = 0; p < paths; p++ )
{
NormalizedPath path;
const QValueList<NormalizedPoint> & inkPath = ia->inkPaths[ p ];
const QLinkedList<NormalizedPoint> & inkPath = ia->inkPaths[ p ];
// normalize page point to image
QValueList<NormalizedPoint>::const_iterator pIt = inkPath.begin(), pEnd = inkPath.end();
QLinkedList<NormalizedPoint>::const_iterator pIt = inkPath.begin(), pEnd = inkPath.end();
for ( ; pIt != pEnd; ++pIt )
{
const NormalizedPoint & inkPoint = *pIt;
@ -396,7 +396,7 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const KPDFPage * p
if ( unbufferedAnnotations )
{
// iterate over annotations and paint AText, AGeom, AStamp
QValueList< Annotation * >::const_iterator aIt = unbufferedAnnotations->begin(), aEnd = unbufferedAnnotations->end();
QList< Annotation * >::const_iterator aIt = unbufferedAnnotations->begin(), aEnd = unbufferedAnnotations->end();
for ( ; aIt != aEnd; ++aIt )
{
Annotation * a = *aIt;
@ -486,7 +486,7 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const KPDFPage * p
QRect limitsEnlarged = limits;
limitsEnlarged.addCoords( -2, -2, 2, 2 );
// draw rects that are inside the 'limits' paint region as opaque rects
QValueList< ObjectRect * >::const_iterator lIt = page->m_rects.begin(), lEnd = page->m_rects.end();
QLinkedList< ObjectRect * >::const_iterator lIt = page->m_rects.begin(), lEnd = page->m_rects.end();
for ( ; lIt != lEnd; ++lIt )
{
ObjectRect * rect = *lIt;

@ -52,7 +52,7 @@ class PagePainter
unsigned int alpha = 255 );
// my pretty dear raster function
typedef QValueList< NormalizedPoint > NormalizedPath;
typedef QList< NormalizedPoint > NormalizedPath;
enum RasterOperation { Normal, Multiply };
static void drawShapeOnImage(
QImage & image,

Loading…
Cancel
Save