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
1 parent
1fb7855
commit b399ee5
Showing
3 changed files
with
79 additions
and
26 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,35 +1,88 @@ | ||
/*************************************************************************** | ||
qgsfieldformatterregistry.sip - QgsFieldFormatterRegistry | ||
|
||
--------------------- | ||
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/qgsfieldformatterregistry.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
class QgsFieldFormatterRegistry : QObject | ||
{ | ||
%Docstring | ||
The QgsFieldFormatterRegistry manages registered classes of QgsFieldFormatter. | ||
A reference to the QgsFieldFormatterRegistry can be obtained from | ||
QgsApplication.fieldFormatterRegistry(). | ||
|
||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsfieldformatterregistry.h" | ||
%End | ||
public: | ||
|
||
QgsFieldFormatterRegistry( QObject* parent /TransferThis/ ); | ||
explicit QgsFieldFormatterRegistry( QObject *parent /TransferThis/ = 0 ); | ||
%Docstring | ||
You should not normally need to create your own field formatter registry. | ||
|
||
Use the one provided by `QgsApplication.fieldFormatterRegistry()` instead. | ||
%End | ||
~QgsFieldFormatterRegistry(); | ||
|
||
void addFieldFormatter( QgsFieldFormatter* formatter /Transfer/ ); | ||
void addFieldFormatter( QgsFieldFormatter *formatter /Transfer/ ); | ||
%Docstring | ||
They will take precedence in order of adding them. | ||
The later they are added, the more weight they have. | ||
|
||
Ownership is transferred to the registry. | ||
%End | ||
|
||
void removeFieldFormatter( QgsFieldFormatter *formatter ); | ||
%Docstring | ||
Remove a field formatter from the registry. | ||
The field formatter will be deleted. | ||
%End | ||
|
||
void removeFieldFormatter( const QString &id ); | ||
%Docstring | ||
Remove the field formatter with the specified id. | ||
%End | ||
|
||
QgsFieldFormatter *fieldFormatter( const QString &id ) const; | ||
%Docstring | ||
Get a field formatter by its id. If there is no such id registered, | ||
a default QgsFallbackFieldFormatter with a null id will be returned instead. | ||
:rtype: QgsFieldFormatter | ||
%End | ||
|
||
QgsFieldFormatter *fallbackFieldFormatter() const; | ||
%Docstring | ||
Returns a basic fallback field formatter which can be used | ||
to represent any field in an unspectacular manner. | ||
:rtype: QgsFieldFormatter | ||
%End | ||
|
||
void removeFieldFormatter( QgsFieldFormatter* formatter ); | ||
void removeFieldFormatter( const QString& id ); | ||
QgsFieldFormatter* fieldFormatter( const QString& id ) const; | ||
QgsFieldFormatter* fallbackFieldFormatter() const; | ||
signals: | ||
void fieldFormatterAdded( QgsFieldFormatter* formatter ); | ||
void fieldFormatterRemoved( QgsFieldFormatter* formatter ); | ||
|
||
void fieldFormatterAdded( QgsFieldFormatter *formatter ); | ||
%Docstring | ||
Will be emitted after a new field formatter has been added. | ||
%End | ||
|
||
void fieldFormatterRemoved( QgsFieldFormatter *formatter ); | ||
%Docstring | ||
Will be emitted just before a field formatter is removed and deleted. | ||
%End | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgsfieldformatterregistry.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