Skip to content
Permalink
Browse files

dxf export:

* output 3D geometries
* more adaptions to labeling changes
  • Loading branch information
jef-n committed Apr 24, 2016
1 parent 2bd20de commit b3bf4a11ac201299a1626cf2c13b6dbf1df180be
@@ -165,9 +165,19 @@ class QgsDxfExport
* @param z z value of the point (defaults to 0.0)
* @param skipz write point in 2d (defaults to false)
* @note available in python bindings as writeGroupPoint
* @deprecated use QgsPointV2 version instead
*/
void writeGroup( int code, const QgsPoint &p, double z = 0.0, bool skipz = false ) /PyName=writeGroupPoint/;

/**
* Write a group code with a point
* @param code group code
* @param p point value
* @note available in python bindings as writeGroupPointV2
* @note added in 2.15
*/
void writeGroup( int code, const QgsPointV2 &p ) /PyName=writeGroupPointV2/;

/**
* Write a group code with color value
* @param color color
@@ -215,19 +225,43 @@ class QgsDxfExport
* @param line polyline
* @param layer layer name to use
* @param lineStyleName line type to use
* @param color coolor to use
* @param color color to use
* @param width line width to use
*/
void writePolyline( const QgsPolyline &line, const QString &layer, const QString &lineStyleName, const QColor& color, double width = -1 );

/**
* Draw dxf primitives (LWPOLYLINE)
* @param line polyline
* @param layer layer name to use
* @param lineStyleName line type to use
* @param color color to use
* @param width line width to use
* @note not available in Python bindings
* @note added in 2.15
*/
// void writePolyline( const QgsPointSequenceV2 &line, const QString &layer, const QString &lineStyleName, const QColor& color, double width = -1 );

/**
* Draw dxf filled polygon (HATCH)
* @param polygon polygon
* @param layer layer name to use
* @param hatchPattern hatchPattern to use
* @param color coolor to use
* @param color color to use
* @deprecated use version with QgsRingSequenceV2
*/
void writePolygon( const QgsPolygon &polygon, const QString &layer, const QString &hatchPattern, const QColor& color );
void writePolygon( const QgsPolygon &polygon, const QString &layer, const QString &hatchPattern, const QColor& color ) /Deprecated/;

/**
* Draw dxf filled polygon (HATCH)
* @param polygon polygon
* @param layer layer name to use
* @param hatchPattern hatchPattern to use
* @param color color to use
* @note not available in Python bindings
* @note added in 2.15
*/
// void writePolygon( const QgsRingSequenceV2 &polygon, const QString &layer, const QString &hatchPattern, const QColor& color );

/**
* Draw dxf filled polygon (SOLID)
@@ -244,20 +278,54 @@ class QgsDxfExport
//! Write line (as a polyline)
void writeLine( const QgsPoint &pt1, const QgsPoint &pt2, const QString &layer, const QString &lineStyleName, const QColor& color, double width = -1 );

//! Write line (as a polyline)
//! @note added in 2.15
void writeLine( const QgsPointV2 &pt1, const QgsPointV2 &pt2, const QString &layer, const QString &lineStyleName, const QColor& color, double width = -1 );

//! Write point
void writePoint( const QString &layer, const QColor& color, const QgsPoint &pt );
//! @deprecated use QgsPointV2 version
void writePoint( const QString &layer, const QColor& color, const QgsPoint &pt ) /Deprecated/;

//! Write point
//! @note available in Python bindings as writePointV2
//! @note added in 2.15
void writePoint( const QString &layer, const QColor& color, const QgsPointV2 &pt ) /PyName=writePointV2/;

//! Write filled circle (as hatch)
//! @deprecated use QgsPointV2 version
void writeFilledCircle( const QString &layer, const QColor& color, const QgsPoint &pt, double radius ) /Deprecated/;

//! Write filled circle (as hatch)
void writeFilledCircle( const QString &layer, const QColor& color, const QgsPoint &pt, double radius );
//! @note available in Python bindings as writePointV2
//! @note added in 2.15
void writeFilledCircle( const QString &layer, const QColor& color, const QgsPointV2 &pt, double radius ) /PyName=writeFillCircleV2/;

//! Write circle (as polyline)
//! @deprecated use QgsPointV2 version
void writeCircle( const QString &layer, const QColor& color, const QgsPoint &pt, double radius, const QString &lineStyleName, double width ) /Deprecated/;

//! Write circle (as polyline)
void writeCircle( const QString &layer, const QColor& color, const QgsPoint &pt, double radius, const QString &lineStyleName, double width );
//! @note available in Python bindings as writeCircleV2
//! @note added in 2.15
void writeCircle( const QString &layer, const QColor& color, const QgsPointV2 &pt, double radius, const QString &lineStyleName, double width ) /PyName=writeCircleV2/;

//! Write text (TEXT)
void writeText( const QString &layer, const QString &text, const QgsPoint &pt, double size, double angle, const QColor& color );
//! @deprecated use QgsPointV2 version
void writeText( const QString &layer, const QString &text, const QgsPoint &pt, double size, double angle, const QColor& color ) /Deprecated/;

//! Write text (TEXT)
//! @note available in Python bindings as writeTextV2
//! @note added in 2.15
void writeText( const QString &layer, const QString &text, const QgsPointV2 &pt, double size, double angle, const QColor& color ) /PyName=writeTextV2/;

//! Write mtext (MTEXT)
//! @deprecated use QgsPointV2 version
void writeMText( const QString &layer, const QString &text, const QgsPoint &pt, double width, double angle, const QColor& color ) /Deprecated/;

//! Write mtext (MTEXT)
void writeMText( const QString &layer, const QString &text, const QgsPoint &pt, double width, double angle, const QColor& color );
//! @note available in Python bindings as writeMTextV2
//! @note added in 2.15
void writeMText( const QString &layer, const QString &text, const QgsPointV2 &pt, double width, double angle, const QColor& color );

static double mapUnitScaleFactor( double scaleDenominator, QgsSymbolV2::OutputUnit symbolUnits, QGis::UnitType mapUnits );

@@ -438,6 +438,8 @@ QgsDxfExportDialog::QgsDxfExportDialog( QWidget *parent, Qt::WindowFlags f )
connect( mSelectAllButton, SIGNAL( clicked() ), this, SLOT( selectAll() ) );
connect( mUnSelectAllButton, SIGNAL( clicked() ), this, SLOT( unSelectAll() ) );

mFileLineEdit->setFocus();

//last dxf symbology mode
QSettings s;
mSymbologyModeComboBox->setCurrentIndex( QgsProject::instance()->readEntry( "dxf", "/lastDxfSymbologyMode", s.value( "qgis/lastDxfSymbologyMode", "2" ).toString() ).toInt() );

0 comments on commit b3bf4a1

Please sign in to comment.