18 #ifndef QGSDXFEXPORT_H 19 #define QGSDXFEXPORT_H 27 #include <QTextStream> 55 , mLayerOutputAttributeIndex( layerOutputAttributeIndex )
127 void setDestinationCrs(
long crs );
132 long destinationCrs();
193 static int closestColorMatch( QRgb color );
217 void writeGroup(
int code,
int i );
225 void writeGroup(
int code,
double d );
232 void writeGroup(
int code,
const QString &s );
243 Q_DECL_DEPRECATED
void writeGroup(
int code,
const QgsPoint &p,
double z = 0.0,
bool skipz =
false );
252 void writeGroup(
int code,
const QgsPointV2 &p );
262 void writeGroup(
const QColor& color,
int exactMatch = 62,
int rgbCode = 420,
int transparencyCode = 440 );
268 void writeGroupCode(
int code );
274 void writeInt(
int i );
280 void writeDouble(
double d );
286 void writeString(
const QString &s );
294 int writeHandle(
int code = 5,
int handle = 0 );
305 Q_DECL_DEPRECATED
void writePolyline(
const QgsPolyline &line,
const QString &layer,
const QString &lineStyleName,
const QColor& color,
double width = -1 );
371 Q_DECL_DEPRECATED
void writeFilledCircle(
const QString &layer,
const QColor& color,
const QgsPoint &pt,
double radius );
380 Q_DECL_DEPRECATED
void writeCircle(
const QString &layer,
const QColor& color,
const QgsPoint &pt,
double radius,
const QString &lineStyleName,
double width );
398 Q_DECL_DEPRECATED
void writeMText(
const QString &layer,
const QString &text,
const QgsPoint &pt,
double width,
double angle,
const QColor& color );
415 void clipValueToMapUnitScale(
double& value,
const QgsMapUnitScale& scale,
double pixelToMMFactor )
const;
446 double mSymbologyScaleDenominator;
449 bool mLayerTitleAsName;
453 static int mDxfColors[][3];
454 static const char *mDxfEncodings[][2];
456 int mSymbolLayerCounter;
464 void writeHeader(
const QString& codepage );
467 void writeEntities();
475 void writeDefaultLinetypes();
493 static int color_distance( QRgb p1,
int index );
494 static QRgb createRgbEntry( qreal r, qreal g, qreal b );
502 double dashSize()
const;
503 double dotSize()
const;
504 double dashSeparatorSize()
const;
505 double sizeToMapUnits(
double s )
const;
506 static QString lineNameFromPenStyle( Qt::PenStyle style );
507 bool layerIsScaleBasedVisible(
const QgsMapLayer *layer )
const;
521 #endif // QGSDXFEXPORT_H
A rectangle specified with double values.
Base class for all map layer types.
void setSymbologyScaleDenominator(double d)
Set reference scale for output.
OutputUnit
The unit of the output.
DxfLayer(QgsVectorLayer *vl, int layerOutputAttributeIndex=-1)
SymbologyExport symbologyExport() const
Get symbology export mode.
bool force2d()
Retrieve whether the output should be forced to 2d.
void setSymbologyExport(SymbologyExport e)
Set symbology export mode.
QGis::UnitType mapUnits() const
Retrieve map units.
QgsVectorLayer * layer() const
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Layers and optional attribute index to split into multiple layers using attribute value as layer name...
double symbologyScaleDenominator() const
Retrieve reference scale for output.
The QgsMapSettings class contains configuration for rendering of the map.
void setForce2d(bool force2d)
Force 2d output (eg.
Point geometry type, with support for z-dimension and m-values.
A class to represent a point.
double ANALYSIS_EXPORT angle(Point3D *p1, Point3D *p2, Point3D *p3, Point3D *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)
Contains information about the context of a rendering operation.
QgsRectangle extent() const
Get extent of area to export.
void setLayerTitleAsName(bool layerTitleAsName)
Enable use of title (where set) instead of layer name, when attribute index of corresponding layer in...
Struct for storing maximum and minimum scales for measurements in map units.
void setExtent(const QgsRectangle &r)
Set extent of area to export.
void setMapUnits(QGis::UnitType u)
Set map units.
bool layerTitleAsName()
Retrieve wether layer title (where set) instead of name shall be use.
int mLayerOutputAttributeIndex
LabelPosition is a candidate feature label position.
UnitType
Map units that qgis supports.
Represents a vector layer which manages a vector based data sets.
int layerOutputAttributeIndex() const