15677 Commits

Author SHA1 Message Date
Nyall Dawson
af365c6144 Create QgsNewsFeedParser class for parsing QGIS style news feeds
Designed to work with the server specs from https://github.com/elpaso/qgis-feed
2019-07-15 12:52:20 +10:00
Alexander Bruy
5709f84b2f [processing] add createByDefault argument to directory output
constructor
2019-07-15 08:51:01 +10:00
Alexander Bruy
9ed4d08d5b [processing] ignore hidden parameters when generating GDAL command (fix #30669) 2019-07-15 07:52:36 +10:00
Nyall Dawson
e0093e1d11 [processing] Don't abort when an algorithm step fails in batch mode
Instead, record errors and report them all at the end of the batch
process. If we abort the remaining batch steps when encountering any
error, this blocks a useful use of the batch mode and prevents users
from running a batch process over a large number of input files, some
of which may be invalid.
2019-07-15 06:35:14 +10:00
Nyall Dawson
956c6d694e Add python subclass code 2019-07-11 13:03:12 +10:00
Nyall Dawson
b84d294412 Dox++ 2019-07-11 13:03:12 +10:00
Nyall Dawson
b10fc70d37 Don't get distracted... 2019-07-11 13:03:12 +10:00
Nyall Dawson
22ae228a9d Dox 2019-07-11 13:03:12 +10:00
Nyall Dawson
b944dd4d23 Ensure messagebar is available for use by callout widgets in dock mode 2019-07-11 13:03:12 +10:00
Nyall Dawson
2cb8f72161 Data defined control over whether a callout is drawn 2019-07-11 13:03:12 +10:00
Nyall Dawson
a105f294cd Use registry to create correct callout widget 2019-07-11 13:03:12 +10:00
Nyall Dawson
1d2dfda254 Add minimum length property for callouts, setup framework for data
defined properties of callouts
2019-07-11 13:03:12 +10:00
Nyall Dawson
8575f95c89 Use a registry for callouts 2019-07-11 13:03:12 +10:00
Nyall Dawson
b298a197e7 Start on registry 2019-07-11 13:03:12 +10:00
Nyall Dawson
4cb31b0694 Experiment with a manhattan line callout style 2019-07-11 13:03:12 +10:00
Nyall Dawson
fb1a610007 Early prototype of label callouts 2019-07-11 13:03:12 +10:00
Nyall Dawson
7833162ca0 [processing] Fix occasional crash in Processing gui unit test cleanup 2019-07-11 10:36:59 +10:00
Nyall Dawson
142308e712 Add a start/stopRender method to QgsPalLayerSettings
This allows us a chance to correctly call start/stopRender on all
symbols which are used as part of the labels and ensure they are
nicely prepared and cleaned up.

Also adapt labeling engine to add calls to startRender/stopRender where
appropriate.
2019-07-10 10:05:06 +10:00
Nyall Dawson
be23525a5e Use a non-const QgsRenderContext& when preparing labeling providers,
for compatibility with symbology (which requires non-const context)
2019-07-10 10:05:06 +10:00
Nyall Dawson
51ed8c95b2 Dox++ 2019-07-10 08:10:49 +10:00
Nyall Dawson
0cdad2307b Add api to allow reading a QgsProject file without loading any layers
This causes the project to be read, but no data providers created for
layers (i.e. the same result as loading a project in the app and
choosing to leave bad layers in the project).

It's intended for occasions when you want to efficiently access properties
of a project without the (often very expensive) cost of actually
loading layers. E.g. to just read project metadata, parse the
layer tree structure, extract print layouts or renderer properties, etc.
2019-07-10 08:10:49 +10:00
Alexander Bruy
84c530b97b [processing] make color parameter available to description-based algs 2019-07-09 06:14:48 +03:00
Nyall Dawson
e65acadc3a [processing][API] Add methods to retrieve lists of files from
QgsProcessingParameterMultipleInput

These need to be handled differently to map layers, and none of
the existing API works for this use case.
2019-07-09 11:22:36 +10:00
Nyall Dawson
ec246e3ddb [processing] Fix batch mode 'fill with parameter values' option for outputs
Fixes #30543
2019-07-09 07:20:20 +10:00
Ismail Sunni
edd921c428 [FEATURE] Measurement tool in 3D map view (#30299)
* Add measurement tool bar.

* Add class for measure line.

* Get coordinate of clicked point.

* Add clicked point to string line.

* Store clicekd points to layer.

* Try to render the measurement line.

* Render the measurement line (with some problems).

* Store points in vector.

* Make identify and measure tool exlusive to each other.

* Add measurement dialog.

* Fix only one action must active.

* Some code suggestion from Martin.

* Revert code to show the line.

* Show segment length and the total.

* Implement close dialog means restart 3d measurement.

* Add new button.

* Add unit combo box.

* Fix shadowing private member of class.

* Add slot to combo box unit changes.

* Hide ellipsoid and cartesian radio button.

* Add measure line for QgsPoint.

* Add unit changes feature.

* Add help (pointed to 2D measurement tool).

* Add finish measurement using right click.

* Remove keypress event, it does not make sense.

* Add remove-last-point with middle button.

* Add crsChanged event.

* Remove confusing tooltip.

* Add pan (camera control) action tool for clear state of 3d map tool.

* Change 3D identify tool cursor.

* Fix distance 2D to 3D.

* Remove unclear method.

* Add unit test for measureLine3D.

* Add 3D measurement setting.

* Add header.

* Make extra 3D renderers refresh the scene when they are updated

+ update the 3D renderer every time the measurement line layer is modified

* Set Altitude clamping to absolute.

* Remove options for 3D measurement line.

* Remove help button in 3D measurement dialog.

* Merge duplicate code for handle clicked position.

* Use color for 3d measure line from 2d one.

* Remove unneeded reimplementation method.

* Remove 2D canvas reference.

* Unify update measurement layer.

Use local variable for feature and line

* Create measurement layer once.

* Use data provider to change the geometry.

* Add length3D for QgsLineString.

* Simplify distance calculation and presentation. Remove QgsDistanceArea measurement.

* Descaled z value based on the terrain vertical scale.

* Remove line when tool is deactivated.

* Enable changing the line color from setting, but after re-activation.

* Update color of measurement line after saving option.

* Remove debug message.

* Remove 3D length calculation from distancearea.

* Handle 2D case for length3D, more unit test, and docstring.

* Fix typos.

* Addressing Martin's and Nyall's review.

* Remove setMeasurement to avoid confussion.
2019-07-08 15:21:00 +02:00
Nyall Dawson
e05572a11d Port file parameter definition widget to new APi 2019-07-08 15:07:42 +10:00
Nyall Dawson
e9a1eab694 [processsing][API] Add api to allow QgsProcessingParameterFile parameters
to have a file filter string defined

Previously only an extension was settable, which prevented use when
multiple extension types are possible. A file filter string allows
for flexible file selection instead.
2019-07-08 15:07:42 +10:00
Nyall Dawson
aa8d5cd22e [processing] Fix API break which breaks some 3rd party providers (e.g. R and Javascript providers) 2019-07-08 13:26:55 +10:00
Nyall Dawson
fb359049ee Fix dox 2019-07-08 12:42:02 +10:00
Nyall Dawson
d03c9d5053 Show bounds of operations in transform selection dialog 2019-07-08 12:42:02 +10:00
Nyall Dawson
337f1d95f5 Move coordinate bounds map to its own reusable widget 2019-07-08 12:42:02 +10:00
Nyall Dawson
dd9dfb0d08 Show authority:code identifiers on transform selection dialog
Many scopes/remark cross reference these, so by showing them in the
table of available operations we give users more clues how to pick
the correct one.
2019-07-08 12:42:02 +10:00
Nyall Dawson
ac0326a351 [API] Add useful PyQGIS additions to QgsSymbol
Adds:
- __len__ : returns number of symbol layers in symbol
- [ ] getter: returns a specific symbol layer, also allows negative indices to retrieve from end of symbol
- del [ ]: removes a specific symbol layer, also allows negative indices
- raise IndexError when an invalid symbol layer is requested
- allow iteration over symbol layers using
  for layer in symbol:
     print(layer.color())
2019-07-08 08:41:59 +10:00
Nyall Dawson
f3dcd8211e Dox, comments 2019-07-06 12:36:54 +10:00
Nyall Dawson
87f10e140e Fix generation of enum class Pydocs 2019-07-06 12:36:54 +10:00
Nyall Dawson
4f5f6b5607 Add a generic method for adding style entities to a QgsStyle 2019-07-06 12:36:54 +10:00
Nyall Dawson
590d1aae9d [FEATURE][API] Visitor API for style entities
Adds a new visitor pattern API for creation of visitors which visit
all the style entities (symbols, color ramps, text formats, and
label styles) associated with different objects. Can be used on a
renderer, map layer, or project wide level.

E.g. on a project wide level, allows collection of ALL the style
symbols/color ramps/text settings inside a project, including those
in layouts or annotations!
2019-07-06 12:36:54 +10:00
Alessandro Pasotti
3a05312121
Merge pull request #30548 from elpaso/bugfix-gh30387-gpkg-project-relative-paths
Fix relative storage for GPKG projects
2019-07-05 14:21:12 +02:00
Alessandro Pasotti
75defad55c Remove warning 2019-07-05 13:33:27 +02:00
Nyall Dawson
7f491513e7 Further improvements to transform selection dialog
- Show area of use information, which gives users much more context
and clues for selecting the right transform from the list
- Fix missing scope and remarks for single operations
2019-07-05 05:53:13 +10:00
Alessandro Pasotti
b92012ccae Fix relative storage for GPKG projects
Fixes #30387
2019-07-04 11:23:56 +02:00
Alexander Bruy
d3091e7d64 [processing][needs-docs] allow to set tiles background (fix #30490) 2019-07-03 12:15:47 +03:00
Nyall Dawson
39724c2a48 When building on proj >= 6.2, show the full scope and remarks
for coordinate operations

Gives much more useful information to users to allow them to make
informed choices about suitable operations
2019-07-03 05:11:31 +10:00
Nyall Dawson
13fe327eb9 Fix cloning a vector layer loses all features if the layer is a memory layer 2019-07-02 10:10:11 +10:00
Nyall Dawson
164f6aec6b Spelling 2019-07-01 17:01:34 +10:00
Nyall Dawson
074c584c54 Don't allow name-less parameters 2019-07-01 17:01:34 +10:00
Nyall Dawson
b8e53dc012 Add missing visual links between layout and layout item parameters in models 2019-07-01 17:01:34 +10:00
Nyall Dawson
a9788339ea Port an item type which has a parent parameter choice (layout items) for reference 2019-07-01 17:01:34 +10:00
Nyall Dawson
d83997c490 Port string parameter to new config widget 2019-07-01 17:01:34 +10:00
Nyall Dawson
477d3b1f1a Port boolean widget config dialog to new API 2019-07-01 17:01:34 +10:00