Skip to content
Permalink
Browse files

Various fixes to make it compile on Windows

  • Loading branch information
wonder-sk committed Dec 6, 2013
1 parent e1ea342 commit bf7dd522993eba2cbf9dfbefd21fede785abb49b
@@ -597,6 +597,9 @@ public:
QList<QgsLabelPosition> labelsAtPosition( const QgsPoint& p ) const;
//! return infos about labels within a given (map) rectangle
QList<QgsLabelPosition> labelsWithinRect( const QgsRectangle& r ) const;

private:
QgsLabelingResults( const QgsLabelingResults& );
};


@@ -152,7 +152,7 @@ class QgsAbstractFeatureIterator;
/** base class that can be used for any class that is capable of returning features
* @note added in 2.1
*/
class QgsAbstractFeatureSource
class CORE_EXPORT QgsAbstractFeatureSource
{
public:
virtual ~QgsAbstractFeatureSource();
@@ -23,7 +23,7 @@
* 3. renderer job (in worker thread) calls QgsMapLayerRenderer::render()
* 4. renderer job (again in GUI thread) will check errors() and report them
*/
class QgsMapLayerRenderer
class CORE_EXPORT QgsMapLayerRenderer
{
public:
QgsMapLayerRenderer( const QString& layerID ) : mLayerID( layerID ) {}
@@ -131,7 +131,9 @@ void QgsMapRendererSequentialJob::internalFinished()

mErrors = mInternalJob->errors();

delete mInternalJob;
// now we are in a slot called from mInternalJob - do not delete it immediately
// so the class is still valid when the execution returns to the class
mInternalJob->deleteLater();
mInternalJob = 0;

emit finished();
@@ -818,7 +820,7 @@ void QgsMapRendererParallelJob::renderLabelsStatic(QgsMapRendererParallelJob* se
QImage QgsMapRendererParallelJob::composeImage()
{
QImage image( mSettings.outputSize(), QImage::Format_ARGB32_Premultiplied );
image.fill( mSettings.backgroundColor() );
image.fill( mSettings.backgroundColor().rgb() );

QPainter painter(&image);

@@ -29,7 +29,7 @@ typedef QList<LayerRenderJob> LayerRenderJobs;


/** abstract base class renderer jobs that asynchronously start map rendering */
class QgsMapRendererJob : public QObject
class CORE_EXPORT QgsMapRendererJob : public QObject
{
Q_OBJECT
public:
@@ -101,7 +101,7 @@ class QgsMapRendererJob : public QObject
/** Intermediate base class adding functionality that allows client to query the rendered image.
* The image can be queried even while the rendering is still in progress to get intermediate result
*/
class QgsMapRendererQImageJob : public QgsMapRendererJob
class CORE_EXPORT QgsMapRendererQImageJob : public QgsMapRendererJob
{
public:
QgsMapRendererQImageJob( const QgsMapSettings& settings );
@@ -115,7 +115,7 @@ class QgsMapRendererCustomPainterJob;


/** job implementation that renders everything sequentially in one thread */
class QgsMapRendererSequentialJob : public QgsMapRendererQImageJob
class CORE_EXPORT QgsMapRendererSequentialJob : public QgsMapRendererQImageJob
{
Q_OBJECT
public:
@@ -148,7 +148,7 @@ public slots:


/** job implementation that renders all layers in parallel */
class QgsMapRendererParallelJob : public QgsMapRendererQImageJob
class CORE_EXPORT QgsMapRendererParallelJob : public QgsMapRendererQImageJob
{
Q_OBJECT
public:
@@ -200,7 +200,7 @@ protected slots:
/** job implementation that renders everything sequentially using a custom painter.
* The returned image is always invalid (because there is none available).
*/
class QgsMapRendererCustomPainterJob : public QgsMapRendererJob
class CORE_EXPORT QgsMapRendererCustomPainterJob : public QgsMapRendererJob
{
Q_OBJECT
public:
@@ -13,8 +13,11 @@
#include "qgsxmlutils.h"


Q_GUI_EXPORT extern int qt_defaultDpiX();


QgsMapSettings::QgsMapSettings()
: mDpi( 96 ) // what to set?
: mDpi( qt_defaultDpiX() ) // DPI that will be used by default for QImage instances
, mSize( QSize( 0, 0 ) )
, mExtent()
, mProjectionsEnabled( false )
@@ -18,7 +18,7 @@ class QgsMapRendererJob;
class QgsMapLayer;


class QgsMapSettings
class CORE_EXPORT QgsMapSettings
{
public:
QgsMapSettings();
@@ -661,7 +661,7 @@ class CORE_EXPORT QgsLabelComponent
* Class that stores computed placement from labeling engine.
* @note added in 2.1
*/
class QgsLabelingResults
class CORE_EXPORT QgsLabelingResults
{
public:
QgsLabelingResults();
@@ -672,7 +672,7 @@ class QgsLabelingResults
//! return infos about labels within a given (map) rectangle
QList<QgsLabelPosition> labelsWithinRect( const QgsRectangle& r ) const;

protected:
private:
QgsLabelingResults( const QgsLabelingResults& ) {} // no copying allowed

QgsLabelSearchTree* mLabelSearchTree;
@@ -636,7 +636,9 @@ void QgsMapCanvas::rendererJobFinished()
mLabelingResults = mJob->takeLabelingResults();
}

delete mJob;
// now we are in a slot called from mJob - do not delete it immediately
// so the class is still valid when the execution returns to the class
mJob->deleteLater();
mJob = 0;
}

0 comments on commit bf7dd52

Please sign in to comment.
You can’t perform that action at this time.