30 Commits

Author SHA1 Message Date
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
eba9ffa46e Add option to control the plain text display method for fields using
the checkbox form widget

In QGIS 2.x we always displayed the underlying raw value of a field
using the checkbox widget in the attribute table or in identify results
(i.e. the text display of the field would always match the value
the user had set for the checked or unchecked representation status,
e.g. "yes"/"no", "present"/"absent", etc)

This was changed in 3.0 so that the representation status ONLY affected
how the underlying stored values are mapped to a boolean true or false
value, and accordingly the attribute table/identify results started
only showing "true" or "false" strings.

This new setting allows users to control whether they want plain text
displays of the field to use the 3.x "true"/"false" behavior (the
default), or if they want to see the 2.x style actual field value.
2021-02-16 11:17:28 +10:00
Denis Rouzaud
ac40ed4fe6 fix sip 2020-03-18 10:04:52 +10:00
Matthias Kuhn
94fc1ba2af Add description to value relation widget
Add the possibility to add a description to each value in a value relation widget.
2020-03-12 16:30:22 +01:00
Alessandro Pasotti
36457fae02 Code layout 2 2020-03-04 08:52:52 +01:00
Alessandro Pasotti
195efa42a1 Final touches to the parent form API 2020-03-04 08:52:52 +01:00
David Signer
1f1a3fe6b7 pass field formatter context as a reference instead of a pointer to implify his not optionality 2019-12-19 21:08:02 +01:00
David Signer
e8b82c15b8 use of context to pass project and avoid QgsProject::instance() 2019-12-19 15:07:52 +01:00
David Signer
9e5657c8fe use of QVariantList instead of QList<QVariant> 2019-12-19 10:15:33 +01:00
David Signer
5e6e75662f available values in value relations 2019-12-16 18:28:18 +01:00
David Signer
54f4efbd86 available values of value map 2019-12-16 18:28:18 +01:00
David Signer
6baaae5340 get availableValues over the fieldFormatter 2019-12-16 18:28:18 +01:00
Alessandro Pasotti
a977343944 Test for relationreference field formatter deps 2019-12-13 13:36:06 +01:00
Alessandro Pasotti
4ad62aa6ff Move layerDependencies to formatter
... from the widget
2019-12-13 11:54:25 +01:00
Denis Rouzaud
be4bd42a2c fix spelling 2019-09-23 17:32:46 +02:00
Denis Rouzaud
e31e9a32b8 fix false boolean not shown as so in attribute table 2019-09-23 17:08:08 +02:00
Alessandro Pasotti
2d45ba8d68 Move the QgsProject singleton problem one step up 2019-06-11 09:22:31 +02:00
Alessandro Pasotti
a295701023 ResolveLayer returns a layer instance instead of an ID 2019-06-10 15:39:52 +02:00
Alessandro Pasotti
f9b50b5b38 Move layer resolver into a static method 2019-06-10 14:10:11 +02:00
Alessandro Pasotti
3f1ba81b7e Address PR comments (minor changes) 2019-05-27 09:20:34 +02:00
Alessandro Pasotti
564fd50e43 Fix spatialite handling of JSON arrays
Fixes #21986

plus:

- fix multiple string keys with commas in value relation widget
- more robust JSON and array (un)marshalling
- uniform array representation in value relation widgets
- lot of test coverage
- automatic QVariant type conversions in JSON utils
2019-05-27 09:20:34 +02:00
Nyall Dawson
b6d66becab Sipify 2019-02-27 09:41:11 +10:00
Matthias Kuhn
5fe225bb4d
Add cache for relation reference field formatter
this speeds up tables with relation reference fields massively
2019-02-20 18:58:17 +01:00
Nyall Dawson
c864d22d1f Add "get ..." to doxygen compliance blacklist
Should be "gets ..." for consistent tense, or better yet
"returns ..." for consistency.
2018-05-27 14:05:06 +10:00
Nyall Dawson
1c615c15cc More documentation compliance
Use Qt style "returns .." tense instead of "return ..", and lock
this in with a documentation compliance unit test
2018-05-25 15:09:00 +10:00
Alessandro Pasotti
673fac0c88 Added methods to search expression nodes and drop RegExp
- nodes() return the list of all nodes
- findNodes<T> returns a list of the nodes matching the class

Also drops the regexp for finding form attrs in the value-relation
expressions.

Other minor fixes as suggested in the PR review.
2018-05-15 18:32:40 +02:00
Alessandro Pasotti
541737681b Moved form feature to private and added setters/getters
plus other minor style changes as suggested by m-kuhn
in his PR review
2018-05-15 08:34:08 +02:00
Alessandro Pasotti
83328ae596 [feature] Form context expressions in value relation widget
The value relation widget filter expression can now use two
new functions/variables that have access to the current
values and geometry of the form being edited.

This allows for dynamic filtering (drill-down) as explained
in the crowdfunding page:
https://north-road.com/drill-down-cascading-forms/

The new functions/variables are:

Function:
get_current_form_field_value( 'FIELD_NAME' )

Variable:
@current_form_geometry
2018-05-15 08:34:08 +02:00
Denis Rouzaud
7df2593caf move auto generated sip file in dedicated folder 2018-05-14 10:23:37 -04:00