1270 Commits

Author SHA1 Message Date
Nyall Dawson
154468bd84 Add QgsStatisticalSummary class for calculating stats from a list
of values.
2015-05-02 23:19:39 +10:00
Nyall Dawson
bb0e583f4b Move methods for returning lists of values from a vector layer field
or expression to QgsVectorLayer. Add unit tests.
2015-05-02 20:32:16 +10:00
Nyall Dawson
fadaf12490 Implement implicit sharing for QgsField 2015-05-02 19:12:44 +10:00
Nyall Dawson
ce18a60bc7 Bump acceptable doc coverage 2015-04-30 17:27:35 +10:00
Nyall Dawson
721d9f5908 Formatting and code cleanups for QgsScaleExpression 2015-04-30 06:28:05 +10:00
vmora
70b91b6302 Add QgsScaleExpression subclass for sized based expressions 2015-04-30 06:27:59 +10:00
Matthias Kuhn
06180fe34d Reimplement QgsNetworkContentFetcher test with a local server
Reduces false alarms in unit tests due to network problems
2015-04-29 09:50:59 +02:00
Matthias Kuhn
c2fb5e19e2 Revert "Streamline singleton behavior"
This reverts commit b4a85471978b59b129c0299dfd14c1af00fef743.

The template based approach was not cross-platform friendly. When
cross-compiling for Android it caused a new instance of every singleton per
shared library.

Mostly using the magic statics pattern instead now:
See http://stackoverflow.com/a/11711991/2319028

Important things to remember for crash on exit:

 * QgsNetworkAccessManager needs to die before QApplication
 * QgsMapLayerRegistry needs to be emptied before QgsProviderRegistry goes away

And finally:
DON'T USE SINGLETONS!
They are for "one and only one" and not for "happens to be only one" situations.
2015-04-28 17:41:39 +02:00
vmora
0c5063fee6 Add method to create a QgsDataDefined from a string.
Automatically analyses to determine whether the string refers to
a column or is an expression.
2015-04-27 18:22:36 +10:00
vmora
d4319621a5 Add an isField test for QgsExpression
Checks whether expression consists of solely a field reference
2015-04-27 18:22:18 +10:00
Radim Blazek
1ac4b25289 [GRASS] more tests 2015-04-23 19:04:42 +02:00
Nyall Dawson
774e5d3012 Fix crash on QgsDataDefined copy (fix #12027) 2015-04-22 06:00:59 +10:00
vmora
8cb875546e Add unit test for QgsDataDefined copy 2015-04-22 06:00:45 +10:00
Juergen E. Fischer
51a7317c72 osgeo4w: fix running of grass test 2015-04-17 17:55:47 +02:00
Juergen E. Fischer
d79268cbd7 indentation update 2015-04-17 09:51:24 +02:00
Nyall Dawson
2722426059 Bump acceptable documentation coverage 2015-04-14 09:15:25 +10:00
Juergen E. Fischer
ad23f28059 fix grass provider test (followup 7219336) 2015-04-12 01:41:11 +02:00
Nyall Dawson
28b5217bb8 Merge pull request #1974 from vmora/graduated_by_size
[feature] graduated with varying size
2015-04-11 11:15:50 +10:00
Juergen E. Fischer
721933628b GRASS 6/7 build fixes:
* fix build on windows
* fix grass build on precise (using cmake <2.8.8, ie. without INCLUDE_DIRECTORIES target property)
* support desktop & browser shortcut for GRASS 6/7 in OSGeo4W nightly build
2015-04-10 14:44:10 +02:00
vmora
84af60ad56 [feature] graduated with varying size
The graduated symbol renderer now allows to use varying size instead of
varying color.

The classification remains the same an tabbed size/color in the gui
allows the use to choose one type or the other.
2015-04-10 09:14:14 +02:00
Radim Blazek
7c419bf269 [GRASS] test case 2015-04-09 10:55:08 +02:00
Nyall Dawson
77ede9ca61 Boost unit test coverage of paint effects 2015-04-09 06:56:34 +10:00
Juergen E. Fischer
12d7cfca03 indentation update 2015-04-07 14:27:39 +02:00
Nyall Dawson
fcaf5600f2 Optimise some headers for compile speed 2015-04-07 19:27:44 +10:00
Anatoliy Golubev
6850ce6205 Fix QgsRubberBand visibility behavior
Visibility behavior stays the same as in QGIS 2.6
Test included
2015-04-02 14:47:57 +03:00
Anatoliy Golubev
f11fdb044e Don`t change current visibility flag of rubberband on updates 2015-04-01 13:33:52 +03:00
Sandro Santilli
a844bfa174 Recompute rubberband extent on zoom/pan
Fix #12392
Includes testcase
2015-04-01 12:25:30 +02:00
Nyall Dawson
8b37ea2b05 [FEATURE] Add option to symbology to prevent clipping of features
This option (located under the symbol advanced menu) disables the
automatic clipping of lines/polygons to the canvas extent. In
some cases this clipping results in unfavourable symbology (eg
centroid fills where the centroid must always be the actual
feature's centroid). (fix #9757)
2015-03-28 21:16:45 +11:00
Nyall Dawson
742f3233ee [FEATURE] Paint effects for layers and symbol layers
This commit adds a new framework for implementing paint effects, which
modify the results of QPainter operations to apply visual effects
such as drop shadows and blurs.

The initial implementation allows for effects to be applied to entire
layers and individual symbol layers.

Included are a drop shadow, inner shadow, blur, inner glow, outer glow,
colorise and transform effect. A "stack" effect is also implemented
which allows other paint effects to be combined in various ways.

Sponsored by hundreds of generous kickstarter contributors!
2015-03-28 20:04:50 +11:00
Matthias Kuhn
264c0ec32a Add unit tests for virtual fields 2015-03-27 14:12:03 +01:00
Chris Crook
60fcc4d876 Merge branch 'carolinux-5605-types' 2015-03-22 08:55:38 +13:00
Chris Crook
0beb1707b6 Adapting longlong test to general type inference test 2015-03-22 08:51:42 +13:00
Chris Crook
532599e491 Merge branch '5605-types' of git://github.com/carolinux/QGIS into carolinux-5605-types 2015-03-21 20:57:02 +13:00
Larry Shaffer
12e0f358a8 Set GDAL env vars for when gdal lib is bundled in app on Mac 2015-03-20 11:48:09 -06:00
Juergen E. Fischer
f17755cec4 indentation update 2015-03-19 22:58:11 +01:00
Nyall Dawson
5c14c21b1d Implement smoothing algorithm for geometries 2015-03-19 23:26:59 +11:00
carolinux
48591dffbb Added testcase for longs 2015-03-19 17:12:23 +08:00
Nyall Dawson
7882fe2f25 Add methods for comparison of QgsPoint, QgsPolyline and QgsPolygon
These methods allow for fuzzy comparison of coordinates with a
specified tolerance.
2015-03-19 19:48:57 +11:00
Nyall Dawson
a4d17c0e9b Ignore position of thousands seperators when editing scale combo box
... be more permissive about the conversion from string to number
after a value is entered in the combo box (fix #12385)
2015-03-17 18:56:53 +11:00
Nyall Dawson
cafc722d92 Add some GDAL provider unit tests...
(...doing penance for my 2.8 sins)
2015-03-10 22:54:13 +11:00
Juergen E. Fischer
1aff7335d0 fix arm build 2015-03-09 09:57:20 +01:00
Sandro Santilli
10d2ce4584 Add tests for rotated map
Thanks Nyall for initial template.

Include tests for raster layers, SVG and simple markers
with data-defined or fixed rotation, parallel line labels.
2015-02-20 11:30:11 +01:00
Martin Dobias
e38b13c5d0 Fix rule-based renderer's descendants() method.
This was causing unexpected changes to rule keys on 3rd level and deeper
2015-02-19 15:45:40 +07:00
Nyall Dawson
7f2fac15dc Add some more test mask images
Also some debugging info for tests failing on certain platforms.
2015-02-19 16:24:11 +11:00
Nyall Dawson
854c0b8bab Allow use of masks for unit test control images
Masks set which pixels in the control image should be tested and
an optional tolerance for each pixel. This is done via the colors
in the mask image - white pixels are ignored, black must be an
exact match, and gray levels represent the maximum color component
deviation for that pixel.

This should replace the fragile anomaly images, in that a single
control image with a suitable mask will not be susceptible to
antialiasing differences, etc.

A new script (scripts/generate_test_mask_image.py) is included which
either creates a new mask or modifies an existing mask to handle
an acceptable rendered image.

Ultimately, masking along with multi render checks for specific
platform differences should be flexible enough to meet our needs.
2015-02-19 07:23:57 +11:00
Juergen E. Fischer
fc22bf19b1 identation update 2015-02-18 08:37:00 +01:00
Nyall Dawson
b0657b0fbc Fix unchecked return values 2015-02-18 17:35:47 +11:00
Nyall Dawson
d4f509f7a2 Avoid some mixing enum types warnings 2015-02-18 17:35:47 +11:00
Nyall Dawson
2d8feebbde Some very minor Coverity related fixes 2015-02-16 16:11:57 +11:00
Nyall Dawson
da092bf054 Coverity fixes: uninitialised members 2015-02-16 16:11:57 +11:00