QgsPalettedRasterRenderer* QgsPalettedRasterRenderer::clone() const
{
  QgsPalettedRasterRenderer * renderer = new QgsPalettedRasterRenderer( nullptr, mBand, rgbArray(), mNColors );
  renderer->copyCommonProperties( this );

  renderer->mLabels = mLabels;
  return renderer;
}
QgsPalettedRasterRenderer *QgsPalettedRasterRenderer::clone() const
{
  QgsPalettedRasterRenderer *renderer = new QgsPalettedRasterRenderer( nullptr, mBand, mClassData );
  if ( mSourceColorRamp )
    renderer->setSourceColorRamp( mSourceColorRamp->clone() );

  renderer->copyCommonProperties( this );
  return renderer;
}