QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Member Functions | List of all members
QgsVectorFileWriter::FieldValueConverter Class Reference

Interface to convert raw field values to their user-friendly value. More...

#include <qgsvectorfilewriter.h>

Public Member Functions

 FieldValueConverter ()
 Constructor. More...
 
virtual ~FieldValueConverter ()
 Destructor. More...
 
virtual QVariant convert (int fieldIdxInLayer, const QVariant &value)
 Convert the provided value, for field fieldIdxInLayer. More...
 
virtual QgsField fieldDefinition (const QgsField &field)
 Return a possibly modified field definition. More...
 

Detailed Description

Interface to convert raw field values to their user-friendly value.

Note
Added in QGIS 2.16

Definition at line 179 of file qgsvectorfilewriter.h.

Constructor & Destructor Documentation

◆ FieldValueConverter()

QgsVectorFileWriter::FieldValueConverter::FieldValueConverter ( )

Constructor.

Definition at line 58 of file qgsvectorfilewriter.cpp.

◆ ~FieldValueConverter()

QgsVectorFileWriter::FieldValueConverter::~FieldValueConverter ( )
virtual

Destructor.

Definition at line 62 of file qgsvectorfilewriter.cpp.

Member Function Documentation

◆ convert()

QVariant QgsVectorFileWriter::FieldValueConverter::convert ( int  fieldIdxInLayer,
const QVariant value 
)
virtual

Convert the provided value, for field fieldIdxInLayer.

Default implementation will return provided value unmodified.

Parameters
fieldIdxInLayerfield index
valueoriginal raw value
Returns
possibly modified value.

Definition at line 71 of file qgsvectorfilewriter.cpp.

◆ fieldDefinition()

QgsField QgsVectorFileWriter::FieldValueConverter::fieldDefinition ( const QgsField field)
virtual

Return a possibly modified field definition.

Default implementation will return provided field unmodified.

Parameters
fieldoriginal field definition
Returns
possibly modified field definition

Definition at line 66 of file qgsvectorfilewriter.cpp.


The documentation for this class was generated from the following files: