60 Commits

Author SHA1 Message Date
Nyall Dawson
4a6fef278e Cleanup docs, don't mention QString in python docs 2025-04-19 18:17:34 +10:00
qgis-bot
a7d8d418d1 auto sipify 🍺 2025-04-02 08:25:46 +00:00
Alexander Bruy
34aedd067d
Merge pull request #60710 from GispoCoding/59494_merge_policies
Add merge policies
2025-04-02 09:22:52 +01:00
Nyall Dawson
3f6b490218 Sipify 2025-04-02 11:11:10 +10:00
Juho Ervasti
d03746bd9f Add merge policy as a member in QgsField 2025-02-12 17:02:12 +02:00
Julien Cabieces
ed64834106 api(deprecated): add message to deprecated SIP annotation 2024-12-17 09:06:42 +01:00
Nyall Dawson
8f6b511b0b Fix class link 2024-09-04 13:54:39 +10:00
Nyall Dawson
ef0289f3ec Fix formatting of Python ..deprecated annotations in docstrings
Fixes https://github.com/qgis/pyqgis-api-docs-builder/issues/174
2024-09-02 11:42:12 +10:00
Nyall Dawson
3a578d6712 Header update 2024-08-13 20:28:55 +10:00
Nyall Dawson
6f652d251b Drop no-value copy constructor dox 2024-07-25 04:02:55 +10:00
Julien Cabieces
48bd417ded update qgsfield after rebase 2024-05-31 08:46:33 +10:00
Julien Cabieces
848fb16785 Add \deprecated tag 2024-05-31 08:46:33 +10:00
Julien Cabieces
97f1c8df97 make python API backward compatible 2024-05-31 08:46:33 +10:00
Julien Cabieces
0ccaf2d299 sipify 2024-05-31 08:46:33 +10:00
Nyall Dawson
280cd84652 Add more HoldGIL annotations to cheap methods 2024-05-24 16:34:33 +10:00
signedav
cfe71973c2 rename FieldDomainDuplicatePolicy to FieldDuplicatePolicy because - not like the Merge or Split Policy it does not affect the FieldDomains but only the Fields instead 2024-05-07 14:28:15 +02:00
signedav
ea4d9ce64b DuplicatePolicy like default value / dupicate / remove value to define what has to be done on duplicating a feature. 2024-04-22 10:32:19 +02:00
Even Rouault
15ea5c46bc
Header files: remove all mentions of '\since QGIS 3.0' 2024-02-18 20:57:23 +01:00
Even Rouault
02caeb9db7
Header files: remove all mentions of '\since QGIS 2.' 2024-02-18 20:46:01 +01:00
Nyall Dawson
7147f013ff Fix QgsField::ConfigurationFlag::None causes syntax error when
starting PyQGIS

We can't use `None` as a keyword exposed to python, it's reserved.
Also move the enum to Qgis before making it part of public stable
API.
2023-10-03 19:51:38 +10:00
Denis Rouzaud
68f025b2e5
expose QgsField configuration flags in python bindings (#54753) 2023-09-27 14:00:25 +02:00
Nyall Dawson
50c76929e1
Followup 30700f1, ensure links to Qgis members are set in docstrings 2023-03-31 10:46:24 +10:00
Nyall Dawson
5bd4648a05 Update since 2023-03-24 11:11:46 +10:00
Nyall Dawson
d37c0b5ce3 Ensure custom field metadata properties can be set/accessed from Python 2023-03-24 11:11:46 +10:00
Nyall Dawson
a87db9c91c Add capacity for storing additional metadata/properties in QgsField
This adds the API framework for storing additional, semi-structured
properties inside QgsField objects. The intention is that strong
field-type specific properties can be stored.

Eg for a geometry field type coming from the postgres provider
the metadata can be used to store the associated CRS and WKB types
so that clients can be aware of the correct format required for
geometries stored in that field. Instead of cluttering the QgsField
API with specific getters/setters for properties like crs(), wkbType(),
etc which only apply for a certain field type, the metadata map
approach helps us keep the API nice and slim.

The API has been designed to follow the approach used by various
Qt objects (such as QTextFormat) where a preset set of keys
are exposed as an enum, but additional ones can be used for
custom property storage. This allows for a more structured
use of properties with conventions which apply across different
providers (as opposed to a free-form string key approach).

Refs #49380
2023-03-24 11:11:46 +10:00
Nyall Dawson
34ed6caaac Add split policy to QgsField 2023-03-01 19:30:39 +10:00
Nyall Dawson
19b70a634f Use constexpr for max wkt length 2023-02-21 06:01:44 +10:00
Nyall Dawson
65cd1f5433 Fix geometry fields incorrectly show as "range" types in fields list 2023-02-15 08:45:45 +10:00
Nyall Dawson
711a615be3 Fix raises sphinx format 2021-06-25 10:50:04 +10:00
Nyall Dawson
4ff3f447dc Don't try to insert links in raises blocks in PyQGIS docs
These aren't formatted correctly if we do
2021-06-10 11:03:43 +10:00
Nyall Dawson
8359281012 Fix formatting of exception blocks in PyQGIS docs 2021-06-10 11:03:43 +10:00
Denis Rouzaud
ba8a445850 run sipify 2021-03-22 21:13:52 +01:00
Nyall Dawson
7dfef3a0b1 Newer doxygen versions don't auto convert the first line in a class'
documentation to a brief note, so we have to do it explicitly...
2021-02-19 08:15:29 +10:00
Nyall Dawson
50b9beaad6 [sipify] Catch more class references and insert :py:class: annotations 2021-01-31 05:41:22 +10:00
Julien Cabieces
87f8e1514e Display generated field as read-only is editors 2020-11-20 14:54:30 +01:00
Denis Rouzaud
7265d9de96 fix sip 2020-09-15 12:23:30 +02:00
Denis Rouzaud
fb7f7ba697 follow up renaming enum keys 2020-09-15 09:36:15 +02:00
Denis Rouzaud
9cf85dd1fe
better enum names, better dox
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2020-09-15 08:42:19 +02:00
Denis Rouzaud
de4a293ec5 use a readable string, fix flag keys, fix opening old project file 2020-09-14 13:25:08 +02:00
Denis Rouzaud
5dcca0ec2b
add configuration flags to QgsFields (#38634) 2020-09-10 22:50:29 +02:00
Nyall Dawson
aa93872f0d Provide more descriptive error messages when converting a field value
fails

And fix Python exception handling in QgsField::convertCompatible to
avoid Python "returned an object with the error set" error message
and instead just use the proper ValueError exception with a descriptive
exception message
2020-07-23 07:52:28 +10:00
Ivan Ivanov
050dfce89a FIX #15144 add tooltip on fields in identify window / attribute window / feature form
- added new `QString QgsField::displayType( const bool showConstraints = false )` to unify the display of field types whenever length or precision are present
- added new argument `expression` to `QgsFieldModel::fieldToolTip( const QgsField &field, const QString &expression = QStringLiteral() )`. Now the tooltip shows "<alias> (<field>)\n<type>\n<comment>\n<expression>" with appropriate formatting
- added meaningful field tooltips in the "Identify Results" dialog
- field tooltips show the same content in "Feature Attributes" form, "Attribute Table" and "Identify Tool"

Fixes #15144
2020-03-26 09:05:49 +10:00
Nyall Dawson
83dd2aa036 Move some non-error debug messages to QgsDebugMsgLevel 2019-11-25 12:43:10 +10:00
Matthias Kuhn
db838a3203 Fix qgsfield private header 2019-11-05 21:30:56 +01:00
Alessandro Pasotti
3aa927cc63 sipify 2019-11-03 10:04:07 +01:00
Alessandro Pasotti
0445c7088f
Update python/core/auto_generated/qgsfield.sip.in
Co-Authored-By: Nyall Dawson <nyall.dawson@gmail.com>
2019-11-01 08:59:24 +01:00
Alessandro Pasotti
cdf523e33d
Update python/core/auto_generated/qgsfield.sip.in
Co-Authored-By: Nyall Dawson <nyall.dawson@gmail.com>
2019-11-01 08:59:17 +01:00
Alessandro Pasotti
f20660c0dd field displayNameWithAlias
This adds another method to display field names with alias, this is to be used when
working close to the data structure (sql builder, expressions etc.) when the information
in the alias is sometimes fundamental to indentify what the field contains.

displayNameWithAlias is now used (insted of field name) in:

    expressions dialog
    query builder

The format is:

alias (field_name)
and, in case there is no alias:
field_name
2019-10-31 17:30:02 +01:00
Nyall Dawson
b6d66becab Sipify 2019-02-27 09:41:11 +10:00
Denis Rouzaud
3a19182fe8
add QgsField::isDateTime (#9007)
* add QgsField::isDateTime

* use QgsField::isDateTime

* rename to isDateOrTime
2019-01-28 13:53:16 -05:00