mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-24 00:47:57 -05:00
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