Skip to content

Commit 3c05976

Browse files
committedNov 6, 2013
Updated overview to use rendering jobs, fixed cancellation
1 parent bc45b98 commit 3c05976

11 files changed

+137
-116
lines changed
 

‎src/app/maprenderertest.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ int main(int argc, char* argv[])
4040
QgsMapLayerRegistry::instance()->addMapLayer(layer2);
4141

4242
// open a window and do the rendering!
43-
TestWidget l(layer);
43+
/*TestWidget l(layer);
4444
l.resize(360,360);
45-
l.show();
45+
l.show();*/
46+
4647

47-
/*
4848
QgsMapCanvas canvas;
4949
canvas.setCanvasColor(Qt::white);
5050
canvas.setExtent(layer->extent());
@@ -63,7 +63,6 @@ int main(int argc, char* argv[])
6363

6464
QgsMapTool* pan = new QgsMapToolPan(&canvas);
6565
canvas.setMapTool(pan);
66-
*/
6766

6867
return app.exec();
6968
}

‎src/app/maprenderertest.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ class TestWidget : public QLabel
2323
ms.setLayers(QStringList(layer->id()));
2424
ms.setExtent(layer->extent());
2525
ms.setOutputSize(size());
26-
ms.setOutputDpi(120);
2726

2827
if (ms.hasValidSettings())
2928
qDebug("map renderer settings valid");

‎src/core/qgsmaprendererjob.cpp

Lines changed: 40 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,23 @@ QgsMapRendererSequentialJob::QgsMapRendererSequentialJob(const QgsMapSettings& s
2020
: QgsMapRendererQImageJob(SequentialJob, settings)
2121
, mInternalJob(0)
2222
{
23+
qDebug("SEQUENTIAL construct");
2324
}
2425

2526
QgsMapRendererSequentialJob::~QgsMapRendererSequentialJob()
2627
{
27-
delete mInternalJob;
28+
qDebug("SEQUENTIAL destruct");
29+
//delete mInternalJob;
30+
Q_ASSERT(mInternalJob == 0);
2831
}
2932

3033

3134
void QgsMapRendererSequentialJob::start()
3235
{
36+
qDebug("SEQUENTIAL START");
37+
qDebug("%d,%d", mSettings.outputSize().width(), mSettings.outputSize().height());
38+
3339
mImage = QImage(mSettings.outputSize(), QImage::Format_ARGB32_Premultiplied);
34-
mImage.fill(Qt::blue);
3540

3641
// 1. create an image where we will output all rendering
3742
mPainter = new QPainter(&mImage);
@@ -47,7 +52,11 @@ void QgsMapRendererSequentialJob::start()
4752
void QgsMapRendererSequentialJob::cancel()
4853
{
4954
if (mInternalJob)
55+
{
5056
mInternalJob->cancel();
57+
delete mInternalJob;
58+
mInternalJob = 0;
59+
}
5160
}
5261

5362

@@ -59,6 +68,8 @@ QImage QgsMapRendererSequentialJob::renderedImage()
5968

6069
void QgsMapRendererSequentialJob::internalFinished()
6170
{
71+
qDebug("SEQUENTIAL finished");
72+
6273
mPainter->end();
6374
delete mPainter;
6475
mPainter = 0;
@@ -78,17 +89,22 @@ QgsMapRendererCustomPainterJob::QgsMapRendererCustomPainterJob(const QgsMapSetti
7889
: QgsMapRendererJob(CustomPainterJob, settings)
7990
, mPainter(painter)
8091
{
81-
connect(&mFutureWatcher, SIGNAL(finished()), SLOT(futureFinished()));
92+
qDebug("QPAINTER construct");
8293
}
8394

8495
QgsMapRendererCustomPainterJob::~QgsMapRendererCustomPainterJob()
8596
{
86-
cancel();
97+
qDebug("QPAINTER destruct");
98+
Q_ASSERT(!mFutureWatcher.isRunning());
99+
//cancel();
87100
}
88101

89102
void QgsMapRendererCustomPainterJob::start()
90103
{
91-
qDebug("run!");
104+
qDebug("QPAINTER run!");
105+
106+
connect(&mFutureWatcher, SIGNAL(finished()), SLOT(futureFinished()));
107+
92108
mFuture = QtConcurrent::run(staticRender, this);
93109
mFutureWatcher.setFuture(mFuture);
94110
}
@@ -99,47 +115,46 @@ void QgsMapRendererCustomPainterJob::cancel()
99115
{
100116
if (mFuture.isRunning())
101117
{
118+
qDebug("QPAINTER cancelling");
119+
disconnect(&mFutureWatcher, SIGNAL(finished()), this, SLOT(futureFinished()));
120+
102121
mRenderContext.setRenderingStopped(true);
103122

123+
QTime t;
124+
t.start();
125+
104126
mFutureWatcher.waitForFinished();
105-
qApp->processEvents( QEventLoop::ExcludeUserInputEvents | QEventLoop::ExcludeSocketNotifiers ); // TODO: necessary?
127+
128+
qDebug("QPAINER cancel waited %f ms", t.elapsed() / 1000.0);
129+
130+
futureFinished();
131+
132+
qDebug("QPAINTER cancelled");
106133
}
107134
}
108135

109136

110137
void QgsMapRendererCustomPainterJob::futureFinished()
111138
{
112-
qDebug("futureFinished");
139+
qDebug("QPAINTER futureFinished");
113140
emit finished();
114141
}
115142

116143

117144
void QgsMapRendererCustomPainterJob::staticRender(QgsMapRendererCustomPainterJob* self)
118145
{
119-
qDebug("staticRender");
120146
self->startRender();
121147
}
122148

123149

124150
void QgsMapRendererCustomPainterJob::startRender()
125151
{
126-
qDebug("startRender");
127-
/*
128-
for (int i = 0; i < 50; ++i)
129-
{
130-
if (mStopped)
131-
return;
152+
qDebug("QPAINTER startRender");
132153

133-
mPainter->drawLine(rand() % 360, rand() % 360, rand() % 360, rand() % 360);
134-
//QThread::msleep(100);
135-
int x = 0;
136-
for (int i = 0; i < 1000; i++)
137-
{
138-
for (int j = 0; j < 10000; j++)
139-
x *= x+5;
140-
}
141-
qDebug("drawn line");
142-
}*/
154+
// clear the background
155+
mPainter->fillRect( 0, 0, mSettings.outputSize().width(), mSettings.outputSize().height(), mSettings.backgroundColor() );
156+
157+
mPainter->setRenderHint( QPainter::Antialiasing, mSettings.isAntiAliasingEnabled() );
143158

144159
#ifdef QGISDEBUG
145160
QgsDebugMsg( "Starting to render layer stack." );
@@ -163,7 +178,7 @@ void QgsMapRendererCustomPainterJob::startRender()
163178
int myGreen = prj->readNumEntry( "Gui", "/SelectionColorGreenPart", 255 );
164179
int myBlue = prj->readNumEntry( "Gui", "/SelectionColorBluePart", 0 );
165180
int myAlpha = prj->readNumEntry( "Gui", "/SelectionColorAlphaPart", 255 );*/
166-
mRenderContext.setSelectionColor( Qt::red ); // TODO QColor( myRed, myGreen, myBlue, myAlpha ) );
181+
mRenderContext.setSelectionColor( mSettings.selectionColor() ); // TODO QColor( myRed, myGreen, myBlue, myAlpha ) );
167182

168183
//calculate scale factor
169184
//use the specified dpi and not those from the paint device

‎src/core/qgsmapsettings.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ QgsMapSettings::QgsMapSettings()
3333
, mExtent()
3434
, mProjectionsEnabled( false )
3535
, mDestCRS( GEOCRS_ID, QgsCoordinateReferenceSystem::InternalCrsId ) // WGS 84
36+
, mBackgroundColor( Qt::white )
37+
, mSelectionColor( Qt::yellow )
38+
, mAntiAliasing( true )
3639
, mOutputUnits( QgsMapSettings::Millimeters )
3740
{
3841
updateDerived();

‎src/core/qgsmapsettings.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef QGSMAPSETTINGS_H
22
#define QGSMAPSETTINGS_H
33

4+
#include <QColor>
45
#include <QSize>
56
#include <QStringList>
67

@@ -59,6 +60,15 @@ class QgsMapSettings
5960
void setOutputUnits( OutputUnits u ) { mOutputUnits = u; }
6061
OutputUnits outputUnits() const { return mOutputUnits; }
6162

63+
void setBackgroundColor( const QColor& color ) { mBackgroundColor = color; }
64+
QColor backgroundColor() const { return mBackgroundColor; }
65+
66+
void setSelectionColor( const QColor& color ) { mSelectionColor = color; }
67+
QColor selectionColor() const { return mSelectionColor; }
68+
69+
void setAntiAliasingEnabled( bool enabled ) { mAntiAliasing = enabled; }
70+
bool isAntiAliasingEnabled() const { return mAntiAliasing; }
71+
6272
bool hasValidSettings() const;
6373
QgsRectangle visibleExtent() const;
6474
double mapUnitsPerPixel() const;
@@ -129,6 +139,10 @@ class QgsMapSettings
129139
bool mProjectionsEnabled;
130140
QgsCoordinateReferenceSystem mDestCRS;
131141

142+
QColor mBackgroundColor;
143+
QColor mSelectionColor;
144+
bool mAntiAliasing;
145+
132146
//! Output units
133147
OutputUnits mOutputUnits;
134148

‎src/gui/qgsmapcanvas.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ QgsMapCanvas::QgsMapCanvas( QWidget * parent, const char *name )
8383
, mCanvasProperties( new CanvasProperties )
8484
//, mNewSize( QSize() )
8585
//, mPainting( false )
86-
, mAntiAliasing( false )
8786
{
8887
setObjectName( name );
8988
mScene = new QGraphicsScene();
@@ -171,8 +170,8 @@ QgsMapCanvas::~QgsMapCanvas()
171170

172171
void QgsMapCanvas::enableAntiAliasing( bool theFlag )
173172
{
174-
mAntiAliasing = theFlag;
175-
mMap->enableAntiAliasing( theFlag );
173+
mSettings.setAntiAliasingEnabled( theFlag );
174+
176175
if ( mMapOverview )
177176
mMapOverview->enableAntiAliasing( theFlag );
178177
} // anti aliasing
@@ -311,7 +310,7 @@ void QgsMapCanvas::setLayerSet( QList<QgsMapCanvasLayer> &layers )
311310

312311
if ( mMapOverview )
313312
{
314-
QStringList& layerSetOvOld = mMapOverview->layerSet();
313+
const QStringList& layerSetOvOld = mMapOverview->layerSet();
315314
if ( layerSetOvOld != layerSetOverview )
316315
{
317316
mMapOverview->setLayerSet( layerSetOverview );
@@ -1211,7 +1210,7 @@ void QgsMapCanvas::unsetMapTool( QgsMapTool* tool )
12111210
void QgsMapCanvas::setCanvasColor( const QColor & theColor )
12121211
{
12131212
// background of map's pixmap
1214-
mMap->setBackgroundColor( theColor );
1213+
mSettings.setBackgroundColor( theColor );
12151214

12161215
// background of the QGraphicsView
12171216
QBrush bgBrush( theColor );

‎src/gui/qgsmapcanvas.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView
266266
void enableAntiAliasing( bool theFlag );
267267

268268
//! true if antialising is enabled
269-
bool antiAliasingEnabled() const { return mAntiAliasing; }
269+
bool antiAliasingEnabled() const { return mSettings.isAntiAliasingEnabled(); }
270270

271271
//! Select which Qt class to render with
272272
void useImageToRender( bool theFlag );
@@ -509,9 +509,6 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView
509509

510510
//! currently in paint event
511511
//bool mPainting;
512-
513-
//! indicates whether antialiasing will be used for rendering
514-
bool mAntiAliasing;
515512
}; // class QgsMapCanvas
516513

517514

‎src/gui/qgsmapcanvasmap.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,11 @@ void QgsMapCanvasMap::paint( QPainter* p, const QStyleOptionGraphicsItem*, QWidg
8080

8181
qDebug("----------> EXTENT %f,%f", s.extent().xMinimum(), s.extent().yMinimum());
8282

83-
mImage.fill(mBgColor.rgb());
84-
8583
mPainter = new QPainter(&mImage);
8684

8785
// TODO[MD]: need to setup clipping?
8886
//paint.setClipRect( mImage.rect() );
8987

90-
// antialiasing
91-
if ( mAntiAliasing )
92-
mPainter->setRenderHint( QPainter::Antialiasing );
93-
9488
// create the renderer job
9589
Q_ASSERT(mJob == 0);
9690
mJob = new QgsMapRendererCustomPainterJob(s, mPainter);

‎src/gui/qgsmapcanvasmap.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,14 @@ class GUI_EXPORT QgsMapCanvasMap : public QObject, public QGraphicsRectItem
4747
//! resize canvas item and pixmap
4848
void resize( QSize size );
4949

50-
void enableAntiAliasing( bool flag ) { mAntiAliasing = flag; }
50+
//! @deprecated in 2.1 - does nothing. Kept for API compatibility
51+
void enableAntiAliasing( bool flag );
5152

5253
//! @deprecated in 2.1 - does nothing. Kept for API compatibility
5354
void render() {}
5455

55-
void setBackgroundColor( const QColor& color ) { mBgColor = color; }
56+
//! @deprecated in 2.1 - does nothing. Kept for API compatibility
57+
void setBackgroundColor( const QColor& color ) {}
5658

5759
void setPanningOffset( const QPoint& point );
5860

@@ -74,17 +76,12 @@ public slots:
7476

7577
private:
7678

77-
//! indicates whether antialiasing will be used for rendering
78-
bool mAntiAliasing;
79-
8079
QImage mImage;
8180
QImage mLastImage;
8281

8382
//QgsMapRenderer* mRender;
8483
QgsMapCanvas* mCanvas;
8584

86-
QColor mBgColor;
87-
8885
QPoint mOffset;
8986

9087
bool mDirty; //!< whether a new rendering job should be started upon next paint() call

‎src/gui/qgsmapoverviewcanvas.cpp

Lines changed: 56 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
***************************************************************************/
1818

1919
#include "qgsmapcanvas.h"
20-
#include "qgsmaprenderer.h"
2120
#include "qgsmapoverviewcanvas.h"
21+
#include "qgsmaprendererjob.h"
2222
#include "qgsmaptopixel.h"
2323

2424
#include <QPainter>
@@ -68,40 +68,40 @@ class QgsPanningWidget : public QWidget
6868

6969

7070
QgsMapOverviewCanvas::QgsMapOverviewCanvas( QWidget * parent, QgsMapCanvas* mapCanvas )
71-
: QWidget( parent ), mMapCanvas( mapCanvas )
71+
: QWidget( parent )
72+
, mMapCanvas( mapCanvas )
73+
, mJob( 0 )
7274
{
7375
setObjectName( "theOverviewCanvas" );
7476
mPanningWidget = new QgsPanningWidget( this );
7577

76-
mMapRenderer = new QgsMapRenderer;
77-
mMapRenderer->enableOverviewMode();
78-
7978
setBackgroundColor( palette().window().color() );
8079
}
8180

8281
QgsMapOverviewCanvas::~QgsMapOverviewCanvas()
8382
{
84-
delete mMapRenderer;
8583
}
8684

8785
void QgsMapOverviewCanvas::resizeEvent( QResizeEvent* e )
8886
{
89-
mNewSize = e->size();
87+
mPixmap = QPixmap();
88+
89+
mSettings.setOutputSize( e->size() );
90+
91+
updateFullExtent();
92+
93+
refresh();
94+
95+
QWidget::resizeEvent( e );
9096
}
9197

9298
void QgsMapOverviewCanvas::paintEvent( QPaintEvent* pe )
9399
{
94-
if ( mNewSize.isValid() )
100+
if ( !mPixmap.isNull() )
95101
{
96-
mPixmap = QPixmap( mNewSize );
97-
mMapRenderer->setOutputSize( mNewSize, mPixmap.logicalDpiX() );
98-
updateFullExtent();
99-
mNewSize = QSize();
100-
refresh();
102+
QPainter paint( this );
103+
paint.drawPixmap( pe->rect().topLeft(), mPixmap, pe->rect() );
101104
}
102-
103-
QPainter paint( this );
104-
paint.drawPixmap( pe->rect().topLeft(), mPixmap, pe->rect() );
105105
}
106106

107107

@@ -112,21 +112,19 @@ void QgsMapOverviewCanvas::drawExtentRect()
112112
const QgsRectangle& extent = mMapCanvas->extent();
113113

114114
// show only when valid extent is set
115-
if ( extent.isEmpty() || mMapRenderer->extent().isEmpty() )
115+
if ( extent.isEmpty() || mSettings.extent().isEmpty() )
116116
{
117117
mPanningWidget->hide();
118118
return;
119119
}
120120

121-
const QgsMapToPixel* cXf = mMapRenderer->coordinateTransform();
121+
const QgsMapToPixel& cXf = mSettings.mapToPixel();
122122
QgsPoint ll( extent.xMinimum(), extent.yMinimum() );
123123
QgsPoint ur( extent.xMaximum(), extent.yMaximum() );
124-
if ( cXf )
125-
{
126-
// transform the points before drawing
127-
cXf->transform( &ll );
128-
cXf->transform( &ur );
129-
}
124+
125+
// transform the points before drawing
126+
cXf.transform( &ll );
127+
cXf.transform( &ur );
130128

131129
#if 0
132130
// test whether panning widget should be drawn
@@ -217,10 +215,10 @@ void QgsMapOverviewCanvas::mouseReleaseEvent( QMouseEvent * e )
217215
if ( e->button() == Qt::LeftButton )
218216
{
219217
// set new extent
220-
const QgsMapToPixel* cXf = mMapRenderer->coordinateTransform();
218+
const QgsMapToPixel& cXf = mSettings.mapToPixel();
221219
QRect rect = mPanningWidget->geometry();
222220

223-
QgsPoint center = cXf->toMapCoordinates( rect.center() );
221+
QgsPoint center = cXf.toMapCoordinates( rect.center() );
224222
QgsRectangle oldExtent = mMapCanvas->extent();
225223
QgsRectangle ext;
226224
ext.setXMinimum( center.x() - oldExtent.width() / 2 );
@@ -253,25 +251,22 @@ void QgsMapOverviewCanvas::updatePanningWidget( const QPoint& pos )
253251
mPanningWidget->move( pos.x() - mPanningCursorOffset.x(), pos.y() - mPanningCursorOffset.y() );
254252
}
255253

256-
257254
void QgsMapOverviewCanvas::refresh()
258255
{
259-
if ( mPixmap.isNull() || mPixmap.paintingActive() )
260-
return;
261-
262-
mPixmap.fill( mBgColor ); //palette().color(backgroundRole());
263-
264-
QPainter painter;
265-
painter.begin( &mPixmap );
266-
267-
// antialiasing
268-
if ( mAntiAliasing )
269-
painter.setRenderHint( QPainter::Antialiasing );
256+
if (mJob)
257+
{
258+
qDebug("oveview - cancelling old");
259+
mJob->cancel();
260+
qDebug("oveview - deleting old");
261+
delete mJob; // get rid of previous job (if any)
262+
}
270263

271-
// render image
272-
mMapRenderer->render( &painter );
264+
qDebug("oveview - starting new");
273265

274-
painter.end();
266+
// TODO: setup overview mode
267+
mJob = new QgsMapRendererSequentialJob(mSettings);
268+
connect(mJob, SIGNAL(finished()), this, SLOT(mapRenderingFinished()));
269+
mJob->start();
275270

276271
// schedule repaint
277272
update();
@@ -280,10 +275,22 @@ void QgsMapOverviewCanvas::refresh()
280275
drawExtentRect();
281276
}
282277

278+
void QgsMapOverviewCanvas::mapRenderingFinished()
279+
{
280+
qDebug("overview - finished");
281+
mPixmap = QPixmap::fromImage( mJob->renderedImage() );
282+
283+
delete mJob;
284+
mJob = 0;
285+
286+
// schedule repaint
287+
update();
288+
}
289+
283290

284291
void QgsMapOverviewCanvas::setBackgroundColor( const QColor& color )
285292
{
286-
mBgColor = color;
293+
mSettings.setBackgroundColor( color );
287294

288295
// set erase color
289296
QPalette palette;
@@ -294,34 +301,31 @@ void QgsMapOverviewCanvas::setBackgroundColor( const QColor& color )
294301
void QgsMapOverviewCanvas::setLayerSet( const QStringList& layerSet )
295302
{
296303
QgsDebugMsg( "layerSet: " + layerSet.join( ", " ) );
297-
mMapRenderer->setLayerSet( layerSet );
304+
mSettings.setLayers( layerSet );
298305
updateFullExtent();
299306
}
300307

301308
void QgsMapOverviewCanvas::updateFullExtent()
302309
{
303-
QgsRectangle rect;
304-
305-
rect = mMapCanvas->fullExtent();
310+
QgsRectangle rect = mMapCanvas->fullExtent();
306311
// expand a bit to keep features on margin
307312
rect.scale( 1.1 );
308313

309-
mMapRenderer->setExtent( rect );
314+
mSettings.setExtent( rect );
310315
drawExtentRect();
311316
}
312317

313318
void QgsMapOverviewCanvas::hasCrsTransformEnabled( bool flag )
314319
{
315-
mMapRenderer->setProjectionsEnabled( flag );
320+
mSettings.setProjectionsEnabled( flag );
316321
}
317322

318323
void QgsMapOverviewCanvas::destinationSrsChanged()
319324
{
320-
const QgsCoordinateReferenceSystem& srs = mMapCanvas->mapSettings().destinationCrs();
321-
mMapRenderer->setDestinationCrs( srs );
325+
mSettings.setDestinationCrs( mMapCanvas->mapSettings().destinationCrs() );
322326
}
323327

324-
QStringList& QgsMapOverviewCanvas::layerSet()
328+
QStringList QgsMapOverviewCanvas::layerSet() const
325329
{
326-
return mMapRenderer->layerSet();
330+
return mSettings.layers();
327331
}

‎src/gui/qgsmapoverviewcanvas.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ class QgsMapRenderer;
3131
class QgsPanningWidget; // defined in .cpp
3232
class QgsRectangle;
3333

34+
class QgsMapRendererQImageJob;
35+
#include "qgsmapsettings.h"
36+
3437
/** \ingroup gui
3538
* A widget that displays an overview map.
3639
*/
@@ -55,9 +58,9 @@ class GUI_EXPORT QgsMapOverviewCanvas : public QWidget
5558
//! updates layer set for overview
5659
void setLayerSet( const QStringList& layerSet );
5760

58-
QStringList& layerSet();
61+
QStringList layerSet() const;
5962

60-
void enableAntiAliasing( bool flag ) { mAntiAliasing = flag; }
63+
void enableAntiAliasing( bool flag ) { mSettings.setAntiAliasingEnabled( flag ); }
6164

6265
void updateFullExtent();
6366

@@ -67,6 +70,9 @@ class GUI_EXPORT QgsMapOverviewCanvas : public QWidget
6770

6871
void destinationSrsChanged();
6972

73+
protected slots:
74+
void mapRenderingFinished();
75+
7076
protected:
7177

7278
//! Overridden paint event
@@ -96,20 +102,14 @@ class GUI_EXPORT QgsMapOverviewCanvas : public QWidget
96102
//! main map canvas - used to get/set extent
97103
QgsMapCanvas* mMapCanvas;
98104

99-
//! for rendering overview
100-
QgsMapRenderer* mMapRenderer;
101-
102105
//! pixmap where the map is stored
103106
QPixmap mPixmap;
104107

105-
//! background color
106-
QColor mBgColor;
107-
108-
//! indicates whether antialiasing will be used for rendering
109-
bool mAntiAliasing;
108+
//! map settings used for rendering of the overview map
109+
QgsMapSettings mSettings;
110110

111-
//! resized canvas size
112-
QSize mNewSize;
111+
//! for rendering overview
112+
QgsMapRendererQImageJob* mJob;
113113
};
114114

115115
#endif

0 commit comments

Comments
 (0)
Please sign in to comment.