Skip to content
Permalink
Browse files

Correctly mark some raster classes copy/assignment as private

As they haven't been properly implemented yet and the classes
violate the rule of three
  • Loading branch information
nyalldawson committed Jan 20, 2016
1 parent cc50542 commit 60816af3727226976e48d70375e0a4a6dc2498f6
@@ -74,5 +74,9 @@ class QgsContrastEnhancement
void writeXML( QDomDocument& doc, QDomElement& parentElem ) const;

void readXML( const QDomElement& elem );

private:

const QgsContrastEnhancement& operator=( const QgsContrastEnhancement& );
};

@@ -37,4 +37,8 @@ class QgsMultiBandColorRenderer: QgsRasterRenderer

QList<int> usesBands() const;

private:

QgsMultiBandColorRenderer( const QgsMultiBandColorRenderer& );
const QgsMultiBandColorRenderer& operator=( const QgsMultiBandColorRenderer& );
};
@@ -35,4 +35,9 @@ class QgsPalettedRasterRenderer : QgsRasterRenderer
void legendSymbologyItems( QList< QPair< QString, QColor > >& symbolItems ) const;

QList<int> usesBands() const;

private:

QgsPalettedRasterRenderer( const QgsPalettedRasterRenderer& );
const QgsPalettedRasterRenderer& operator=( const QgsPalettedRasterRenderer& );
};
@@ -70,4 +70,9 @@ class QgsRasterRenderer : QgsRasterInterface
/** Write upper class info into rasterrenderer element (called by writeXML method of subclasses)*/
void _writeXML( QDomDocument& doc, QDomElement& rasterRendererElem ) const;

private:

QgsRasterRenderer( const QgsRasterRenderer& );
const QgsRasterRenderer& operator=( const QgsRasterRenderer& );

};
@@ -17,4 +17,9 @@ class QgsSingleBandColorDataRenderer: QgsRasterRenderer
void writeXML( QDomDocument& doc, QDomElement& parentElem ) const;

QList<int> usesBands() const;

private:

QgsSingleBandColorDataRenderer( const QgsSingleBandColorDataRenderer& );
const QgsSingleBandColorDataRenderer& operator=( const QgsSingleBandColorDataRenderer& );
};
@@ -32,4 +32,9 @@ class QgsSingleBandGrayRenderer: QgsRasterRenderer
void legendSymbologyItems( QList< QPair< QString, QColor > >& symbolItems ) const;

QList<int> usesBands() const;

private:

QgsSingleBandGrayRenderer( const QgsSingleBandGrayRenderer& );
const QgsSingleBandGrayRenderer& operator=( const QgsSingleBandGrayRenderer& );
};
@@ -43,4 +43,9 @@ class QgsSingleBandPseudoColorRenderer: QgsRasterRenderer
int classificationMinMaxOrigin() const;
void setClassificationMinMaxOrigin( int origin );

private:

QgsSingleBandPseudoColorRenderer( const QgsSingleBandPseudoColorRenderer& );
const QgsSingleBandPseudoColorRenderer& operator=( const QgsSingleBandPseudoColorRenderer& );

};
@@ -144,6 +144,8 @@ class CORE_EXPORT QgsContrastEnhancement

/** \brief Method to calculate the actual enhanceContrasted value(s) */
int calculateContrastEnhancementValue( double );

const QgsContrastEnhancement& operator=( const QgsContrastEnhancement& );
};

#endif
@@ -27,9 +27,14 @@
QgsMultiBandColorRenderer::QgsMultiBandColorRenderer( QgsRasterInterface* input, int redBand, int greenBand, int blueBand,
QgsContrastEnhancement* redEnhancement,
QgsContrastEnhancement* greenEnhancement,
QgsContrastEnhancement* blueEnhancement ):
QgsRasterRenderer( input, "multibandcolor" ), mRedBand( redBand ), mGreenBand( greenBand ), mBlueBand( blueBand ),
mRedContrastEnhancement( redEnhancement ), mGreenContrastEnhancement( greenEnhancement ), mBlueContrastEnhancement( blueEnhancement )
QgsContrastEnhancement* blueEnhancement )
: QgsRasterRenderer( input, "multibandcolor" )
, mRedBand( redBand )
, mGreenBand( greenBand )
, mBlueBand( blueBand )
, mRedContrastEnhancement( redEnhancement )
, mGreenContrastEnhancement( greenEnhancement )
, mBlueContrastEnhancement( blueEnhancement )
{
}

@@ -70,6 +70,9 @@ class CORE_EXPORT QgsMultiBandColorRenderer: public QgsRasterRenderer
QgsContrastEnhancement* mRedContrastEnhancement;
QgsContrastEnhancement* mGreenContrastEnhancement;
QgsContrastEnhancement* mBlueContrastEnhancement;

QgsMultiBandColorRenderer( const QgsMultiBandColorRenderer& );
const QgsMultiBandColorRenderer& operator=( const QgsMultiBandColorRenderer& );
};

#endif // QGSMULTIBANDCOLORRENDERER_H
@@ -72,6 +72,9 @@ class CORE_EXPORT QgsPalettedRasterRenderer: public QgsRasterRenderer
int mNColors;
/** Optional category labels, size of vector may be < mNColors */
QVector<QString> mLabels;

QgsPalettedRasterRenderer( const QgsPalettedRasterRenderer& );
const QgsPalettedRasterRenderer& operator=( const QgsPalettedRasterRenderer& );
};

#endif // QGSPALETTEDRASTERRENDERER_H
@@ -106,6 +106,11 @@ class CORE_EXPORT QgsRasterRenderer : public QgsRasterInterface
/** Read alpha value from band. Is combined with value from raster transparency / global alpha value.
Default: -1 (not set)*/
int mAlphaBand;

private:

QgsRasterRenderer( const QgsRasterRenderer& );
const QgsRasterRenderer& operator=( const QgsRasterRenderer& );
};

#endif // QGSRASTERRENDERER_H
@@ -44,6 +44,9 @@ class CORE_EXPORT QgsSingleBandColorDataRenderer: public QgsRasterRenderer

private:
int mBand;

QgsSingleBandColorDataRenderer( const QgsSingleBandColorDataRenderer& );
const QgsSingleBandColorDataRenderer& operator=( const QgsSingleBandColorDataRenderer& );
};

#endif // QGSSINGLEBANDCOLORDATARENDERER_H
@@ -62,6 +62,9 @@ class CORE_EXPORT QgsSingleBandGrayRenderer: public QgsRasterRenderer
int mGrayBand;
Gradient mGradient;
QgsContrastEnhancement* mContrastEnhancement;

QgsSingleBandGrayRenderer( const QgsSingleBandGrayRenderer& );
const QgsSingleBandGrayRenderer& operator=( const QgsSingleBandGrayRenderer& );
};

#endif // QGSSINGLEBANDGRAYRENDERER_H
@@ -78,6 +78,9 @@ class CORE_EXPORT QgsSingleBandPseudoColorRenderer: public QgsRasterRenderer
double mClassificationMax;

int mClassificationMinMaxOrigin;

QgsSingleBandPseudoColorRenderer( const QgsSingleBandPseudoColorRenderer& );
const QgsSingleBandPseudoColorRenderer& operator=( const QgsSingleBandPseudoColorRenderer& );
};

#endif // QGSSINGLEBANDPSEUDOCOLORRENDERER_H

0 comments on commit 60816af

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