-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
235 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,50 @@ | ||
/*************************************************************************** | ||
qgsdatetimefieldformatter.sip - QgsDateTimeFieldFormatter | ||
|
||
--------------------- | ||
begin : 2.12.2016 | ||
copyright : (C) 2016 by Matthias Kuhn | ||
email : matthias@opengis.ch | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/fieldformatter/qgsdatetimefieldformatter.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
class QgsDateTimeFieldFormatter : QgsFieldFormatter | ||
{ | ||
%Docstring | ||
Field formatter for a date time field. | ||
This represents a date, time or datetime value based on | ||
the field configuration. | ||
|
||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsdatetimefieldformatter.h" | ||
%End | ||
public: | ||
QgsDateTimeFieldFormatter(); | ||
static const QString DEFAULT_DATE_FORMAT; | ||
static const QString DEFAULT_TIME_FORMAT; | ||
static const QString DEFAULT_DATETIME_FORMAT; | ||
|
||
QString id() const; | ||
virtual QString id() const; | ||
|
||
virtual QString representValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const; | ||
|
||
static QString defaultFormat( const QVariant::Type type ); | ||
static QString defaultFormat( QVariant::Type type ); | ||
%Docstring | ||
Get the default format in function of the type. | ||
The type is expected to be one of | ||
|
||
- QVariant.DateTime | ||
- QVariant.Date | ||
- QVariant.Time | ||
:rtype: str | ||
%End | ||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/fieldformatter/qgsdatetimefieldformatter.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,32 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/fieldformatter/qgsfallbackfieldformatter.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
class QgsFallbackFieldFormatter : QgsFieldFormatter | ||
{ | ||
%Docstring | ||
A default fallback field formatter in case no specialized field formatter is defined. | ||
The values will be returned unmodified. | ||
|
||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsfallbackfieldformatter.h" | ||
%End | ||
public: | ||
QgsFallbackFieldFormatter(); | ||
QString id() const; | ||
virtual QString id() const; | ||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/fieldformatter/qgsfallbackfieldformatter.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,37 @@ | ||
/*************************************************************************** | ||
qgskeyvaluefieldformatter.sip - QgsKeyValueFieldFormatter | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/fieldformatter/qgskeyvaluefieldformatter.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
--------------------- | ||
begin : 3.12.2016 | ||
copyright : (C) 2016 by Matthias Kuhn | ||
email : matthias@opengis.ch | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
class QgsKeyValueFieldFormatter : QgsFieldFormatter | ||
{ | ||
%Docstring | ||
Field formatter for a key value field. | ||
This represents a list type value. | ||
Values will be represented as a colon-delimited and | ||
comma-separated list. | ||
|
||
E.g. "color: yellow, amount: 5" | ||
|
||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgskeyvaluefieldformatter.h" | ||
%End | ||
public: | ||
QgsKeyValueFieldFormatter(); | ||
QString id() const; | ||
QString representValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const; | ||
virtual QString id() const; | ||
virtual QString representValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const; | ||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/fieldformatter/qgskeyvaluefieldformatter.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,35 @@ | ||
/*************************************************************************** | ||
qgslistfieldformatter.sip - QgsListFieldFormatter | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/fieldformatter/qgslistfieldformatter.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
--------------------- | ||
begin : 3.12.2016 | ||
copyright : (C) 2016 by Matthias Kuhn | ||
email : matthias@opengis.ch | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
class QgsListFieldFormatter : QgsFieldFormatter | ||
{ | ||
%Docstring | ||
Field formatter for a list field. | ||
This represents a list type value. | ||
Values will be represented as a comma-separated list. | ||
|
||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgslistfieldformatter.h" | ||
%End | ||
|
||
public: | ||
QgsListFieldFormatter(); | ||
|
||
QString id() const; | ||
virtual QString id() const; | ||
|
||
QString representValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const; | ||
virtual QString representValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const; | ||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/fieldformatter/qgslistfieldformatter.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
31 changes: 28 additions & 3 deletions
31
python/core/fieldformatter/qgsrelationreferencefieldformatter.sip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,37 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/fieldformatter/qgsrelationreferencefieldformatter.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
class QgsRelationReferenceFieldFormatter : QgsFieldFormatter | ||
{ | ||
%Docstring | ||
Field formatter for a relation reference field. | ||
A value relation field formatter looks up the values from | ||
features on another layer. | ||
|
||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsrelationreferencefieldformatter.h" | ||
%End | ||
public: | ||
QgsRelationReferenceFieldFormatter(); | ||
virtual QString id() const; | ||
|
||
QString id() const; | ||
virtual QString representValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const; | ||
virtual QVariant sortValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap&config, const QVariant &cache, const QVariant &value ) const; | ||
|
||
virtual QVariant sortValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const; | ||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/fieldformatter/qgsrelationreferencefieldformatter.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,53 @@ | ||
/*************************************************************************** | ||
qgsvaluemapfieldformatter.sip - QgsValueMapFieldFormatter | ||
|
||
--------------------- | ||
begin : 3.12.2016 | ||
copyright : (C) 2016 by Matthias Kuhn | ||
email : matthias@opengis.ch | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/fieldformatter/qgsvaluemapfieldformatter.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
class QgsValueMapFieldFormatter : QgsFieldFormatter | ||
{ | ||
%Docstring | ||
Field formatter for a ValueMap field. | ||
A value relation field formatter looks up the values a map. | ||
|
||
The map is defined in the configuration as dictionary under the key "map". | ||
|
||
{ "map": { 1: "one", 2: "two", 3: "three" } } | ||
|
||
Values that are not on the map will be wrapped in parentheses. So with the above | ||
configuration: | ||
|
||
- 3 => "three" | ||
- 5 => "(5)" | ||
|
||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsvaluemapfieldformatter.h" | ||
%End | ||
public: | ||
QgsValueMapFieldFormatter(); | ||
|
||
QString id() const; | ||
static const QString NULL_VALUE; | ||
%Docstring | ||
Will be saved in the configuration when a value is NULL. | ||
It's the magic UUID {2839923C-8B7D-419E-B84B-CA2FE9B80EC7} | ||
%End | ||
|
||
virtual QString id() const; | ||
|
||
QString representValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const; | ||
virtual QString representValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const; | ||
|
||
QVariant sortValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const; | ||
virtual QVariant sortValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const; | ||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/fieldformatter/qgsvaluemapfieldformatter.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
Oops, something went wrong.