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 )
204 ExportResult writeToFile( QIODevice *d, const QString &codec );
210 const QString feedbackMessage()
const {
return mFeedbackMessage; }
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 );
368 void writeGroup(
const QColor &color,
int exactMatch = 62,
int rgbCode = 420,
int transparencyCode = 440 );
374 void writeGroupCode(
int code );
380 void writeInt(
int i );
386 void writeDouble(
double d );
392 void writeString(
const QString &s );
400 int writeHandle(
int code = 5,
int handle = 0 );
411 void writePolyline(
const QgsPointSequence &line,
const QString &layer,
const QString &lineStyleName,
const QColor &color,
double width = -1 )
SIP_SKIP;
423 void writePolyline( const
QgsCurve &curve, const QString &layer, const QString &lineStyleName, const QColor &color,
double width = -1 )
SIP_SKIP;
433 void writePolygon( const
QgsRingSequence &polygon, const QString &layer, const QString &hatchPattern, const QColor &color )
SIP_SKIP;
444 void writePolygon( const
QgsCurvePolygon &polygon, const QString &layer, const QString &hatchPattern, const QColor &color )
SIP_SKIP;
449 void writeLine( const
QgsPoint &pt1, const
QgsPoint &pt2, const QString &layer, const QString &lineStyleName, const QColor &color,
double width = -1 );
455 void writePoint( const QString &layer, const QColor &color, const
QgsPoint &pt )
SIP_PYNAME( writePointV2 );
461 void writeFilledCircle( const QString &layer, const QColor &color, const
QgsPoint &pt,
double radius )
SIP_PYNAME( writeFillCircleV2 );
467 void writeCircle( const QString &layer, const QColor &color, const
QgsPoint &pt,
double radius, const QString &lineStyleName,
double width )
SIP_PYNAME( writeCircleV2 );
479 void writeMText( const QString &layer, const QString &text, const
QgsPoint &pt,
double width,
double angle, const QColor &color );
488 static
double mapUnitScaleFactor(
double scale,
Qgis::RenderUnit symbolUnits,
Qgis::DistanceUnit mapUnits,
double mapUnitsPerPixel = 1.0 );
496 void clipValueToMapUnitScale(
double &value, const
QgsMapUnitScale &scale,
double pixelToMMFactor ) const;
499 static QString dxfLayerName( const QString &name );
502 static QString dxfEncoding( const QString &name );
505 static QStringList encodings();
522 Q_DECL_DEPRECATED
void registerDxfLayer( const QString &layerId,
QgsFeatureId fid, const QString &layer );
533 double mSymbologyScale = 1.0;
536 bool mLayerTitleAsName =
false;
538 QTextStream mTextStream;
540 int mSymbolLayerCounter = 0;
542 int mBlockCounter = 0;
544 QHash< const QgsSymbolLayer *, QString > mLineStyles;
545 QHash< const QgsSymbolLayer *, QString > mPointSymbolBlocks;
546 QHash< const QgsSymbolLayer *, double > mPointSymbolBlockSizes;
547 QHash< const QgsSymbolLayer *, double > mPointSymbolBlockAngles;
550 void writeHeader(
const QString &codepage );
551 void prepareRenderers();
554 void writeEntities();
555 void writeEntitiesSymbolLevels(
DxfLayerJob *job );
556 void stopRenderers();
563 void writeDefaultLinetypes();
564 void writeSymbolLayerLinetype(
const QgsSymbolLayer *symbolLayer );
565 void writeLinetype(
const QString &styleName,
const QVector<qreal> &pattern,
Qgis::RenderUnit u );
596 QString lineStyleFromSymbolLayer(
const QgsSymbolLayer *symbolLayer );
599 static int color_distance( QRgb p1,
int index );
600 static QRgb createRgbEntry( qreal r, qreal g, qreal b );
605 QList< QPair< QgsSymbolLayer *, QgsSymbol * > > symbolLayers(
QgsRenderContext &context );
606 static int nLineTypes(
const QList< QPair< QgsSymbolLayer *, QgsSymbol *> > &symbolLayers );
609 double dashSize()
const;
610 double dotSize()
const;
611 double dashSeparatorSize()
const;
612 double sizeToMapUnits(
double s )
const;
613 static QString lineNameFromPenStyle( Qt::PenStyle style );
614 bool layerIsScaleBasedVisible(
const QgsMapLayer *layer )
const;
616 QHash<QString, int> mBlockHandles;
617 QString mBlockHandle;
620 QMap< QString, QMap<QgsFeatureId, QString> > mDxfLayerNames;
623 QList<QgsMapLayer *> mLayerList;
624 QHash<QString, int> mLayerNameAttribute;
625 double mFactor = 1.0;
626 bool mForce2d =
false;
628 QgsDxfExport::Flags mFlags = QgsDxfExport::Flags();
630 void appendCurve(
const QgsCurve &
c, QVector<QgsPoint> &points, QVector<double> &bulges );
631 void appendLineString(
const QgsLineString &ls, QVector<QgsPoint> &points, QVector<double> &bulges );
632 void appendCircularString(
const QgsCircularString &cs, QVector<QgsPoint> &points, QVector<double> &bulges );
633 void appendCompoundCurve(
const QgsCompoundCurve &cc, QVector<QgsPoint> &points, QVector<double> &bulges );
637 QList<DxfLayerJob *> mJobs;
638 std::unique_ptr<QgsLabelingEngine> mLabelingEngine;
640 QString mFeedbackMessage;
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)