Skip to content
Permalink
Browse files

Write dxf header and eof

  • Loading branch information
mhugent committed Sep 13, 2013
1 parent 6dad30c commit edc3b5ffaf67a879a39d01046d047edede316e57
Showing with 21 additions and 4 deletions.
  1. +19 −3 src/core/qgsdxfexport.cpp
  2. +2 −1 src/core/qgsdxfexport.h
@@ -45,8 +45,24 @@ int QgsDxfExport::writeToFile( QIODevice* d )
return 0;
}

int QgsDxfExport::writeHeader( QTextStream& stream )
void QgsDxfExport::writeHeader( QTextStream& stream )
{
stream << "Hello, dxf!";
return 0; //soon...
stream << "999\n";
stream << "DXF created from QGIS\n";
stream << " 0\n";
stream << "SECTION\n";
stream << " 2\n";
stream << "HEADER\n";
stream << " 9\n";
stream << "$LTSCALE\n";
stream << " 40\n";
stream << "1\n";
stream << " 0\n";
stream << "ENDSEC\n";
}

void QgsDxfExport::writeEndFile( QTextStream& stream )
{
stream << " 0\n";
stream << "ENDSEC\n";
}
@@ -37,7 +37,8 @@ class QgsDxfExport

QList< QgsMapLayer* > mLayers;

int writeHeader( QTextStream& stream );
void writeHeader( QTextStream& stream );
void writeEndFile( QTextStream& stream );
//collect styles
//writeEntities

0 comments on commit edc3b5f

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