Juergen E. Fischer
6f8f66eb49
indentation update
2015-01-03 01:50:39 +01:00
rldhont
a0ffad2532
[FEATURE] Add get and transform geometry in Expression
...
In version 2.6, new keywords has been added to Expression :
* $currentfeature - returns the current feature
* $atlasfeature - returns the atlas feature
* getFeature - gets a matching feature from a layer
But I think, Expression lacks a few keywords :
* geometry - returns the feature's geometry
* transform - returns the transformed geometry
These new keywords can be used with getFeature for some geometry tests like
intersects, crosses, contains, etc
Tests has been added to geometry and transform in Expression
2015-01-02 12:02:55 +01:00
Juergen E. Fischer
bff64fdef9
indentation update
2014-12-30 22:47:09 +01:00
Julien Nabet
e6561cec68
Fix cppcheck reports:
...
[src/providers/ogr/qgsogrprovider.cpp:1071]: (error) Memory leak: oldlocale
[src/providers/ogr/qgsogrprovider.cpp:1268]: (error) Memory leak: oldlocale
[src/core/spatialite/spatialite.c:50598]: (error) Memory leak: reader
[tests/src/core/testqgscolorscheme.cpp:155]: (error) Memory leak: dummyScheme2
[src/core/spatialite/spatialite.c:40138]: (error) Memory leak: ln
2014-12-30 22:47:08 +01:00
Anatoliy Golubev
d5d4a5adeb
Q_WS_* macros removed from Qt5, to determine platform use Q_OS_* macroses which exists in Qt4 and Qt5
2014-12-23 12:34:21 +03:00
Nathan Woodrow
d61bf1f70f
Add lazy evaluation support to expression functions
...
Add if(cond, true, false) function using lazy evaluation feature
2014-12-13 15:33:09 +10:00
Radim Blazek
69b27f04be
ziplayertest fix
2014-12-12 19:27:41 +01:00
Denis Rouzaud
ea33122a54
expression: more comments and test to avoid differences between operators declaration and text values
2014-12-12 15:28:57 +01:00
Sandro Santilli
917cee0510
Consider map rotation in rendering of horizontal and parallel labels
...
See http://hub.qgis.org/issues/11814
NOTE: the map rotation should likely be considered at LabelPlacement
configuration rather than at rendering time
Raises pixel mismatch tolerance for background labels tests
2014-12-12 11:22:32 +01:00
Sandro Santilli
bd4087b4d3
Tweak tolerances for CanvasPoint and ComposerPdfPoint PAL tests
...
.. to succeed on Ubuntu 14.04.1 LTS
2014-12-12 11:09:24 +01:00
Nyall Dawson
bcc29ff5d0
Add methods to QgsDataDefined for reading and writing to XML
2014-12-10 19:53:16 +11:00
Sandro Santilli
87de9f5b92
Test rotation API in QgsMapPixel unit test
2014-12-09 12:10:32 +01:00
Sandro Santilli
ec085bfbcc
Add unit test for QgsMapToPixel (legacy only for now)
2014-12-09 11:29:05 +01:00
Nyall Dawson
fd0e98d5f4
Ensure all items are deleted from TestQgsComposerTableV2
2014-12-09 19:20:16 +11:00
Nyall Dawson
7ca723920f
Merge pull request #1721 from nyalldawson/integer_divide
...
[expressions] Make int/int return double results
2014-12-09 18:37:48 +11:00
Sandro Santilli
ce8a9ba4af
Add support for map rotation (hub #9330 )
...
Includes widget to show and set map rotation.
Handle rotation in vector and raster renderers.
Ensure correct behavior of panning and zooming actions.
Drop compile-time defines for ARM and ANDROID, leaving only
the qreal based function to transform in place.
Update expected test results after eye comparison.
2014-12-07 16:30:41 +01:00
Nyall Dawson
232aaaca66
[expressions] Make int/int return double results.
...
Also add a new "//" operator to perform integer division.
(fix #5153 )
2014-12-06 16:36:42 +11:00
Nyall Dawson
697ef510b7
Also evaluate expressions entered in QgsSpinBox
...
and flip all composer spin boxes to QgsSpinBox (refs #10544 )
2014-12-05 23:39:50 +11:00
Nyall Dawson
7400106e41
[FEATURE] Evaluate expressions entered in QgsDoubleSpinBox
...
Allows entry of QGIS expressions into the spin box. The expression
is evaluated on enter or loss of focus and then discarded.
(refs #10544 )
2014-12-05 20:39:09 +11:00
Nyall Dawson
ad32bbf40c
Add some atlas reference images for precise (part 2)
2014-12-03 21:58:52 +11:00
Nyall Dawson
b07e4db27b
Add some atlas reference images for precise (part 1)
2014-12-03 21:23:25 +11:00
Nyall Dawson
3e6d784a62
Try increasing color tolerance for composer tests slightly
2014-12-03 19:44:13 +11:00
Martin Dobias
b278ea1a93
API: Added support for bulk loading of spatial index
...
This is much faster way of initializing a spatial index. From python it is as simple as
>>> index = QgsSpatialIndex( layer.getFeatures() )
From a simple test with 50K points in a memory layer:
- bulk loading ~ 100 ms
- inserting features ~ 600 ms
The index tree should be in theory also better constructed and may result in faster lookups.
2014-12-03 10:59:28 +07:00
Nyall Dawson
0f761949b8
Fix calculation of smart breaks when html has transparent background
...
Should finally fix troublesome composer html tests
2014-12-02 12:11:21 +11:00
Nyall Dawson
d815ac0061
Try to fix some more intermittent composer tests
2014-12-01 20:30:39 +11:00
Nyall Dawson
118a9f63dc
Add some missing exitQgis() calls to unit tests
...
Also ensure that compositions are deleted before exiting
Qgis during tests.
2014-12-01 19:52:04 +11:00
Nyall Dawson
48edab4fe6
Hopefully fix intermittently failing composer html test
2014-12-01 19:28:50 +11:00
Matthias Kuhn
7d8a3b1a29
Change unary minus test --1 to -(-1)
...
See http://lists.osgeo.org/pipermail/qgis-developer/2014-November/035835.html
2014-11-30 10:34:19 +01:00
Matthias Kuhn
77e62b97c1
Add line comments to QgsExpression
...
Delimited by double-minus and EOL/EOF
Example:
$id -- This is the feature id
2014-11-30 10:34:19 +01:00
Matthias Kuhn
13255b13ae
Add block comment tests
2014-11-30 10:34:18 +01:00
Nyall Dawson
d532af0b33
Add some test images and tweak test tolerances for utopic
2014-11-29 14:51:55 +11:00
Nyall Dawson
20f57c90d9
[composer] Make html tests text-free
...
Minimises cross platform rendering differences
2014-11-29 11:50:18 +11:00
Nyall Dawson
2ec4c2abd3
Regenerate incorrect test images and reenable atlas tests for travis
2014-11-25 06:13:19 +11:00
Matthias Kuhn
cae6baea90
Formatting of tests
2014-11-21 11:45:33 +01:00
Matthias Kuhn
95f6483855
Fix some race condition segfaults of tests on exit
2014-11-21 11:45:32 +01:00
Matthias Kuhn
78c519546a
Add Qt5 support
2014-11-21 11:45:32 +01:00
Juergen E. Fischer
a57066a48d
* fix cppcheck warnings
...
* some sip updates
* [API] fix spelling QgsMultiRenderChecker::drawBackround
* [API] fix spelling QgsSymbolLayerV2Utils::drawStippledBackround
* [API] fix spelling QgsMapSettings::layerTransfrom
2014-11-20 15:02:35 +01:00
Nyall Dawson
44a334b095
Add hasDefaultValues method to QgsDataDefined, add some tests
2014-11-20 21:28:34 +11:00
Nyall Dawson
09ab5696b1
Boost coverage of raster fill unit tests
...
Also add missing sip bindings for GUI widget
2014-11-19 22:24:02 +11:00
Matthias Kuhn
256b2652c3
Fix some warnings
2014-11-19 09:28:57 +01:00
Nyall Dawson
52159851bf
[FEATURE] Raster image symbol fill type
...
Allows for filling polygons with a tiled raster image. Options
include (data defined) file name, opacity, image size (in pixels,
mm or map units), coordinate mode (feature or view) and rotation.
2014-11-19 15:26:09 +11:00
Matthias Kuhn
7d7ac62f67
Add tolerance to shapeburst test
...
Fixes it on ubuntu trusty
2014-11-18 11:08:28 +01:00
Matthias Kuhn
581815f841
Fix atlas tests
...
* Recreates composition for every test and therefore removes internal
dependency
* Reorders method calls to make the test pass
* Disable the test until https://github.com/qgis/QGIS/pull/1688
2014-11-14 19:14:51 +01:00
Matthias Kuhn
f0efa6d8f4
Disable geometry simplify check
...
This test mixes different effects and is very unprecise in what it tests and
what it expects as result.
2014-11-14 18:30:30 +01:00
Matthias Kuhn
fd95930194
Switch QgsCompositionChecker to MultiRenderChecker
2014-11-14 18:30:29 +01:00
Nyall Dawson
31c32505bb
Switch to RGB32 images for composition checker
2014-11-14 18:30:29 +01:00
Nyall Dawson
2cfcca10d2
Use a non-transparent background for composition checker
...
Fix composerhtml tests on precise
2014-11-14 18:30:28 +01:00
Matthias Kuhn
eaf0d34587
Cleanup atlas composition tests
...
* Don't try to cache on 0-sized image
* Use qDebug instead of qWarning
2014-11-14 18:30:28 +01:00
Matthias Kuhn
81d3871048
Fix shapeburst test
...
Move to multirenderchecker
2014-11-14 18:30:28 +01:00
Matthias Kuhn
416f471e6d
[unit tests] Make qgis_rendererstest pass
...
Replace control image
2014-11-14 18:30:28 +01:00