qgis / qgis4.0_api

Tracker for QGIS 4.0 API related issues and developer discussion
3 stars 1 forks source link

Standardize use of "field" / "column" #54

Open nyalldawson opened 8 years ago

nyalldawson commented 8 years ago

Throughout the API (and gui!) we mix and match use of the terms field and column. Eg we have methods like "referencedColumns" but use QgsField/QgsFields. I think these should standardized to just using one term, to make the Api more predictable and uniform.

My vote would go to using "field" instead of column

timlinux commented 8 years ago

or attribute....(instead of either field or column)?

nyalldawson commented 8 years ago

I don't think we use it consistently, but I believe "attribute" is supposed to be used for an individual feature's field value. Ie "state" is the field, features 1's state value is an attribute.

m-kuhn commented 7 years ago

Sounds like a good plan

Field for the model / data structure Attribute for the data / payload Columns if it's about a table (like "reorder columns" in the attribute table)

nyalldawson commented 7 years ago

Columns if it's about a table (like "reorder columns" in the attribute table)

What about the add/remove columns in attribute table (which are actually adding /removing fields)?

Otherwise +1

m-kuhn commented 7 years ago

What about the add/remove columns in attribute table (which are actually adding /removing fields)?

Since they change the data structure and the table is just a side-effect off this I would say fields.

nyalldawson commented 7 years ago

Since they change the data structure and the table is just a side-effect off this I would say fields.

agreed!

DelazJ commented 7 years ago

@nyalldawson

Throughout the API (and gui!) we mix and match use of the terms field and column.

About the GUI, can you point me to such places, please? This was supposed to be fixed in https://github.com/qgis/QGIS/commit/504c252c05235beb0fc2711162c28b375d08047d. any left over?