46 Commits

Author SHA1 Message Date
Nyall Dawson
2682a74a1b Fix clazy pass big type by ref, small by value warnings 2018-02-02 19:52:01 +11:00
Nyall Dawson
48c7e31ee1 Fix Coverity uninitialized member warnings 2017-11-11 15:44:14 +10:00
Nyall Dawson
2e6d125a6f Use =default, =delete where possible 2017-11-11 15:22:19 +10:00
David
f7073d0587 [FEATURE] Duplicate features including children (one level deep) when relation strength is competition - configuration for the relationsstrength in the relation GUI [needs-docs] 2017-10-25 17:04:48 +02:00
Nyall Dawson
04a9cd9211 Add more consistency to doxygen formatting 2017-10-06 08:19:00 +10:00
Nyall Dawson
92af1dacaf Replace default constructors/destructors with = default 2017-10-01 06:52:14 +10:00
Nyall Dawson
a87d352bd7 Run clang-tidy modernize-use-default-member-init to move member
initialization to headers (c++11 style)
2017-09-27 05:02:34 +10:00
Denis Rouzaud
56aa36e4be sipify QgsRelation 2017-04-19 15:19:14 +02:00
Nyall Dawson
dfb5f56f80 @see -> \see 2017-04-03 13:18:35 +10:00
Nyall Dawson
e47073b1e1 \return -> \returns (for consistency) 2017-04-03 13:18:35 +10:00
Nyall Dawson
e4daf8ea62 @return(s) -> \return(s) 2017-04-03 13:18:13 +10:00
Nyall Dawson
11dcfd935c @param -> \param 2017-04-03 13:17:27 +10:00
Nyall Dawson
0326f7142d Change doxygen @note to \note 2017-04-03 13:16:03 +10:00
Matthias Kuhn
fb91ed7395 Use "\since" instead of "@note added in" 2017-04-03 01:06:33 +02:00
Nyall Dawson
32326ab5df Replace "python" with "Python" in docs 2017-04-03 08:33:56 +10:00
Denis Rouzaud
40c056cae0 run astyle on src/core 2017-03-03 09:09:37 +01:00
Matthias Kuhn
7e6695b0a0 Expose QgsRelation to QML
API changes for consistency:
  - setRelationName has been renamed to QgsRelation::setName
  - setRelationId has been renamed to QgsRelation::setId
2017-02-20 08:45:54 +01:00
Nyall Dawson
d19e70700f Ensure all pointer variables are initialized to nullptr 2017-02-18 20:23:18 +10:00
Tudor Bărăscu
783fae1bc9 fix setRelationId description 2017-01-16 13:22:43 +02:00
Matthias Kuhn
b1e226c069 Add missing #include "qgis_core.h" 2017-01-05 16:49:00 +01:00
Nyall Dawson
32b1603c81 Update indentation 2016-11-08 08:57:51 +10:00
Nyall Dawson
1367fd09fc Prepare commit converts single line doxygen block format
Flips single line doxygen comments to use the proper single line
format:

/*!< comment */   to   //!< Comment

and

/** comment */    to   //! Comment
2016-10-25 09:17:39 +10:00
Even Rouault
702eace76c Merge pull request #3532 from pvalsecc/discover_relations
Add auto-discovery of relations for PostgresQL and SpatiaLite
2016-10-06 10:26:06 +02:00
Matthias Kuhn
b6779f63ff Rename QgsFields::fieldNameIndex() to lookupField()
To have two clearly different names for tolerant/intolerant index lookup
2016-10-01 15:39:03 +02:00
Patrick Valsecchi
31a1c23903 Add auto-discovery of relations for PostgresQL
Fixed the add relation functionnality: the table is sorted. When the code
was setting the sorted column, the row was sorted and the other columns it was
setting were set on the wrong row.
2016-09-27 16:36:33 +02:00
Nyall Dawson
4cfacf14e3 Make API more consistent
- rename methods with XML to Xml, CRS to Crs, WMS to Wms, ID to Id
- rename methods with SRS to Crs
- rename methods with abbreviations like "dest" to "destination"
- rename methods with abbreviations like "src" to "source"
2016-07-21 08:40:50 +10:00
Nyall Dawson
c628c0f434 Rework includes to forward declare as much as possible
Should speed up recompilation when headers change
2016-07-18 19:10:19 +10:00
Nyall Dawson
0a056f8a1f Add doxygen test to force use of \ingroup for classes
Using the group tag helps keep the API docs organized
2016-07-04 19:57:13 +10:00
Nyall Dawson
307aabd66a [FEATURE] Aggregates for expressions
This commit adds a number of different forms of aggregates to
the expression engine.

1. Aggregates within the current layer, eg sum("passengers")
Supports sub expressions (ie sum("passengers"/2) ), group by
( sum("passengers", group_by:="line_segment") ), and optional
filters ( sum("passengers", filter:= "station_class" > 3 ) )

2. Relational aggregates, which calculate an aggregate over
all matching child features from a relation, eg
relation_aggregate( 'my_relation', 'mean', "some_child_field" )

3. A summary aggregate function, for calculating aggregates
on other layers. Eg aggregate('rail_station_layer','sum',"passengers")
The summary aggregate function supports an optional filter,
making it possible to calculate things like:

aggregate('rail_stations','sum',"passengers",
  intersects(@atlas_geometry, $geometry ) )

for calculating the total number of passengers for the stations
inside the current atlas feature

In all cases the calculations are cached inside the expression
context, so they only need to be calculated once for each
set of expression evaluations.

Sponsored by Kanton of Zug, Switzerland
2016-05-17 10:53:25 +10:00
Nyall Dawson
d823be1ede Add some clarifications to QgsRelation api 2016-05-07 21:49:31 +10:00
Juergen E. Fischer
a90be95f7b sip sync 2016-02-14 03:50:49 +01:00
Nyall Dawson
c3a57434d9 Fix clazy 'pass small and trivially-copyable type by value' warnings 2016-02-02 19:47:21 +11:00
Nyall Dawson
881074b194 Boost coverage of SIP bindings
Now all classes and members are either exposed to bindings or marked
as "not available in Python bindings" in the docs.

Drop test thresholds to 0. Now it should be much easier to determine
what missing members have been added which are causing test
failures.
2016-01-05 11:16:15 +11:00
Matthias Kuhn
123a60e651 [sip, doxygen] Geometry modifier bindings
and lots of doxymentation
2015-12-10 12:33:43 +01:00
Matthias Kuhn
66b9b0dd10 Doxymentation for ebc9e029 2015-11-30 13:57:45 +01:00
Matthias Kuhn
ebc9e029f0 Relations are only valid if the id is set 2015-11-30 13:52:11 +01:00
Nyall Dawson
9319176a7c More clazy recommended optimisations:
- Use constFind instead of find where applicable
- Use midRef instead of mid
- const ref when using Q_FOREACH
- foreach->Q_FOREACH
2015-10-19 17:36:02 +11:00
Nyall Dawson
c49b5b777f Change a lot of arguments to const references in core/gui
Rationale:
- there was a lot of large objects passed by value, so potentially
there's a speed bump from this
- even for implicitly shared classes like QString/QList there's still
a (small) cost for copying the objects when there's no reason to
- it's the right thing to do!
2015-10-07 12:02:04 +11:00
Matthias Kuhn
1e6f673a23 Update email address 2015-08-30 13:00:15 +02:00
Matthias Kuhn
c93fdf9360 Fix warnings 2015-07-24 19:31:11 +02:00
Matthias Kuhn
d01424ae4b Add QgsRelation::getReferencedFeature to access parent feature 2015-07-24 18:57:24 +02:00
Denis Rouzaud
9e3183c63f Revert "sort includes"
This reverts commit 2b7d3d3c73b50ba6dc74abec6dd652ff1b87c0ec.
2015-06-10 14:54:47 +02:00
Denis Rouzaud
2b7d3d3c73 sort includes 2015-06-10 13:59:08 +02:00
Nyall Dawson
c3ec4b9eb0 [FEATURE][composer] Add option for showing child features from a relation
for attribute tables in the composer. If selected, the attribute table
will show all related features to the current atlas feature within
the table body. Sponsored by City of Uster, Switzerland.
2014-09-22 22:59:20 +10:00
Juergen E. Fischer
c4c131ef75 sip sync 2014-05-27 23:32:42 +02:00
Matthias Kuhn
dc3b56a13c Add relations capabilites and widgets 2013-10-07 16:17:43 +02:00