1571 Commits

Author SHA1 Message Date
Martin Dobias
6cc1f4c2cb Fix unit tests and issues with cached layers
This code has been funded by Tuscany Region (Italy) - SITA (CIG: 63526840AE) and commissioned to Gis3W s.a.s.
2015-09-21 12:57:09 +08:00
Martin Dobias
d0fcc9557f More labeling engine refactoring
- QgsPalLabeling now internally uses new engine
- label/diagram providers can hook into rendering loop to avoid extra feature loops
- map rendering uses the new engine instead of QgsPalLabeling

This code has been funded by Tuscany Region (Italy) - SITA (CIG: 63526840AE) and commissioned to Gis3W s.a.s.
2015-09-21 12:57:09 +08:00
Martin Dobias
8100495df6 Integrate new labeling engine into the map rendering
Now used instead of QgsPalLabeling for labels/diagrams

This code has been funded by Tuscany Region (Italy) - SITA (CIG: 63526840AE) and commissioned to Gis3W s.a.s.
2015-09-21 12:57:09 +08:00
Martin Dobias
1d0d0e0662 [FEATURE] New API for labeling engine (QgsLabelingEngineV2)
The idea is to make the engine more flexible compared to QgsPalLabeling implementation:
- abstract dealing with text labels / diagrams from the engine itself
- allow multiple types of labels per layer
- support custom label providers (e.g. implemented by plugins)
- make the labeling engine independent from map rendering engine
- make it easier to auto-test the labeling engine and its components

This code has been funded by Tuscany Region (Italy) - SITA (CIG: 63526840AE) and commissioned to Gis3W s.a.s.
2015-09-21 12:57:09 +08:00
Nyall Dawson
e21cc78cc4 Fix failing test 2015-09-18 10:47:09 +10:00
Nyall Dawson
55027e545f Clean up and extend expression geometry functions:
- New expression functions for area(geom), perimeter(geom),
point_n(geom), start_point(geom), end_point(geom), make_point(x,y)
- Add new variant to length() function which takes a geometry object,
allows for length(geom) evaluation.
- Rename x_at, y_at to $x_at, $y_at (alias old names) to reflect that
these only work on current feature geometry
- Add x(geom), y(geom) functions which return x and y coordinate
for point geometries or centroid x/y for non-point geometries
(fix #11008)
2015-09-18 09:09:09 +10:00
Sandro Santilli
55dbc041a8 [FEATURE] Add num_points(geometry) support in expression evaluator
Includes tests and help text.
2015-09-17 14:23:19 +02:00
Nyall Dawson
586d59a432 [FEATURE] Add option to map unit scaling for limiting size in mm
Previously only the option to limit the scale range of the scaling
was available. Now you can also choose to limit the corresponding
rendered size in mm.
2015-09-17 20:35:27 +10:00
Nyall Dawson
b6930204c5 More QgsMapUnitScale tests 2015-09-17 20:35:16 +10:00
Nyall Dawson
f0a2fc1925 QgsMapUnitScale fixes:
- add docs
- add missing SIP bindings
- remove unnecessary cast from double->float->double
- add unit tests
2015-09-17 20:35:00 +10:00
Nyall Dawson
a62c6a917a Give symbol widgets optional access to a map canvas
This allows symbol widgets to fetch properties from the main map
canvas, for instance fetching the current scale from the map.
2015-09-16 21:57:27 +10:00
Nyall Dawson
59c43f194a [composer] Fix data defined map style/layer set, add test
(fallout from expression contexts)
2015-09-15 20:45:22 +10:00
Juergen E. Fischer
481d2c071e remove duplicate semicolons 2015-09-15 12:08:38 +02:00
Matthias Kuhn
b8b760e2bb Write important test output to travis console 2015-09-14 17:55:09 +02:00
Nyall Dawson
d897624704 [composer] Fix generation of world file when map is not on first page
fix #13262
2015-09-14 20:15:12 +10:00
Nyall Dawson
499d0da585 Update acceptable missing doc coverage 2015-09-14 09:24:28 +10:00
Juergen E. Fischer
23ea045d49 indentation update 2015-09-12 15:25:56 +02:00
mhugent
8640c13002 Merge pull request #2298 from nyalldawson/fix_13099
Fix #13099 - removal of geometries using node tool
2015-09-11 16:57:23 +02:00
Matthias Kuhn
efcbbfdaeb Move maptools from app->gui 2015-09-11 12:02:25 +02:00
Nyall Dawson
390ea4e9ba Sort variables in variable editor 2015-09-11 17:11:48 +10:00
Matthias Kuhn
23a9922c06 Sort tests in CMakeLists.txt 2015-09-09 17:40:26 +02:00
Sandro Mani
78a122cc54 Add QgsDataSourceURI test 2015-09-09 17:39:01 +02:00
Nyall Dawson
dbded4d91d Avoid some unnecessary QString construction 2015-09-09 19:17:50 +10:00
Nyall Dawson
f628ebd423 Replace foreach with Q_FOREACH
For:
- consistency
- to make it immediately clear that this is a Qt macro and that it
works slightly differently to c++ for loops
2015-09-09 19:17:29 +10:00
Nyall Dawson
7c10760225 Followup 73ffb83a, finishing changing all Q_FOREACH to references 2015-09-09 19:17:19 +10:00
Nyall Dawson
acd8f26a91 Fix removing whole ring by progressively deleting nodes (fix #13099) 2015-09-09 16:51:00 +10:00
Nyall Dawson
806da2d385 Fix QgsGeometry::insertVertex and deleteVertex compatibility with
<2.10 API and multipoint geometries

Also fix a crash in QgsGeometryCollection::removeGeometry
2015-09-09 16:11:09 +10:00
Nyall Dawson
fe5085e8e1 Fix up missing geometry tests (refs #13099) 2015-09-09 15:17:38 +10:00
Matthias Kuhn
93e9204b43 Add test for rulebased renderer else rule 2015-09-08 17:03:21 +02:00
Nyall Dawson
e8c3afa398 [FEATURE][composer] Custom format for grid annotations (fix #9292)
Allows composer map grid annotations in custom formats which are
evaluated using QgsExpressions. Made possible through the use
of Expression Contexts(tm)!
2015-09-08 17:31:34 +10:00
Nyall Dawson
94badce431 Avoid use of QString("") 2015-09-08 06:55:13 +10:00
Alessandro Pasotti
3043f7f960 Merge pull request #2296 from elpaso/qgsserver-return-pair
QgsServer handleRequest now returns QPair of QByteArray with headers and body
2015-09-07 18:05:28 +02:00
Nyall Dawson
5ae2881c81 Update test mask 2015-09-07 20:24:57 +10:00
Nyall Dawson
435aeeda66 Deprecate $rownum, replace with @row_number variable which is only
available when it is usable
2015-09-07 20:24:57 +10:00
Nyall Dawson
97096e2d6b Deprecate QgsExpression special column methods 2015-09-07 20:24:57 +10:00
Nyall Dawson
05c2e4de84 Remove use of special columns for composition/atlas
$atlasfeature/$atlasgeometry/$feature/etc have all been ported
to variables
2015-09-07 20:24:57 +10:00
elpaso
33cbe22096 Convert to type works for QPair of QByteArray 2015-09-07 09:57:32 +02:00
elpaso
a9f2acc57e [SERVER] QgsRequestHandler now returns a QPair
Much simpler GUI with a single method for all
cases. handleRequest now returns both headers and
body in a QPair.
Python binding returns a tuple of QByteArray.
2015-09-05 23:20:30 +02:00
Nyall Dawson
969fc9c1ca Fix build 2015-09-05 22:18:23 +10:00
Nyall Dawson
9133538a74 [FEATURE][composer] Advanced customisation of cell background color
for attribute tables

This allows users to set differing colors for alternating rows and
columns, first/last row/column and header row. Fixes #5131.

Sponsored by Ville de Morges
2015-09-05 22:06:31 +10:00
Nyall Dawson
1c079ead02 Expression context fixes:
- Fix python API break in QgsExpression::Function
- Add convenience methods for retrieving feature/fields from a
context
2015-09-05 22:03:16 +10:00
mhugent
86115435f5 Merge pull request #2290 from mhugent/geometry_marker
Geometry marker
2015-09-05 09:12:06 +02:00
Marco Hugentobler
56316ddcad Consider curved geometries in marker line symbol layer 2015-09-04 14:53:06 +02:00
Nyall Dawson
166e5bf9eb [composer] Make some set symbol methods clone symbol, nicer API
for PyQGIS (fix #13304)
2015-09-03 22:46:21 +10:00
Radim Blazek
cc1888255b [GRASS] fixed test 2015-09-02 18:57:35 +02:00
Nathan Woodrow
caa3c3461d Update theme test due to new API 2015-09-02 10:08:50 +10:00
Matthias Kuhn
524716fbcc Disable failing theme test 2015-09-01 17:37:30 +02:00
Nyall Dawson
a19cb945d0 Update doc coverage test
- Ignore deprecated stuff
- Ignore on_* members
2015-09-01 06:43:26 +10:00
Nyall Dawson
f9fa9793f0 [pal] Improved test for candidate against polygon obstacles
Previous test was just checking point in polygon for the corner,
mid points and center. This test was not sufficient for narrow
or small polygons which were not covered by these points
but were still covering parts of the label candidate.

Now, the area of the intersection between the obstacle polygon
and the label candidate is used to calculate the obstacle
cost.
2015-08-31 12:20:14 +10:00
Matthias Kuhn
1e6f673a23 Update email address 2015-08-30 13:00:15 +02:00