Skip to content
Permalink
Browse files

add doxymentation

  • Loading branch information
jef-n committed Apr 13, 2016
1 parent 063d80d commit e023363c29140f7cd3f633a159531086aee0e1b1
Showing with 36 additions and 0 deletions.
  1. +3 −0 src/core/dxf/qgsdxfexport.h
  2. +19 −0 src/core/dxf/qgsdxfpallabeling.h
  3. +14 −0 src/core/symbology-ng/qgssymbollayerv2.h
@@ -290,7 +290,10 @@ class CORE_EXPORT QgsDxfExport
//! return list of available DXF encodings
static QStringList encodings();

//! output the label
void drawLabel( QString layerId, QgsRenderContext& context, pal::LabelPosition* label, const QgsPalLayerSettings &settings );

//! register name of layer for feature
void registerDxfLayer( QString layerId, QgsFeatureId fid, QString layer );

private:
@@ -40,30 +40,49 @@ class QgsDxfLabelProvider : public QgsVectorLayerLabelProvider
explicit QgsDxfLabelProvider( QgsVectorLayer* layer, QgsDxfExport* dxf, const QgsPalLayerSettings *settings );

//! re-implementation that writes to DXF file instead of drawing with QPainter
// @param context render context
// @param label label
void drawLabel( QgsRenderContext& context, pal::LabelPosition* label ) const override;

//! registration method that keeps track of DXF layer names of individual features
// @param feature feature
// @param context render context
// @param dxfLayerName name of dxf layer

This comment has been minimized.

Copy link
@m-kuhn

m-kuhn Apr 13, 2016

Member

I don't think that gets picked up

either

//! registration method that keeps track of DXF layer names of individual features
//! @param feature feature
//! @param context render context
//! @param dxfLayerName name of dxf layer

or

/**
 * registration method that keeps track of DXF layer names of individual features
 * @param feature feature
 * @param context render context
 * @param dxfLayerName name of dxf layer
 */

This comment has been minimized.

Copy link
@jef-n

jef-n via email Apr 13, 2016

Author Member
void registerDxfFeature( QgsFeature& feature, QgsRenderContext &context, const QString& dxfLayerName );

protected:
//! pointer to parent DXF export where this instance is used
QgsDxfExport* mDxfExport;
};

/** Implements a derived label provider for rule based labels internally used
* for DXF export
*
* Internal class, not in public API. Added in QGIS 2.15
* @note not available in Python bindings
*/
class QgsDxfRuleBasedLabelProvider : public QgsRuleBasedLabelProvider
{
public:
//! construct the provider
explicit QgsDxfRuleBasedLabelProvider( const QgsRuleBasedLabeling &rules, QgsVectorLayer* layer, QgsDxfExport* dxf );

//! reinitialize the subproviders with QgsDxfLabelProviders
//@param layer layer
void reinit( QgsVectorLayer* layer );

//! re-implementation that writes to DXF file instead of drawing with QPainter
// @param context render context
// @param label label
void drawLabel( QgsRenderContext &context, pal::LabelPosition *label ) const override;

//! registration method that keeps track of DXF layer names of individual features
// @param feature feature
// @param context render context
// @param dxfLayerName name of dxf layer
void registerDxfFeature( QgsFeature& feature, QgsRenderContext &context, const QString& dxfLayerName );

//! create QgsDxfLabelProvider
virtual QgsVectorLayerLabelProvider *createProvider( QgsVectorLayer *layer, bool withFeatureLoop, const QgsPalLayerSettings *settings ) override;

protected:
@@ -235,17 +235,31 @@ class CORE_EXPORT QgsSymbolLayerV2
*/
virtual QVariant evaluateDataDefinedProperty( const QString& property, const QgsSymbolV2RenderContext& context, const QVariant& defaultVal = QVariant(), bool *ok = nullptr ) const;

//! write as DXF
virtual bool writeDxf( QgsDxfExport &e, double mmMapUnitScaleFactor, const QString &layerName, QgsSymbolV2RenderContext &context, QPointF shift = QPointF( 0.0, 0.0 ) ) const;

//! get line width
virtual double dxfWidth( const QgsDxfExport& e, QgsSymbolV2RenderContext& context ) const;

//! get offset
virtual double dxfOffset( const QgsDxfExport& e, QgsSymbolV2RenderContext& context ) const;

//! get color
virtual QColor dxfColor( QgsSymbolV2RenderContext& context ) const;

//! get angle
virtual double dxfAngle( QgsSymbolV2RenderContext& context ) const;

//! get dash pattern
virtual QVector<qreal> dxfCustomDashPattern( QgsSymbolV2::OutputUnit& unit ) const;

//! get pen style
virtual Qt::PenStyle dxfPenStyle() const;

//! get brush/fill color
virtual QColor dxfBrushColor( QgsSymbolV2RenderContext& context ) const;

//! get brush/fill style
virtual Qt::BrushStyle dxfBrushStyle() const;

/** Returns the current paint effect for the layer.

0 comments on commit e023363

Please sign in to comment.
You can’t perform that action at this time.