Skip to content

Commit

Permalink
add default constructors to QgsFieldFormatter inherited classes
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed May 24, 2017
1 parent cf68aed commit 5f6d020
Show file tree
Hide file tree
Showing 12 changed files with 62 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/core/fieldformatter/qgsdatetimefieldformatter.sip
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ class QgsDateTimeFieldFormatter : QgsFieldFormatter
static const QString DEFAULT_TIME_FORMAT;
static const QString DEFAULT_DATETIME_FORMAT;

QgsDateTimeFieldFormatter();
%Docstring
Default constructor of field formatter for a date time field.
%End

virtual QString id() const;

virtual QString representValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const;
Expand Down
5 changes: 5 additions & 0 deletions python/core/fieldformatter/qgsfallbackfieldformatter.sip
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ class QgsFallbackFieldFormatter : QgsFieldFormatter
#include "qgsfallbackfieldformatter.h"
%End
public:

QgsFallbackFieldFormatter();
%Docstring
Default constructor of field formatter as a fallback when no specialized formatter is defined.
%End
virtual QString id() const;
};

Expand Down
5 changes: 5 additions & 0 deletions python/core/fieldformatter/qgskeyvaluefieldformatter.sip
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ class QgsKeyValueFieldFormatter : QgsFieldFormatter
#include "qgskeyvaluefieldformatter.h"
%End
public:

QgsKeyValueFieldFormatter();
%Docstring
Default constructor of field formatter for a key value field.
%End
virtual QString id() const;
virtual QString representValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const;
};
Expand Down
5 changes: 5 additions & 0 deletions python/core/fieldformatter/qgslistfieldformatter.sip
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ class QgsListFieldFormatter : QgsFieldFormatter
#include "qgslistfieldformatter.h"
%End
public:

QgsListFieldFormatter();
%Docstring
Default constructor of field formatter for a list field.
%End
virtual QString id() const;

virtual QString representValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ class QgsRelationReferenceFieldFormatter : QgsFieldFormatter
#include "qgsrelationreferencefieldformatter.h"
%End
public:

QgsRelationReferenceFieldFormatter();
%Docstring
Default constructor of field formatter for a relation reference field.
%End

virtual QString id() const;

virtual QString representValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const;
Expand Down
5 changes: 5 additions & 0 deletions python/core/fieldformatter/qgsvaluemapfieldformatter.sip
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ class QgsValueMapFieldFormatter : QgsFieldFormatter
It's the magic UUID {2839923C-8B7D-419E-B84B-CA2FE9B80EC7}
%End

QgsValueMapFieldFormatter();
%Docstring
Default constructor of field formatter for a value map field.
%End

virtual QString id() const;

virtual QString representValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const;
Expand Down
5 changes: 5 additions & 0 deletions src/core/fieldformatter/qgsdatetimefieldformatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ class CORE_EXPORT QgsDateTimeFieldFormatter : public QgsFieldFormatter
static const QString DEFAULT_TIME_FORMAT;
static const QString DEFAULT_DATETIME_FORMAT;

/**
* Default constructor of field formatter for a date time field.
*/
QgsDateTimeFieldFormatter() = default;

virtual QString id() const override;

virtual QString representValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const override;
Expand Down
5 changes: 5 additions & 0 deletions src/core/fieldformatter/qgsfallbackfieldformatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
class CORE_EXPORT QgsFallbackFieldFormatter : public QgsFieldFormatter
{
public:

/**
* Default constructor of field formatter as a fallback when no specialized formatter is defined.
*/
QgsFallbackFieldFormatter() = default;
virtual QString id() const override;
};

Expand Down
5 changes: 5 additions & 0 deletions src/core/fieldformatter/qgskeyvaluefieldformatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
class CORE_EXPORT QgsKeyValueFieldFormatter : public QgsFieldFormatter
{
public:

/**
* Default constructor of field formatter for a key value field.
*/
QgsKeyValueFieldFormatter() = default;
virtual QString id() const override;
virtual QString representValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const override;
};
Expand Down
5 changes: 5 additions & 0 deletions src/core/fieldformatter/qgslistfieldformatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
class CORE_EXPORT QgsListFieldFormatter : public QgsFieldFormatter
{
public:

/**
* Default constructor of field formatter for a list field.
*/
QgsListFieldFormatter() = default;
virtual QString id() const override;

virtual QString representValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const override;
Expand Down
6 changes: 6 additions & 0 deletions src/core/fieldformatter/qgsrelationreferencefieldformatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
class CORE_EXPORT QgsRelationReferenceFieldFormatter : public QgsFieldFormatter
{
public:

/**
* Default constructor of field formatter for a relation reference field.
*/
QgsRelationReferenceFieldFormatter() = default;

virtual QString id() const override;

virtual QString representValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const override;
Expand Down
5 changes: 5 additions & 0 deletions src/core/fieldformatter/qgsvaluemapfieldformatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ class CORE_EXPORT QgsValueMapFieldFormatter : public QgsFieldFormatter
*/
static const QString NULL_VALUE;

/**
* Default constructor of field formatter for a value map field.
*/
QgsValueMapFieldFormatter() = default;

virtual QString id() const override;

virtual QString representValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const override;
Expand Down

0 comments on commit 5f6d020

Please sign in to comment.