mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-24 18:35:37 +00:00
remove qt3 support calls
svn path=/trunk/playground/graphics/okular/; revision=588888
This commit is contained in:
parent
8328b24178
commit
a9a27a9894
|
@ -22,8 +22,6 @@ add_subdirectory( ui )
|
|||
add_subdirectory( shell )
|
||||
add_subdirectory( generators )
|
||||
|
||||
add_definitions (-DQT3_SUPPORT -DQT3_SUPPORT_WARNINGS)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_SOURCE_DIR}/okular/ui/painter_agg2/
|
||||
)
|
||||
|
|
|
@ -554,13 +554,12 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const Okular::Page
|
|||
annotBoundary2.top(), annotRect2.width(), annotRect2.height() );
|
||||
scalePixmapOnImage( scaledImage, &pixmap,
|
||||
TEXTANNOTATION_ICONSIZE, TEXTANNOTATION_ICONSIZE,
|
||||
innerRect2 );
|
||||
innerRect2, QImage::Format_ARGB32 );
|
||||
// if the annotation color is valid (ie it was set), then
|
||||
// use it to colorize the icon, otherwise the icon will be
|
||||
// "gray"
|
||||
if ( a->style.color.isValid() )
|
||||
colorizeImage( scaledImage, a->style.color, opacity );
|
||||
scaledImage.setAlphaBuffer( true );
|
||||
pixmap = QPixmap::fromImage( scaledImage );
|
||||
|
||||
// draw the mangled image to painter
|
||||
|
@ -580,10 +579,9 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const Okular::Page
|
|||
pixmap = KGlobal::iconLoader()->loadIcon( stamp->stampIconName.toLower(), K3Icon::NoGroup, qMin( annotBoundary.width(), annotBoundary.height() ) );
|
||||
QImage scaledImage;
|
||||
scalePixmapOnImage( scaledImage, &pixmap, annotBoundary.width(),
|
||||
annotBoundary.height(), innerRect );
|
||||
annotBoundary.height(), innerRect, QImage::Format_ARGB32 );
|
||||
if ( opacity < 255 )
|
||||
changeImageAlpha( scaledImage, opacity );
|
||||
scaledImage.setAlphaBuffer( true );
|
||||
pixmap = QPixmap::fromImage( scaledImage );
|
||||
|
||||
// draw the scaled and al
|
||||
|
@ -675,7 +673,7 @@ void PagePainter::cropPixmapOnImage( QImage & dest, const QPixmap * src, const Q
|
|||
}
|
||||
|
||||
void PagePainter::scalePixmapOnImage ( QImage & dest, const QPixmap * src,
|
||||
int scaledWidth, int scaledHeight, const QRect & cropRect )
|
||||
int scaledWidth, int scaledHeight, const QRect & cropRect, QImage::Format format )
|
||||
{
|
||||
// {source, destination, scaling} params
|
||||
int srcWidth = src->width(),
|
||||
|
@ -686,7 +684,7 @@ void PagePainter::scalePixmapOnImage ( QImage & dest, const QPixmap * src,
|
|||
destHeight = cropRect.height();
|
||||
|
||||
// destination image (same geometry as the pageLimits rect)
|
||||
dest = QImage( destWidth, destHeight, QImage::Format_RGB32 );
|
||||
dest = QImage( destWidth, destHeight, format );
|
||||
unsigned int * destData = (unsigned int *)dest.bits();
|
||||
|
||||
// source image (1:1 conversion from pixmap)
|
||||
|
|
|
@ -42,7 +42,7 @@ class PagePainter
|
|||
// to 'scaledWidth' by 'scaledHeight' pixels. cropRect must be inside
|
||||
// the QRect(0,0, scaledWidth,scaledHeight)
|
||||
static void scalePixmapOnImage( QImage & dest, const QPixmap * src,
|
||||
int scaledWidth, int scaledHeight, const QRect & cropRect );
|
||||
int scaledWidth, int scaledHeight, const QRect & cropRect, QImage::Format format = QImage::Format_RGB32 );
|
||||
|
||||
// set the alpha component of the image to a given value
|
||||
static void changeImageAlpha( QImage & image, unsigned int alpha );
|
||||
|
|
|
@ -669,7 +669,7 @@ QRect PageViewAnnotator::routeEvent( QMouseEvent * e, PageViewItem * item )
|
|||
|
||||
// find out the pressed button
|
||||
AnnotatorEngine::Button button = AnnotatorEngine::None;
|
||||
Qt::ButtonState buttonState = ( eventType == AnnotatorEngine::Move ) ? e->buttons() : e->button();
|
||||
Qt::MouseButtons buttonState = ( eventType == AnnotatorEngine::Move ) ? e->buttons() : e->button();
|
||||
if ( buttonState == Qt::LeftButton )
|
||||
button = AnnotatorEngine::Left;
|
||||
else if ( buttonState == Qt::RightButton )
|
||||
|
|
Loading…
Reference in a new issue