2017-05-23 14:35:48 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/fieldformatter/qgsdatetimefieldformatter.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
2016-12-06 14:20:21 +01:00
|
|
|
class QgsDateTimeFieldFormatter : QgsFieldFormatter
|
2016-12-04 17:23:37 +01:00
|
|
|
{
|
2017-05-23 14:35:48 +02:00
|
|
|
%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
|
|
|
|
|
2016-12-04 17:23:37 +01:00
|
|
|
%TypeHeaderCode
|
2016-12-06 14:20:21 +01:00
|
|
|
#include "qgsdatetimefieldformatter.h"
|
2016-12-04 17:23:37 +01:00
|
|
|
%End
|
|
|
|
public:
|
2017-05-23 14:35:48 +02:00
|
|
|
static const QString DEFAULT_DATE_FORMAT;
|
|
|
|
static const QString DEFAULT_TIME_FORMAT;
|
|
|
|
static const QString DEFAULT_DATETIME_FORMAT;
|
2016-12-04 17:23:37 +01:00
|
|
|
|
2017-05-24 07:54:57 +02:00
|
|
|
QgsDateTimeFieldFormatter();
|
|
|
|
%Docstring
|
|
|
|
Default constructor of field formatter for a date time field.
|
|
|
|
%End
|
|
|
|
|
2017-05-23 14:35:48 +02:00
|
|
|
virtual QString id() const;
|
2016-12-04 17:23:37 +01:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
virtual QString representValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const;
|
2016-12-04 17:23:37 +01:00
|
|
|
|
2017-05-23 14:35:48 +02:00
|
|
|
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
|
2016-12-04 17:23:37 +01:00
|
|
|
};
|
2017-05-23 14:35:48 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/fieldformatter/qgsdatetimefieldformatter.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|