Skip to content

Commit

Permalink
add doxymentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Apr 13, 2016
1 parent 063d80d commit e023363
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/dxf/qgsdxfexport.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
19 changes: 19 additions & 0 deletions src/core/dxf/qgsdxfpallabeling.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 14 additions & 0 deletions src/core/symbology-ng/qgssymbollayerv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit e023363

Please sign in to comment.