77 , mLayerOutputAttributeIndex( layerOutputAttributeIndex )
96 QString splitLayerAttribute()
const;
100 int mLayerOutputAttributeIndex = -1;
106 FlagNoMText = 1 << 1,
108 Q_DECLARE_FLAGS( Flags, Flag )
119 DeviceNotWritableError,
158 Is3DPolygonMesh = 16,
161 ContinuousPattern = 128,
164 Q_DECLARE_FLAGS( DxfPolylineFlags, DxfPolylineFlag )
206 ExportResult writeToFile( QIODevice *d, const QString &codec );
214 void setSymbologyScale(
double scale ) { mSymbologyScale = scale; }
303 static int closestColorMatch( QRgb color );
311 QString layerName(
const QString &
id,
const QgsFeature &f )
const;
327 void writeGroup(
int code,
int i )
SIP_PYNAME( writeGroupInt );
335 void writeGroup(
int code,
long long i )
SIP_PYNAME( writeGroupLong );
343 void writeGroup(
int code,
double d )
SIP_PYNAME( writeGroupDouble );
350 void writeGroup(
int code,
const QString &s );
369 void writeGroup(
const QColor &color,
int exactMatch = 62,
int rgbCode = 420,
int transparencyCode = 440 );
375 void writeGroupCode(
int code );
381 void writeInt(
int i );
387 void writeDouble(
double d );
393 void writeString(
const QString &s );
401 int writeHandle(
int code = 5,
int handle = 0 );
413 void writePolyline(
const QgsPointSequence &line,
const QString &layer,
const QString &lineStyleName,
const QColor &color,
double width = -1 )
SIP_SKIP;
425 void writePolyline( const
QgsCurve &curve, const QString &layer, const QString &lineStyleName, const QColor &color,
double width = -1 )
SIP_SKIP;
436 void writePolygon( const
QgsRingSequence &polygon, const QString &layer, const QString &hatchPattern, const QColor &color )
SIP_SKIP;
447 void writePolygon( const
QgsCurvePolygon &polygon, const QString &layer, const QString &hatchPattern, const QColor &color )
SIP_SKIP;
453 void writeLine( const
QgsPoint &pt1, const
QgsPoint &pt2, const QString &layer, const QString &lineStyleName, const QColor &color,
double width = -1 );
460 void writePoint( const QString &layer, const QColor &color, const
QgsPoint &pt )
SIP_PYNAME( writePointV2 );
467 void writeFilledCircle( const QString &layer, const QColor &color, const
QgsPoint &pt,
double radius )
SIP_PYNAME( writeFillCircleV2 );
474 void writeCircle( const QString &layer, const QColor &color, const
QgsPoint &pt,
double radius, const QString &lineStyleName,
double width )
SIP_PYNAME( writeCircleV2 );
488 void writeMText( const QString &layer, const QString &text, const
QgsPoint &pt,
double width,
double angle, const QColor &color );
497 static
double mapUnitScaleFactor(
double scale,
Qgis::RenderUnit symbolUnits,
Qgis::DistanceUnit mapUnits,
double mapUnitsPerPixel = 1.0 );
505 void clipValueToMapUnitScale(
double &value, const
QgsMapUnitScale &scale,
double pixelToMMFactor ) const;
508 static QString dxfLayerName( const QString &name );
511 static QString dxfEncoding( const QString &name );
514 static QStringList encodings();
531 Q_DECL_DEPRECATED
void registerDxfLayer( const QString &layerId,
QgsFeatureId fid, const QString &layer );
542 double mSymbologyScale = 1.0;
545 bool mLayerTitleAsName =
false;
547 QTextStream mTextStream;
549 int mSymbolLayerCounter = 0;
551 int mBlockCounter = 0;
553 QHash< const QgsSymbolLayer *, QString > mLineStyles;
554 QHash< const QgsSymbolLayer *, QString > mPointSymbolBlocks;
555 QHash< const QgsSymbolLayer *, double > mPointSymbolBlockSizes;
556 QHash< const QgsSymbolLayer *, double > mPointSymbolBlockAngles;
559 void writeHeader(
const QString &codepage );
560 void prepareRenderers();
563 void writeEntities();
564 void writeEntitiesSymbolLevels(
DxfLayerJob *job );
565 void stopRenderers();
572 void writeDefaultLinetypes();
573 void writeSymbolLayerLinetype(
const QgsSymbolLayer *symbolLayer );
574 void writeLinetype(
const QString &styleName,
const QVector<qreal> &pattern,
Qgis::RenderUnit u );
605 QString lineStyleFromSymbolLayer(
const QgsSymbolLayer *symbolLayer );
608 static int color_distance( QRgb p1,
int index );
609 static QRgb createRgbEntry( qreal r, qreal g, qreal b );
614 QList< QPair< QgsSymbolLayer *, QgsSymbol * > > symbolLayers(
QgsRenderContext &context );
615 static int nLineTypes(
const QList< QPair< QgsSymbolLayer *, QgsSymbol *> > &symbolLayers );
618 double dashSize()
const;
619 double dotSize()
const;
620 double dashSeparatorSize()
const;
621 double sizeToMapUnits(
double s )
const;
622 static QString lineNameFromPenStyle( Qt::PenStyle style );
623 bool layerIsScaleBasedVisible(
const QgsMapLayer *layer )
const;
625 QHash<QString, int> mBlockHandles;
626 QString mBlockHandle;
629 QMap< QString, QMap<QgsFeatureId, QString> > mDxfLayerNames;
632 QHash<QString, int> mLayerNameAttribute;
633 double mFactor = 1.0;
634 bool mForce2d =
false;
636 QgsDxfExport::Flags mFlags = QgsDxfExport::Flags();
638 void appendCurve(
const QgsCurve &
c, QVector<QgsPoint> &points, QVector<double> &bulges );
639 void appendLineString(
const QgsLineString &ls, QVector<QgsPoint> &points, QVector<double> &bulges );
640 void appendCircularString(
const QgsCircularString &cs, QVector<QgsPoint> &points, QVector<double> &bulges );
641 void appendCompoundCurve(
const QgsCompoundCurve &cc, QVector<QgsPoint> &points, QVector<double> &bulges );
645 QList<DxfLayerJob *> mJobs;
646 std::unique_ptr<QgsLabelingEngine> mLabelingEngine;
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Contains information about the context of a rendering operation.
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTextRendererUtils::CurvedTextFlags)