Skip to content

Commit

Permalink
Add copy constructor and assignment operator for QgsDxfExport
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Dec 5, 2013
1 parent 3fed0d0 commit 642b0d5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ INCLUDE_DIRECTORIES(
../src/core/pal
../src/core/composer
../src/core/diagram
../src/core/dxf
../src/core/gps
../src/core/raster
../src/core/symbology-ng
Expand Down
17 changes: 17 additions & 0 deletions src/core/dxf/qgsdxfexport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,23 @@ QgsDxfExport::QgsDxfExport(): mSymbologyScaleDenominator( 1.0 ), mSymbologyExpor
{
}

QgsDxfExport::QgsDxfExport( const QgsDxfExport& dxfExport )
{
*this = dxfExport;
}

QgsDxfExport& QgsDxfExport::operator=( const QgsDxfExport & dxfExport )
{
mLayers = dxfExport.mLayers;
mSymbologyScaleDenominator = dxfExport.mSymbologyScaleDenominator;
mSymbologyExport = dxfExport.mSymbologyExport;
mMapUnits = dxfExport.mMapUnits;
mSymbolLayerCounter = 0; //internal counter
mNextHandleId = 0;
mBlockCounter = 0;
return *this;
}

QgsDxfExport::~QgsDxfExport()
{
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/dxf/qgsdxfexport.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ class QgsDxfExport
};

QgsDxfExport();
QgsDxfExport( const QgsDxfExport& dxfExport );
~QgsDxfExport();
QgsDxfExport& operator=( const QgsDxfExport& dxfExport );

void addLayers( QList< QgsMapLayer* >& layers ) { mLayers = layers; }
int writeToFile( QIODevice* d ); //maybe add progress dialog? //other parameters (e.g. scale, dpi)?
Expand Down Expand Up @@ -84,8 +86,6 @@ class QgsDxfExport

QTextStream mTextStream;

QVector<QRgb> mDxfColorPalette;

static double mDxfColors[][3];

int mSymbolLayerCounter; //internal counter
Expand Down

0 comments on commit 642b0d5

Please sign in to comment.