|
1 |
| -/*************************************************************************** |
2 |
| - qgsfieldformatterregistry.sip - QgsFieldFormatterRegistry |
3 |
| - |
4 |
| - --------------------- |
5 |
| - begin : 2.12.2016 |
6 |
| - copyright : (C) 2016 by Matthias Kuhn |
7 |
| - email : matthias@opengis.ch |
8 |
| - *************************************************************************** |
9 |
| - * * |
10 |
| - * This program is free software; you can redistribute it and/or modify * |
11 |
| - * it under the terms of the GNU General Public License as published by * |
12 |
| - * the Free Software Foundation; either version 2 of the License, or * |
13 |
| - * (at your option) any later version. * |
14 |
| - * * |
15 |
| - ***************************************************************************/ |
| 1 | +/************************************************************************ |
| 2 | + * This file has been generated automatically from * |
| 3 | + * * |
| 4 | + * src/core/qgsfieldformatterregistry.h * |
| 5 | + * * |
| 6 | + * Do not edit manually ! Edit header and run scripts/sipify.pl again * |
| 7 | + ************************************************************************/ |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
16 | 12 | class QgsFieldFormatterRegistry : QObject
|
17 | 13 | {
|
| 14 | +%Docstring |
| 15 | + The QgsFieldFormatterRegistry manages registered classes of QgsFieldFormatter. |
| 16 | + A reference to the QgsFieldFormatterRegistry can be obtained from |
| 17 | + QgsApplication.fieldFormatterRegistry(). |
| 18 | + |
| 19 | +.. versionadded:: 3.0 |
| 20 | +%End |
| 21 | + |
18 | 22 | %TypeHeaderCode
|
19 | 23 | #include "qgsfieldformatterregistry.h"
|
20 | 24 | %End
|
21 | 25 | public:
|
22 | 26 |
|
23 |
| - QgsFieldFormatterRegistry( QObject* parent /TransferThis/ ); |
| 27 | + explicit QgsFieldFormatterRegistry( QObject *parent /TransferThis/ = 0 ); |
| 28 | +%Docstring |
| 29 | + You should not normally need to create your own field formatter registry. |
| 30 | + |
| 31 | + Use the one provided by `QgsApplication.fieldFormatterRegistry()` instead. |
| 32 | +%End |
24 | 33 | ~QgsFieldFormatterRegistry();
|
25 | 34 |
|
26 |
| - void addFieldFormatter( QgsFieldFormatter* formatter /Transfer/ ); |
| 35 | + void addFieldFormatter( QgsFieldFormatter *formatter /Transfer/ ); |
| 36 | +%Docstring |
| 37 | + They will take precedence in order of adding them. |
| 38 | + The later they are added, the more weight they have. |
| 39 | + |
| 40 | + Ownership is transferred to the registry. |
| 41 | +%End |
| 42 | + |
| 43 | + void removeFieldFormatter( QgsFieldFormatter *formatter ); |
| 44 | +%Docstring |
| 45 | + Remove a field formatter from the registry. |
| 46 | + The field formatter will be deleted. |
| 47 | +%End |
| 48 | + |
| 49 | + void removeFieldFormatter( const QString &id ); |
| 50 | +%Docstring |
| 51 | + Remove the field formatter with the specified id. |
| 52 | +%End |
| 53 | + |
| 54 | + QgsFieldFormatter *fieldFormatter( const QString &id ) const; |
| 55 | +%Docstring |
| 56 | + Get a field formatter by its id. If there is no such id registered, |
| 57 | + a default QgsFallbackFieldFormatter with a null id will be returned instead. |
| 58 | + :rtype: QgsFieldFormatter |
| 59 | +%End |
| 60 | + |
| 61 | + QgsFieldFormatter *fallbackFieldFormatter() const; |
| 62 | +%Docstring |
| 63 | + Returns a basic fallback field formatter which can be used |
| 64 | + to represent any field in an unspectacular manner. |
| 65 | + :rtype: QgsFieldFormatter |
| 66 | +%End |
27 | 67 |
|
28 |
| - void removeFieldFormatter( QgsFieldFormatter* formatter ); |
29 |
| - void removeFieldFormatter( const QString& id ); |
30 |
| - QgsFieldFormatter* fieldFormatter( const QString& id ) const; |
31 |
| - QgsFieldFormatter* fallbackFieldFormatter() const; |
32 | 68 | signals:
|
33 |
| - void fieldFormatterAdded( QgsFieldFormatter* formatter ); |
34 |
| - void fieldFormatterRemoved( QgsFieldFormatter* formatter ); |
| 69 | + |
| 70 | + void fieldFormatterAdded( QgsFieldFormatter *formatter ); |
| 71 | +%Docstring |
| 72 | + Will be emitted after a new field formatter has been added. |
| 73 | +%End |
| 74 | + |
| 75 | + void fieldFormatterRemoved( QgsFieldFormatter *formatter ); |
| 76 | +%Docstring |
| 77 | + Will be emitted just before a field formatter is removed and deleted. |
| 78 | +%End |
| 79 | + |
35 | 80 | };
|
| 81 | + |
| 82 | +/************************************************************************ |
| 83 | + * This file has been generated automatically from * |
| 84 | + * * |
| 85 | + * src/core/qgsfieldformatterregistry.h * |
| 86 | + * * |
| 87 | + * Do not edit manually ! Edit header and run scripts/sipify.pl again * |
| 88 | + ************************************************************************/ |
0 commit comments