QGIS/python/core/dxf/qgsdxfexport.sip

352 lines
9.1 KiB
Plaintext
Raw Normal View History

2017-06-06 15:50:31 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/dxf/qgsdxfexport.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
2014-01-27 09:22:24 +01:00
2014-01-27 09:22:24 +01:00
class QgsDxfExport
{
2017-06-06 15:50:31 +02:00
2014-01-27 09:22:24 +01:00
%TypeHeaderCode
2017-06-06 15:50:31 +02:00
#include "qgsdxfexport.h"
2014-01-27 09:22:24 +01:00
%End
public:
enum SymbologyExport
{
2017-06-06 15:50:31 +02:00
NoSymbology,
FeatureSymbology,
SymbolLayerSymbology
2014-01-27 09:22:24 +01:00
};
QgsDxfExport();
%Docstring
Constructor for QgsDxfExport.
%End
2014-01-27 09:22:24 +01:00
void setMapSettings( const QgsMapSettings &settings );
2017-06-06 15:50:31 +02:00
%Docstring
Set map settings and assign layer name attributes
\param settings map settings to apply
%End
void addLayers( const QList< QPair<QgsVectorLayer *, int > > &layers );
2017-06-06 15:50:31 +02:00
%Docstring
Add layers to export
\param layers list of layers and corresponding attribute indexes that determine the layer name (-1 for original layer name or title)
.. seealso:: setLayerTitleAsName
%End
int writeToFile( QIODevice *d, const QString &codec ); //maybe add progress dialog? other parameters (e.g. scale, dpi)?
2015-12-11 23:16:08 +01:00
void setSymbologyScale( double scale );
2017-06-06 15:50:31 +02:00
%Docstring
Set reference ``scale`` for output.
The ``scale`` value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
.. versionadded:: 3.0
.. seealso:: symbologyScale()
2017-06-06 15:50:31 +02:00
%End
2015-12-11 23:16:08 +01:00
double symbologyScale() const;
2017-06-06 15:50:31 +02:00
%Docstring
Returns the reference scale for output.
The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
.. versionadded:: 3.0
.. seealso:: setSymbologyScale()
2017-06-06 15:50:31 +02:00
:rtype: float
%End
2014-01-27 09:22:24 +01:00
QgsUnitTypes::DistanceUnit mapUnits() const;
2017-06-06 15:50:31 +02:00
%Docstring
Retrieve map units
:return: unit
:rtype: QgsUnitTypes.DistanceUnit
%End
2014-01-27 09:22:24 +01:00
void setDestinationCrs( const QgsCoordinateReferenceSystem &crs );
2017-06-06 15:50:31 +02:00
%Docstring
Set destination CRS
.. seealso:: destinationCrs()
.. versionadded:: 3.0
%End
QgsCoordinateReferenceSystem destinationCrs() const;
2017-06-06 15:50:31 +02:00
%Docstring
Returns the destination CRS, or an invalid CRS if no reprojection will be done.
.. seealso:: setDestinationCrs()
.. versionadded:: 3.0
:rtype: QgsCoordinateReferenceSystem
%End
2014-01-27 09:22:24 +01:00
void setSymbologyExport( QgsDxfExport::SymbologyExport e );
2017-06-06 15:50:31 +02:00
%Docstring
Set symbology export mode
\param e the mode
%End
2015-12-11 23:16:08 +01:00
2014-01-27 09:22:24 +01:00
QgsDxfExport::SymbologyExport symbologyExport() const;
2017-06-06 15:50:31 +02:00
%Docstring
Get symbology export mode
:return: mode
.. seealso:: setSymbologyExport
:rtype: QgsDxfExport.SymbologyExport
%End
2014-01-27 09:22:24 +01:00
void setExtent( const QgsRectangle &r );
2017-06-06 15:50:31 +02:00
%Docstring
Set extent of area to export
\param r area to export
%End
2015-12-11 23:16:08 +01:00
2014-01-27 09:22:24 +01:00
QgsRectangle extent() const;
2017-06-06 15:50:31 +02:00
%Docstring
Get extent of area to export
:return: area to export
.. seealso:: setExtent
:rtype: QgsRectangle
%End
2014-01-27 09:22:24 +01:00
2015-12-11 23:16:08 +01:00
void setLayerTitleAsName( bool layerTitleAsName );
2017-06-06 15:50:31 +02:00
%Docstring
Enable use of title (where set) instead of layer name,
when attribute index of corresponding layer index is -1
\param layerTitleAsName flag
.. seealso:: addLayers
%End
2015-12-11 23:16:08 +01:00
bool layerTitleAsName();
2017-06-06 15:50:31 +02:00
%Docstring
Retrieve whether layer title (where set) instead of name shall be use
:return: flag
.. seealso:: setLayerTitleAsName
:rtype: bool
%End
2015-12-11 23:16:08 +01:00
void setForce2d( bool force2d );
%Docstring
Force 2d output (eg. to support linewidth in polylines)
\param force2d flag
.. seealso:: force2d
%End
bool force2d();
%Docstring
Retrieve whether the output should be forced to 2d
:return: flag
.. seealso:: setForce2d
:rtype: bool
%End
2016-04-13 20:41:32 +02:00
static int closestColorMatch( QRgb color );
2017-06-06 15:50:31 +02:00
%Docstring
Get DXF palette index of nearest entry for given color
\param color
:rtype: int
%End
2014-01-27 09:22:24 +01:00
QString layerName( const QString &id, const QgsFeature &f ) const;
2017-06-06 15:50:31 +02:00
%Docstring
Get layer name for feature
\param id layer id of layer
\param f feature of layer
:return: layer name for feature
:rtype: str
%End
2015-12-11 23:16:08 +01:00
QString layerName( QgsVectorLayer *vl ) const;
2017-06-06 15:50:31 +02:00
%Docstring
Get name for layer respecting the use layer title as layer name mode
\param vl the vector layer
:return: name of layer
.. seealso:: setLayerTitleAsName
:rtype: str
%End
2015-12-11 23:16:08 +01:00
2014-01-27 09:22:24 +01:00
void writeGroup( int code, int i ) /PyName=writeGroupInt/;
2017-06-06 15:50:31 +02:00
%Docstring
Write a tuple of group code and integer value
\param code group code
\param i integer value
.. note::
available in Python bindings as writeGroupInt
%End
2015-12-11 23:16:08 +01:00
2014-01-27 09:22:24 +01:00
void writeGroup( int code, double d ) /PyName=writeGroupDouble/;
2017-06-06 15:50:31 +02:00
%Docstring
Write a group code with a floating point value
\param code group code
\param d floating point value
.. note::
available in Python bindings as writeGroupDouble
%End
2015-12-11 23:16:08 +01:00
void writeGroup( int code, const QString &s );
2017-06-06 15:50:31 +02:00
%Docstring
Write a group code with a string value
\param code group code
\param s string value
%End
2015-12-11 23:16:08 +01:00
void writeGroup( int code, const QgsPoint &p ) /PyName=writeGroupPointV2/;
2017-06-06 15:50:31 +02:00
%Docstring
Write a group code with a point
\param code group code
\param p point value
.. note::
available in Python bindings as writeGroupPointV2
.. versionadded:: 2.15
%End
void writeGroup( const QColor &color, int exactMatch = 62, int rgbCode = 420, int transparencyCode = 440 );
2017-06-06 15:50:31 +02:00
%Docstring
Write a group code with color value
\param color color
\param exactMatch group code to use if the color has an exact match in the dxf palette
\param rgbCode group code to use if the color doesn't have an exact match or has a transparency component
\param transparencyCode group code to use for transparency component
.. note::
available in Python bindings as writeGroupPoint
%End
2015-12-11 23:16:08 +01:00
2014-01-27 09:22:24 +01:00
void writeGroupCode( int code );
2017-06-06 15:50:31 +02:00
%Docstring
Write a group code
\param code group code value
%End
2015-12-11 23:16:08 +01:00
2014-01-27 09:22:24 +01:00
void writeInt( int i );
2017-06-06 15:50:31 +02:00
%Docstring
Write an integer value
\param i integer value
%End
2015-12-11 23:16:08 +01:00
2014-01-27 09:22:24 +01:00
void writeDouble( double d );
2017-06-06 15:50:31 +02:00
%Docstring
Write a floating point value
\param d floating point value
%End
2015-12-11 23:16:08 +01:00
void writeString( const QString &s );
2017-06-06 15:50:31 +02:00
%Docstring
Write a string value
\param s string value
%End
int writeHandle( int code = 5, int handle = 0 );
2017-06-06 15:50:31 +02:00
%Docstring
Write a tuple of group code and a handle
\param code group code to use
\param handle handle to use (0 generates a new handle)
:return: the used handle
:rtype: int
%End
2014-01-27 09:22:24 +01:00
void writeLine( const QgsPoint &pt1, const QgsPoint &pt2, const QString &layer, const QString &lineStyleName, const QColor &color, double width = -1 );
2017-06-06 15:50:31 +02:00
%Docstring
Write line (as a polyline)
2017-06-06 15:50:31 +02:00
.. versionadded:: 2.15
%End
void writePoint( const QString &layer, const QColor &color, const QgsPoint &pt ) /PyName=writePointV2/;
2017-06-06 15:50:31 +02:00
%Docstring
Write point
.. note::
available in Python bindings as writePointV2
2017-06-06 15:50:31 +02:00
.. versionadded:: 2.15
%End
void writeFilledCircle( const QString &layer, const QColor &color, const QgsPoint &pt, double radius ) /PyName=writeFillCircleV2/;
2017-06-06 15:50:31 +02:00
%Docstring
Write filled circle (as hatch)
.. note::
available in Python bindings as writePointV2
2017-06-06 15:50:31 +02:00
.. versionadded:: 2.15
%End
void writeCircle( const QString &layer, const QColor &color, const QgsPoint &pt, double radius, const QString &lineStyleName, double width ) /PyName=writeCircleV2/;
2017-06-06 15:50:31 +02:00
%Docstring
Write circle (as polyline)
.. note::
available in Python bindings as writeCircleV2
2017-06-06 15:50:31 +02:00
.. versionadded:: 2.15
%End
2014-01-27 09:22:24 +01:00
void writeText( const QString &layer, const QString &text, const QgsPoint &pt, double size, double angle, const QColor &color ) /PyName=writeTextV2/;
2017-06-06 15:50:31 +02:00
%Docstring
Write text (TEXT)
.. note::
available in Python bindings as writeTextV2
2017-06-06 15:50:31 +02:00
.. versionadded:: 2.15
%End
void writeMText( const QString &layer, const QString &text, const QgsPoint &pt, double width, double angle, const QColor &color );
2017-06-06 15:50:31 +02:00
%Docstring
Write mtext (MTEXT)
.. note::
available in Python bindings as writeMTextV2
2017-06-06 15:50:31 +02:00
.. versionadded:: 2.15
%End
2014-01-27 09:22:24 +01:00
static double mapUnitScaleFactor( double scale, QgsUnitTypes::RenderUnit symbolUnits, QgsUnitTypes::DistanceUnit mapUnits );
2017-06-06 15:50:31 +02:00
%Docstring
Calculates a scaling factor to convert from map units to a specified symbol unit.
The ``scale`` parameter indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
2017-06-06 15:50:31 +02:00
:rtype: float
%End
2014-01-27 09:22:24 +01:00
static QString dxfLayerName( const QString &name );
2017-06-06 15:50:31 +02:00
%Docstring
Return cleaned layer name for use in DXF
:rtype: str
%End
2014-01-27 09:22:24 +01:00
2015-12-11 23:16:08 +01:00
static QString dxfEncoding( const QString &name );
2017-06-06 15:50:31 +02:00
%Docstring
return DXF encoding for Qt encoding
:rtype: str
%End
2015-12-11 23:16:08 +01:00
static QStringList encodings();
2017-06-06 15:50:31 +02:00
%Docstring
return list of available DXF encodings
:rtype: list of str
%End
2015-12-11 23:16:08 +01:00
void registerDxfLayer( const QString &layerId, QgsFeatureId fid, const QString &layer );
2017-06-06 15:50:31 +02:00
%Docstring
Register name of layer for feature
\param layerId id of layer
\param fid id of feature
\param layer dxf layer of feature
%End
2016-04-13 20:41:32 +02:00
2014-01-27 09:22:24 +01:00
};
2017-06-06 15:50:31 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/dxf/qgsdxfexport.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/