Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Write dxf header and eof
  • Loading branch information
mhugent committed Sep 13, 2013
1 parent 6dad30c commit edc3b5f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
22 changes: 19 additions & 3 deletions src/core/qgsdxfexport.cpp
Expand Up @@ -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";
}
3 changes: 2 additions & 1 deletion src/core/qgsdxfexport.h
Expand Up @@ -37,7 +37,8 @@ class QgsDxfExport

QList< QgsMapLayer* > mLayers;

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

Expand Down

0 comments on commit edc3b5f

Please sign in to comment.