1919 Commits

Author SHA1 Message Date
Nyall Dawson
1b4bd47076 [composer] New QSortFilterProxyModel for filtering items by type
and new widget QgsComposerItemComboBox for showing matching composer
items.

Swap existing comboboxes to use the new widget, which removes a lot
of fragile code designed to allow selection of items. Additionally
the combobox now show the correct item id rather than always showing
"Map 0/1/..."
2016-04-09 09:38:09 +10:00
Nyall Dawson
4764b53518 [composer] Fix world file map is not restored from project 2016-04-09 09:38:09 +10:00
Denis Rouzaud
40f214b415 Revert "add todo QGIS 3: add /In,Out/ to QgsVectorLayer.addFeature (python)"
this works already, features are updated.

This reverts commit bf3f8b5920bc43cf528c9569a3d6b1000f0eef9f.
2016-04-07 14:25:42 +02:00
Denis Rouzaud
bf3f8b5920 add todo QGIS 3: add /In,Out/ to QgsVectorLayer.addFeature (python)
https://github.com/qgis/qgis3.0_api/issues/45
2016-04-07 13:29:43 +02:00
Nyall Dawson
39d0ba5781 [composer] Fix crash setting table columns from python 2016-04-07 18:47:01 +10:00
Jürgen Fischer
19b91032bd Merge pull request #2977 from rouault/wfs
First part of QEP 35: WFS provider enhancements
2016-04-07 10:18:22 +02:00
Nyall Dawson
3ba3986ae2 Fix calculation of diagram size in map units when using scale limits 2016-04-06 22:27:07 +10:00
Nyall Dawson
4c704be606 Add geometry methods for calculating the distance to a specified
vertex from the start of the geometry
2016-04-06 20:55:26 +10:00
Nyall Dawson
d464f86290 [FEATURE] Null ("No symbol") renderer
Using this renderer no symbol will be drawn for features, but labeling,
diagrams and other non-symbol parts will still be shown.

Selections can still be made on the layer in the canvas and selected
features will be rendered with a default symbol. Features being edited
will also be shown.

This is intended as a handy shortcut for layers which you only want
to show labels or diagrams for, and avoids the need to render
symbols with totally transparent fill/border to achieve this.

(fix #12131)
2016-04-06 20:55:26 +10:00
Nyall Dawson
2e44c11914 Some QgsPoint improvements
- Modernize QgsVector, improve docs, add some methods missing from
Python bindings
- Add method to QgsPoint to project a point by a specified distance
and bearing
- Add distance methods to complement existing sqrDist squared distance
methods
- Rename QgsVector::normal to normalized (avoid confusion with normal
vectors)
- Add more QgsPoint operators
- Add some more QgsPoint and QgsVector tests
2016-04-06 20:55:26 +10:00
Nyall Dawson
3a1f6c429d Improve documentation for QgsGeometry::closestVertex 2016-04-06 20:55:26 +10:00
Matthias Kuhn
4586a787b0 Move AutoTransaction setting to project properties
Was in global app settings
2016-04-06 12:17:38 +02:00
Even Rouault
62bd4061fe Add QgsDataProvider::invalidateConnections() and implement in Spatialite provider
This invalidates all cached connections to the given database name.
This will be used by the WFS provider to cleanup any cached connections before
removing its temporary Spatialite DB
2016-04-05 21:49:52 +02:00
Webmaster
7b233e514c [symbology] add half triangle markers 2016-04-05 22:28:52 +07:00
Matthias Kuhn
9c0a291046 Deprecate QgsProject::dirty( bool ) in favor of QgsProject::setDirty 2016-04-05 14:47:56 +02:00
Nyall Dawson
8948607f7d Followup 31d7be
Tweak some API and docs, and fix overlapping UI widgets
2016-04-05 22:13:16 +10:00
nirvn
dc5d7ab985 [diagram] make use of unit widget for diagram size 2016-04-05 15:21:54 +07:00
nirvn
31d7be4034 [diagram] add unit type setting for outlines (fixes #14614) 2016-04-05 13:49:46 +07:00
Nyall Dawson
882f6f8c3c [symbology] Add some more dispersed marker symbols (half/quarter squares) 2016-04-05 09:28:55 +10:00
Mathieu Pellerin
2adfbb078a [symbology] add semicircle, third, quarter circles to simple markers 2016-04-04 20:09:02 +10:00
Mathieu Pellerin
541463718d [FEATURE] add outline join style to ellipse markers 2016-04-04 14:38:52 +10:00
Nyall Dawson
ae00eb965c [FEATURE] Allow expression functions to use named parameters
This commit sets the framework for allowing expression functions to
use named parameters. Ie, instead of:

clamp(1,2,3)

you can use:

clamp( min:=1, value:=2, max:=3)

This also allows arguments to be switched, eg:

clamp( value:=2, max:=3, min:=1)

Additionally, it allows for a more structured definition of function
parameters to handle optional arguments and default values for
parameters. These are currently being done using a hacky infinite
argument list.

I've utilised the postgres ':=' syntax for specifying named arguments
to avoid potential collisions which may arise with the equality test
if we re-used just the '=' operator alone.

Sponsored by North Road
2016-04-04 13:59:13 +10:00
David Adler
5fe19c5f15 merged DB2 updates
[FEATURE] New vector data provider for DB2 sources
2016-04-04 07:55:50 +10:00
nirvn
6ad3537403 [FEATURE] add outline join style settings to simple markers
(fixes #3797)
2016-04-03 09:57:11 +07:00
Juergen E. Fischer
99d5e42247 [FEATURE] vector file writer: allow selection of attributes to export 2016-04-03 01:56:21 +02:00
Matthias Kuhn
e3de0c119a Move drag and drop designer python API to QgsEdtiFormConfig 2016-04-01 13:35:33 +02:00
Nyall Dawson
38fa2980ad [composer] Fix polylines would be removed if they had < 3 points
when deleting nodes (2 node lines should be allowed)
2016-04-01 14:23:19 +11:00
Nyall Dawson
90b6f46bf1 Use Qt methods for translating node coords to scene coords 2016-04-01 14:23:12 +11:00
Blottiere Paul
7a8a5411e0 [FEATURE][composer] Add tools for drawing polygon and polylines 2016-04-01 11:05:03 +11:00
Nyall Dawson
6526cf5a86 New QgsFontUtils::asCSS method for converting a QFont to a CSS
string representation (as close as possible)
2016-03-30 19:35:34 +11:00
Matthias Kuhn
93e73ac66f Make readOnly mode of vector layers configurable 2016-03-29 08:27:53 +02:00
Matthias Kuhn
54219c571f Centralize handling of non-identifiable layers in QgsProject 2016-03-29 08:27:53 +02:00
Juergen E. Fischer
271750fd53 switch bindings to pyqt wrappers 2016-03-21 17:00:26 +01:00
Nyall Dawson
5e08626051 Add QgsMapLayer::isSpatial() method
The current approach of testing !vl || vl->geometryType() != NoGeometry
is not intuitive and has been the source of 2 recent bugs.

Replacing these tests with the new isSpatial() function makes it
immediately obvious what is being tested. It also allows for
non-spatial plugin layers to be correctly handled by overriding
this method.
2016-03-16 12:38:16 +11:00
Nyall Dawson
96c60fdaec Workaround failing color ramp test on OSX, add some docs
Failure is odd.
c = r.stops()[0].color
self.assertEqual(c, QColor(100, 100, 40))

fails, but

s = r.stops()
self.assertEqual(s[0].color, QColor(100, 100, 40))

passes!
2016-03-16 10:10:07 +11:00
Matthias Kuhn
5789dd8e99 python3 compatibility fix 2016-03-15 08:18:39 +01:00
Juergen E. Fischer
fb3fcfa3a0 Python3/Qt5/2to3 updates:
* pyqtwrappers update (add QtNetwork, QtXml, QtSql, QtTest, uic)
* 2to3 updates
* move QPyNullVariant/NULL to PyQt.QtCore
* add global unicode/basestring/long for Python3
* expand QtGui, QtCore module and star exports
* Qscintilla2
* replace Set import with set builtin
2016-03-14 20:38:20 +01:00
Nyall Dawson
e72a82e04f Minor refactor of QgsDiagramLayerSettings
- add public getters and setters for variables, will make variables
private in QGIS 3.0
- avoid some memory leaks and potential crashes
- move calculation of referenced fields to diagram classes, out
of QgsVectorLayerDiagramProvider
2016-03-15 06:24:38 +11:00
Nyall Dawson
80afbeda93 Use doubles instead of float for min/max layer scales 2016-03-10 10:45:19 +11:00
Nyall Dawson
3b4638ab83 Followup 01f615d 2016-03-10 07:43:25 +11:00
Nyall Dawson
01f615d0d0 Merge pull request #2888 from pvalsecc/scaleDenom
Scale based layer visibility cosmetics
2016-03-10 07:42:25 +11:00
Patrick Valsecchi
a112dfe63e Make out of range layers greyed out in the tree 2016-03-09 09:56:15 +01:00
Patrick Valsecchi
3efc73be61 Made layers/labels visibility more consistent
Some places forgot to make the max scale inclusive.
2016-03-09 09:56:06 +01:00
Nyall Dawson
6be8d06dc6 Fix searching for symbols by tag (fix #14445), add tests 2016-03-09 15:22:34 +11:00
Nyall Dawson
ed3cb12008 [FEATURE] Parameterized svg support for composer svg images
This makes it possible to change SVG fill/outline color and outline
width when using parameterised SVG files such as those included
with QGIS (fix #10542)
2016-03-08 08:15:04 +11:00
Juergen E. Fischer
2eb82430bb use individual network managers for threads (fixes #13721, fixes #14401, implements #14192) 2016-03-05 12:28:24 +01:00
Matthias Kuhn
23546775d2 Python binding fixes for 2.5D renderer 2016-03-03 20:40:24 +01:00
Nyall Dawson
13ac821249 Fix build 2016-03-01 15:46:37 +11:00
Nyall Dawson
5612936836 Fix setting symbol for single symbol renderer via legend dbl click
Eg if diagram legend is also shown for layer it's possible for the
single symbol renderer to show a legend item.
2016-03-01 15:30:23 +11:00
Martin Dobias
5090491998 Allow plugin layers to set their source 2016-02-29 20:39:29 +08:00