2658 Commits

Author SHA1 Message Date
Nyall Dawson
55fc40d87f Remove more deprecated methods from symbology 2016-09-13 11:05:45 +10:00
Nyall Dawson
a921c190d0 Remove deprecated members and fix TODOs for QgsFeatureRenderer 2016-09-13 11:05:45 +10:00
Nyall Dawson
e3313fac95 Test masks 2016-09-10 14:42:33 +10:00
Nyall Dawson
570e6936b6 Add a bunch of tests for legend grouping into columns 2016-09-10 14:42:33 +10:00
Nyall Dawson
4d0453eb52 Fix test try #5 2016-09-10 14:41:52 +10:00
Matthias Kuhn
5980165706 Testing the new online IDE github 2016-09-10 00:22:21 +02:00
Matthias Kuhn
fa67c55a6f One more try to get green light 2016-09-10 00:04:08 +02:00
Matthias Kuhn
f2fa09343e Fix tabwidget test for Qt5 2016-09-09 16:08:05 +02:00
Matthias Kuhn
9631688c85 [tests] Accept brief tags with <ref>erences 2016-09-09 14:26:27 +02:00
Matthias Kuhn
ac41436de3 Add QgsTabWidget
This is almost like the QTabWidget but has additional methods for
showing and hiding individual tabs
2016-09-09 14:26:27 +02:00
Matthias Kuhn
8cf0ef93c4 Add QgsOptional and QgsOptionalExpression 2016-09-09 14:26:24 +02:00
Matthias Kuhn
760816bb41 Public default constructor and comparison operator for QgsExpression 2016-09-09 14:25:58 +02:00
Nyall Dawson
d959384c8b Allow hiding clear button in QgsFilterLineEdit 2016-09-08 21:48:25 +10:00
Nyall Dawson
d71453d84a Add ability to set default values for QgsFilterLineEdit
and have clearing the widget reset to default rather than
null
2016-09-08 21:48:25 +10:00
Nyall Dawson
edcc247c3e Add unit tests for QgsFilterLineEdit, improve docs, add clearValue slot 2016-09-08 21:48:25 +10:00
Patrick Valsecchi
e533f0ccf8 Add widget to edit QVariantMap 2016-09-08 11:11:08 +02:00
Patrick Valsecchi
3d6e7c8bdb Add hstore support to the postgres provider 2016-09-08 09:51:46 +02:00
Patrick Valsecchi
8d9cf9de06 Fix auto conf of QgsRangeWidgetWrapper
The default range was 0..100, made it to min..max of the type.
QgsRangeWidgetWrapper is auto selected only for Int and Double QVariants,
now. The used widgets don't support 64 bits and Uint ranges.
2016-09-07 08:05:56 +02:00
Nyall Dawson
9ccbe179a4 Increase some test timeouts to handle when Travis is slow 2016-09-07 08:06:50 +10:00
Patrick Valsecchi
7169079f91 Smarter default edit widgets with plugins to pick them
Now the widgets factories can give a score on how good they could handle
a widget.

Additionaly, plugins can be added to choose a widget factory in function
of an external information. One of them uses a table in PostgresQL to
allow specification of the widget type and configuration.

I took the opportunity to remove a few deprecated method in relation to
this.
2016-09-05 14:22:17 +02:00
Hugo Mercier
b23e58a6d9 Restore virtual layer tests in PyQt5 2016-09-05 13:43:00 +02:00
Hugo Mercier
5c3a43e286 Fix spatialite access with python3 2016-09-05 13:43:00 +02:00
Matthias Kuhn
63654e5c79 Fix loading of editor widget configuration 2016-09-05 10:42:03 +02:00
Nyall Dawson
6dbdd4c24b Update test masks for qt5 2016-09-05 13:44:41 +10:00
Nyall Dawson
766ae97d35 Fix some errors when using python3 tempfile 2016-09-05 13:30:41 +10:00
Nyall Dawson
e54f9bee7a Fix PyQgsMapUnitScale test under qt5 2016-09-05 10:56:07 +10:00
Nyall Dawson
679797e22b [FEATURE] New simplify + smoothing expression functions
Exposes simplification and smoothing algorithms to expression
engine, via:

- simplify(): applies Douglas-Peucker geometry simplification
- simplify_vw(): applies Visvalingam-Whyatt geometry simplification
- smooth(): smoothes a geometry

Carto tip: use smooth along with geometry generators to minimise
the typical "GIS" noded look of rendered geometries!
2016-09-03 21:52:06 +10:00
Nyall Dawson
4d60d0cdb5 [FEATURE] Add option to QgsGeometry::smooth to not smooth
segments shorter than a certain threshold or sharp corners
with an angle exceeding a threshold

Expose the angle threshold to processing smooth algorithm

Also:
- optimise QgsGeometry::smooth for new geometry classes
- Fix smooth does not work with geometries containing Z/M
2016-09-03 08:31:33 +10:00
Hugo Mercier
b496376419 Merge pull request #3445 from mhugo/fix_virtual
Fix virtual layer queries with accents in layer name
2016-09-01 16:31:23 +02:00
Hugo Mercier
af0d6b93a6 Fix virtual layer queries with accents in layer name 2016-09-01 14:39:31 +02:00
Matthias Kuhn
665df5fbd6 Merge pull request #3436 from aaime/scaledep
Export map level scale based dependencies in most vector symbology
2016-09-01 13:28:48 +02:00
Nyall Dawson
88047cc984 Merge pull request #3441 from nyalldawson/simplify
Simplify features + fixes
2016-09-01 21:02:09 +10:00
Hugo Mercier
a86611b626 Cleanup layer dependency api 2016-09-01 09:58:37 +02:00
Andrea Aime
a25b0257a5 Export map level scale based dependencies in most vector symbology 2016-09-01 07:40:56 +02:00
Nyall Dawson
72d9e9ae35 Fix crash using Visvalingam simplification, add test 2016-09-01 07:35:30 +10:00
Hugo Mercier
0749ba43ba Rework layer dependencies
A new class QgsMapLayerDependency allows to represent different kinds
of dependencies between layers.
2016-08-31 14:40:13 +02:00
Hugo Mercier
1a5a7c5905 [Feature] Data dependencies between layers
This allows to declare data dependencies between layers. A data
dependency occurs when a data modification in a layer, not by direct
user manipulation may modify data of other layers.
This is the case for instance when geometry of a layer is updated by a
database trigger after modification of another layer's geometry.
2016-08-31 09:22:09 +02:00
Nyall Dawson
15dd29564c Fix Capitalize First Letter fails with curved labels (fix #14875)
Instead of using QFont's inbuilt capitalization support, which
applies only on rendering and accordingly fails for curved
labels which are drawn one character at a time, we now manually
capitalize label text while registering features.

The capitalize first method from Qt was reimplemented in QgsStringUtils
(together with what I expect is better handling of unicode characters
over the Qt method).

This change also makes it possible to implement other capitalization
methods not directly supported by Qt
2016-08-30 15:34:05 +10:00
Nyall Dawson
97d7b7339e Move storage of field alias and default value to QgsField
This is a partial implementation - QMaps are still used internally
within QgsVectorLayer to track the alias/default values
between attribute edit operations.

Sponsored by DB Fahrwegdienste GmbH
2016-08-30 12:40:55 +10:00
Nyall Dawson
4d5bae22b8 [FEATURE] Client side default field values
Allows an expression to be set for a vector layer field which
is used to evaluate a default value for this field.

A new method,
QgsVectorLayer::defaultValue( int index,
                              const QgsFeature& feature = QgsFeature(),
                              QgsExpressionContext* context = nullptr )
has been added which evaluates the default value for a given field
using the optionally passed feature and expression context. This
allows default values to utilise properties of the feature
which exist at the time of calling, such as digitized geometries.
The expression context parameter allows variables to be used
in default value expressions, making it easier to eg insert
a user's name, current datetime, project path, etc

Default values are set using QgsVectorLayer::setDefaultValueExpression()
and retrieved using defaultValueExpression()
2016-08-30 12:39:55 +10:00
Nyall Dawson
7dea9700a6 [FEATURE] Substitution list support for labeling
Adds the ability to specify a list of text substitutes to make
which apply to label text. Eg abbrevating street types.

Users can export and import lists of substitutes to make
reuse and sharing easier.
2016-08-30 12:39:54 +10:00
Matthias Kuhn
a529b448e7 Revert "Merge pull request #3338 from pvalsecc/editor_widgets_selection"
This reverts commit bbafbf48872eda48a2be8876cc89a0770552c6ad, reversing
changes made to 13ac0434e10fc7edd1eca665ea7c8b6cb5fd212d.
2016-08-29 19:22:04 +02:00
Matthias Kuhn
bbafbf4887 Merge pull request #3338 from pvalsecc/editor_widgets_selection
Smarter default edit widgets with plugins to pick them
2016-08-29 17:14:14 +02:00
Patrick Valsecchi
24bde35ce6 Smarter default edit widgets with plugins to pick them
Now the widgets factories can give a score on how good they could handle
a widget.

Additionaly, plugins can be added to choose a widget factory in function
of an external information. One of them uses a table in PostgresQL to
allow specification of the widget type and configuration.

I took the opportunity to remove a few deprecated method in relation to
this.
2016-08-29 07:42:50 +02:00
Patrick Valsecchi
db91330b66 Avoid back and forth with WKB in rendering 2016-08-29 06:55:52 +02:00
Nyall Dawson
235204fc3d Followup 9ba41e9, SQL convention is sum of no records=NULL 2016-08-29 13:41:13 +10:00
Nyall Dawson
7300cda86b Merge pull request #3435 from nyalldawson/interpolate_angle
Expression functions to Interpolate angle (+ related processing improvements)
2016-08-29 12:54:25 +10:00
Nyall Dawson
9ba41e9f27 Fix calculation of certain aggregates from expressions when no
matching features exist

Eg sum and count should return 0 in this case rather than
null
2016-08-29 12:08:28 +10:00
Nyall Dawson
da78ddeb7c [FEATURE] New expression functions for angle/distance interpolation
angle_at_vertex: returns average (bisector) angle to a geometry
at a specified vertex index
distance_to_vertex: returns distance along geometry to a specified
vertex index
line_interpolate_angle: calculates the angle parallel to a geometry
at the specified distance along the geometry

Sponsored by Andreas Neumann
2016-08-29 11:02:17 +10:00
Nyall Dawson
986b5313ed Add QgsGeometry method to get bisector of angle at vertex
Sponsored by Andreas Neumann
2016-08-29 11:01:52 +10:00