34 : renderContext( renderContext )
37 , dxfExport( dxfExport )
40 , splitLayerAttribute( splitLayerAttribute )
41 ,
layerTitle( vl->title().isEmpty() ? vl->name() : vl->title() )
47 if ( !layerStyleOverride.isNull() )
55 if ( !splitLayerAttribute.isNull() )
96 std::unique_ptr< QgsFeatureRenderer >
renderer;
97 std::unique_ptr<QgsAbstractVectorLayerLabeling>
labeling;
109 static int sDxfColors[][3] =
369 static const char *DXF_ENCODINGS[][2] =
372 {
"8859_1",
"ISO-8859-1" },
373 {
"8859_2",
"ISO-8859-2" },
374 {
"8859_3",
"ISO-8859-3" },
375 {
"8859_4",
"ISO-8859-4" },
376 {
"8859_5",
"ISO-8859-5" },
377 {
"8859_6",
"ISO-8859-6" },
378 {
"8859_7",
"ISO-8859-7" },
379 {
"8859_8",
"ISO-8859-8" },
380 {
"8859_9",
"ISO-8859-9" },
382 {
"DOS850",
"CP850" },
393 {
"MACINTOSH",
"MacRoman" },
395 {
"KSC5601",
"ksc5601.1987-0" },
397 {
"DOS866",
"CP866" },
398 {
"ANSI_1250",
"CP1250" },
399 {
"ANSI_1251",
"CP1251" },
400 {
"ANSI_1252",
"CP1252" },
401 {
"GB2312",
"GB2312" },
402 {
"ANSI_1253",
"CP1253" },
403 {
"ANSI_1254",
"CP1254" },
404 {
"ANSI_1255",
"CP1255" },
405 {
"ANSI_1256",
"CP1256" },
406 {
"ANSI_1257",
"CP1257" },
407 {
"ANSI_874",
"CP874" },
408 {
"ANSI_932",
"Shift_JIS" },
409 {
"ANSI_936",
"CP936" },
410 {
"ANSI_949",
"CP949" },
411 {
"ANSI_950",
"CP950" },
414 {
"ANSI_1258",
"CP1258" },
418 #define DXF_TRAILER "\ 454 ACAD_PLOTSTYLENAME\n\ 562 ACDBDICTIONARYWDFLT\n\ 582 AcDbDictionaryWithDefault\n\ 778 1.000000000000000E+20\n\ 780 1.000000000000000E+20\n\ 782 1.000000000000000E+20\n\ 784 -1.000000000000000E+20\n\ 786 -1.000000000000000E+20\n\ 788 -1.000000000000000E+20\n\ 1050 163.1318914119703\n\ 1218 AcDbSavedByObjectVersion\n\ 1308 AcDbSavedByObjectVersion\n\ 1398 AcDbSavedByObjectVersion\n\ 1488 AcDbSavedByObjectVersion\n\ 1578 AcDbSavedByObjectVersion\n\ 1670 AcDbSavedByObjectVersion\n\ 1760 AcDbSavedByObjectVersion\n\ 1850 AcDbSavedByObjectVersion\n\ 1940 AcDbSavedByObjectVersion\n\ 2030 AcDbSavedByObjectVersion\n\ 2120 AcDbSavedByObjectVersion\n\ 2210 AcDbSavedByObjectVersion\n\ 2300 AcDbSavedByObjectVersion\n\ 2390 AcDbSavedByObjectVersion\n\ 2482 AcDbSavedByObjectVersion\n\ 2572 AcDbSavedByObjectVersion\n\ bool labelsEnabled() const
Returns whether the layer contains labels which are enabled and should be drawn.
void addProvider(QgsAbstractLabelProvider *provider)
Add provider of label features. Takes ownership of the provider.
virtual QgsAbstractVectorLayerLabeling * clone() const =0
Returns a new copy of the object.
void removeProvider(QgsAbstractLabelProvider *provider)
Remove provider if the provider's initialization failed. Provider instance is deleted.
virtual bool prepare(QgsRenderContext &context, QSet< QString > &attributeNames)
Prepare for registration of features.
Restore overridden layer style on destruction.
QgsLabelingEngine * labelingEngine() const
Gets access to new labeling engine (may be nullptr)
Implements a derived label provider for rule based labels internally used for DXF export...
QgsDxfRuleBasedLabelProvider * ruleBasedLabelProvider
Container of fields for a vector layer.
Holds information about each layer in a DXF job.
QgsRenderContext renderContext
QgsDxfLabelProvider * labelProvider
QgsVectorLayerFeatureSource featureSource
std::unique_ptr< QgsAbstractVectorLayerLabeling > labeling
QgsFields fields() const FINAL
Returns the list of fields of this layer.
QgsCoordinateReferenceSystem crs
QgsMapLayerStyleOverride styleOverride
QgsFeatureRenderer * renderer()
Returns renderer.
const QgsAbstractVectorLayerLabeling * labeling() const
Access to const labeling configuration.
bool prepare(QgsRenderContext &context, QSet< QString > &attributeNames) override
Prepare for registration of features.
QSet< QString > attributes
Partial snapshot of vector layer's state (only the members necessary for access to features) ...
QgsExpressionContext & expressionContext()
Gets the expression context.
The QgsLabelingEngine class provides map labeling functionality.
std::unique_ptr< QgsFeatureRenderer > renderer
Contains information about the context of a rendering operation.
void appendScope(QgsExpressionContextScope *scope)
Appends a scope to the end of the context.
This class represents a coordinate reference system (CRS).
static QgsExpressionContextScope * layerScope(const QgsMapLayer *layer)
Creates a new scope which contains variables and functions relating to a QgsMapLayer.
Implements a derived label provider internally used for DXF export.
void setOverrideStyle(const QString &style)
Temporarily apply a different style to the layer.
Represents a vector layer which manages a vector based data sets.
QString splitLayerAttribute
virtual QgsFeatureRenderer * clone() const =0
Create a deep copy of this renderer.
DxfLayerJob(QgsVectorLayer *vl, const QString &layerStyleOverride, QgsRenderContext &renderContext, QgsDxfExport *dxfExport, const QString &splitLayerAttribute)