Skip to content

Commit

Permalink
dxf export: complete doxymentation updates (followup 07113b0)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jun 27, 2016
1 parent 07113b0 commit 7eeb69c
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions src/core/dxf/qgsdxfpallabeling.h
Expand Up @@ -39,31 +39,55 @@ class QgsDxfLabelProvider : public QgsVectorLayerLabelProvider
//! construct the provider
explicit QgsDxfLabelProvider( QgsVectorLayer* layer, QgsDxfExport* dxf, const QgsPalLayerSettings *settings );

//! re-implementation that writes to DXF file instead of drawing with QPainter
/** 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
/** 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 );

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. Backported from 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
/** 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
/** 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

0 comments on commit 7eeb69c

Please sign in to comment.