2017-05-01 13:26:22 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsfieldformatterregistry.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-12-06 14:20:21 +01:00
|
|
|
class QgsFieldFormatterRegistry : QObject
|
2016-12-04 17:23:37 +01:00
|
|
|
{
|
2017-05-01 13:26:22 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
The QgsFieldFormatterRegistry manages registered classes of QgsFieldFormatter.
|
|
|
|
A reference to the QgsFieldFormatterRegistry can be obtained from
|
2017-12-19 11:43:52 -04:00
|
|
|
:py:func:`QgsApplication.fieldFormatterRegistry()`
|
2017-05-01 13:26:22 +02:00
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
2016-12-04 17:23:37 +01:00
|
|
|
%TypeHeaderCode
|
2016-12-06 14:20:21 +01:00
|
|
|
#include "qgsfieldformatterregistry.h"
|
2016-12-04 17:23:37 +01:00
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
2017-05-01 13:26:22 +02:00
|
|
|
explicit QgsFieldFormatterRegistry( QObject *parent /TransferThis/ = 0 );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
You should not normally need to create your own field formatter registry.
|
2017-05-01 13:26:22 +02:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
Use the one provided by `QgsApplication.fieldFormatterRegistry()` instead.
|
2017-05-01 13:26:22 +02:00
|
|
|
%End
|
2016-12-06 14:20:21 +01:00
|
|
|
~QgsFieldFormatterRegistry();
|
2016-12-04 17:23:37 +01:00
|
|
|
|
2017-05-01 13:26:22 +02:00
|
|
|
void addFieldFormatter( QgsFieldFormatter *formatter /Transfer/ );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
They will take precedence in order of adding them.
|
|
|
|
The later they are added, the more weight they have.
|
2017-05-01 13:26:22 +02:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
Ownership is transferred to the registry.
|
2017-05-01 13:26:22 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
void removeFieldFormatter( QgsFieldFormatter *formatter );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Remove a field formatter from the registry.
|
|
|
|
The field formatter will be deleted.
|
2017-05-01 13:26:22 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
void removeFieldFormatter( const QString &id );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Remove the field formatter with the specified id.
|
2017-05-01 13:26:22 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
QgsFieldFormatter *fieldFormatter( const QString &id ) const;
|
|
|
|
%Docstring
|
2018-05-26 18:44:30 +10:00
|
|
|
Gets a field formatter by its id. If there is no such id registered,
|
2017-12-15 10:36:55 -04:00
|
|
|
a default QgsFallbackFieldFormatter with a null id will be returned instead.
|
2017-05-01 13:26:22 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
QgsFieldFormatter *fallbackFieldFormatter() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns a basic fallback field formatter which can be used
|
|
|
|
to represent any field in an unspectacular manner.
|
2017-05-01 13:26:22 +02:00
|
|
|
%End
|
2016-12-04 17:23:37 +01:00
|
|
|
|
|
|
|
signals:
|
2017-05-01 13:26:22 +02:00
|
|
|
|
|
|
|
void fieldFormatterAdded( QgsFieldFormatter *formatter );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Will be emitted after a new field formatter has been added.
|
2017-05-01 13:26:22 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
void fieldFormatterRemoved( QgsFieldFormatter *formatter );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Will be emitted just before a field formatter is removed and deleted.
|
2017-05-01 13:26:22 +02:00
|
|
|
%End
|
|
|
|
|
2016-12-04 17:23:37 +01:00
|
|
|
};
|
2017-05-01 13:26:22 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsfieldformatterregistry.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|