4568 Commits

Author SHA1 Message Date
Nyall Dawson
37295ec48e Expose extra arguments to QgsGeometry::transform
Previously these were only available via the raw QgsAbstractGeometry
API.

Also add more unit tests for QgsGeometry::transform
2018-04-10 17:49:18 +10:00
Martin Dobias
f378a23ed8
[FEATURE] Projects in PostgreSQL
Merge of pull request #6752
2018-04-09 09:53:16 +02:00
Matthias Kuhn
e2bf9b9db1
Merge pull request #6716 from signedav/fix_embeddedrelation
Use always id as identification on drag&drop form creator for relations
2018-04-09 08:52:01 +02:00
Nyall Dawson
45c400c25c QgsSvgCache fetches remote SVG files in a background task
Previously QgsSvgCache would often try to fetch remote images
using a network request on the main thread, by calling
processEvents repeatedly until the request was complete.

This caused lots of bugs, since the main thread processEvents
would proceed with all kinds of stuff assuming that the
svg fetch operation was complete, leading to frequent crashes
and deadlocks and making remote svg use impossible (it's
likely that the SVG cache remote fetching code was written
in the pre-multi-threaded rendering era).

There's no way to fix this with async svg fetching - we
HAVE to remove the processEvents call, and a QEventLoop
won't help either (since the method may be called on the
main thread). Accordingly the only solution is to
fetch the requested svg in the background, and return
a temporary "downloading" svg for use in the meantime.
We use a QgsNetworkContentFetcherTask to do this, so it's
nicely integrated with task manager.

A request task is fired up when a remote svg is requested
for the first time, with the temporary downloading svg
returned for use by the caller asynchronously. QgsSvgCache
then emits the remoteSvgFetched signal when a previously
requested remote SVG has been successfully fetched,
triggering a map canvas redraw with the correct SVG
graphic.

Fixes #18504
2018-04-09 12:43:05 +10:00
Martin Dobias
42969a4794 Add project_basename to project expr context, project_path for custom impls 2018-04-07 16:56:03 +02:00
Martin Dobias
663a9ac26a Test fixes 2018-04-07 12:58:02 +02:00
Martin Dobias
2aabad96e7 Fixes after Nyall's review + doxygen fixes 2018-04-07 12:58:02 +02:00
Martin Dobias
3ccb6c3336 Fix spelling and doxygen doc 2018-04-07 12:58:02 +02:00
Martin Dobias
2bbdc34334 Deprecate QgsProject::fileInfo() 2018-04-07 12:58:02 +02:00
Martin Dobias
15f7ec7854 Add abstraction of project's absolute file path, base name, last modified 2018-04-07 12:58:02 +02:00
Martin Dobias
47d5b7fc11 Handle ssl mode, service, authcfg in postgresql project URIs 2018-04-07 12:58:02 +02:00
Martin Dobias
2e847e2e96 Support for project items in browser for PostgreSQL
Switched from using URLs in mime data to URI list for drag-n-drop of projects
so that they are handled in the same way as the other browser items.
2018-04-07 12:58:02 +02:00
Martin Dobias
ab83455d83 Store last modified time in project storage + retrieve it 2018-04-07 12:58:02 +02:00
Martin Dobias
0f5ea535cb Implement project storage for PostgreSQL + tests of the storage 2018-04-07 12:58:02 +02:00
Martin Dobias
5963028caf Extend project storage interface: remove/rename projects, GUI support 2018-04-07 12:58:01 +02:00
Martin Dobias
a30646f1cb Introduced QgsProjectStorage and QgsProjectStorageRegistry
This is going to be used as an abstraction of how/where project
files are stored.
2018-04-07 12:58:01 +02:00
Blottiere Paul
c47a6457b8 Do not save .qgd file alongside .qgs when it's not used 2018-04-06 11:00:08 +01:00
Nyall Dawson
ebab649438 Fix some locator filters show results when no string is entered
and filter prefix is not used
2018-04-06 12:44:56 +10:00
Nyall Dawson
2e7455c180 Add some geometry utils for interpolating points on lines 2018-04-06 12:43:52 +10:00
Nyall Dawson
63c5e74946 Fix clazy pass small and trivially copyable object by value warnings 2018-04-05 06:35:13 +10:00
Nyall Dawson
1ea20a4b35 Add method to swap x/y coordinates in geometries
This can be used to repair geometries which have
accidentally had their latitude and longitude coordinates
reversed.
2018-04-05 06:35:13 +10:00
Nyall Dawson
d5617b8025 [processing] Allow QgsVectorLayerSelectedFeatureSource to
create expression context scopes

Allows algorithms which require the underlying layer scope
to operate correctly when running in selected features only
mode.

Fixes #17170
2018-04-04 05:27:32 +10:00
Nyall Dawson
8326510e0e [processing] If an exception occurs while processing a feature
in a feature-based algorithm, don't try to continue processing
remaining features

Avoids multiple error dialogs appearing for every feature
in a layer...
2018-04-04 05:27:32 +10:00
Nyall Dawson
f4445a0493 [processing] Always log python exceptions to logger
Because Python code cannot catch and rethrow c++ exceptions
without losing context, we end up getting unknown exceptions
caught by c++ from python code (phew!).

So if we catch a python exception from processing, throw it
into the log so at least there's the full debugging detail
available on the console.

(Not ideal. Would love to see a PR allowing the full error
message to be passed correctly between c++/python/back again)
2018-04-04 05:27:32 +10:00
Nyall Dawson
08d30c3b9f [processing] Add method for algorithms to preprocess parameter values
Allows algorithms to pre-processes a set of parameters, allowing the
algorithm to clean their values.

This method is automatically called after users enter parameters, e.g.
via the algorithm dialog. This method should NOT be called manually
by algorithms.
2018-04-03 18:36:39 +10:00
Nyall Dawson
e1db9d4898 Fix doxygen warnings 2018-04-03 10:26:46 +10:00
Nyall Dawson
3eeb1b54e7 Spelling 2018-04-03 10:11:27 +10:00
Nyall Dawson
1bf1058210 Followup fcacb0d, fix doxygen tests
Also:
- move doxygen comments to header files so that they get included
in Python docstrings
- remove duplicate doxygen implemented in both header and footer
- remove some redundant doxygen for overridden methods
- add some missing docs
2018-04-03 09:49:00 +10:00
Juergen E. Fischer
fcacb0db7c doxygen fixes 2018-04-02 22:48:40 +02:00
Nyall Dawson
83f5486681 Support canceling network content fetching tasks 2018-04-02 08:42:21 +10:00
Nyall Dawson
e2f09fa662 Add a QgsTask for fetching network content
Provides a simple method for fetching remote HTTP
content in a QgsTask. Utilises QgsNetworkContentFetcher so
Url redirects and progress reports are automatically handled.
2018-04-02 08:42:21 +10:00
Nyall Dawson
bcf57c3356 Add method for QgsNetworkContentFetcher to fetch using request instead of url 2018-04-02 08:42:21 +10:00
Blottiere Paul
4be8baa683
Merge pull request #6679 from pblottiere/bugfix_will_render_feature
[bugfix] Fixes identify action on deactivated rules for QgsRuleBasedRenderer
2018-03-30 09:08:11 +01:00
Nyall Dawson
f02602b9bb [needs-docs] geometry smooth algorithm now also retains and smooths z/m values
...instead of just discarding them

Applies to processing algorithm and expression function (and
QgsGeometry::smooth method)
2018-03-30 08:59:00 +11:00
David
e0a539aeea generated sip file 2018-03-29 16:47:56 +02:00
Blottiere Paul
810e531bfc Add documentation for onlyActive parameter 2018-03-29 08:51:03 +01:00
Nyall Dawson
5d4e1bb31f Add intersection/tangent methods to QgsCircle 2018-03-29 17:40:40 +11:00
Mathieu Pellerin
93a6115c9e
[needs-docs] Use QgsTextRender to power up copyright decoration styling (#6684)
- we gain all of the styling capabilities of our text renderer engine (i.e. what powers
the rendering of labels)
- HTML support is gone for now, with virtually all of styling possibilities
covered by the above text renderer
2018-03-28 17:12:48 +07:00
Mathieu Pellerin
5fe1ea85bf
[needs-docs] Use QgsScaleBarRenderer to power up scale bar decoration (#6689)
Main short-term benefit: scale bar font size and family can be customized.
2018-03-28 15:55:48 +07:00
Blottiere Paul
0b5c2aeecc Recursive fix 2018-03-27 11:00:20 +01:00
Blottiere Paul
2cb1f43342 Fix sip binding 2018-03-27 09:14:02 +01:00
Nyall Dawson
1efb3cb9b0 Add missing /Out/ annotations 2018-03-27 17:34:24 +10:00
Nyall Dawson
4bfc808ee6 Add some circle intersection and tangent utilities to QgsGeometryUtils 2018-03-27 17:44:25 +11:00
Alessandro Pasotti
5eb9ab4813
Merge pull request #6644 from elpaso/gml-inverted-axis
Add axisOrder to QgsAbstractGeometry GML generators
2018-03-24 12:50:13 +01:00
Nyall Dawson
2eacc4c4b4 [FEATURE][layouts] Export project metadata in PDF/image exports
Includes project metadata in PDF exports, and supported image
based formats.

Image based metadata support depends on the format and the
Qt library's handling of each particular format (e.g. PNG
outputs are well supported).

Developed for Arpa Piemonte (Dipartimento Tematico Geologia e Dissesto)
within ERIKUS project
2018-03-22 16:13:30 +11:00
Nyall Dawson
a600b51bad [FEATURE][layouts] Export project metadata as SVG RDF metadata
Adds an option to include project metadata into SVG exports
generated from layouts, using the SVG RDF standard.

Developed for Arpa Piemonte (Dipartimento Tematico Geologia e Dissesto)
within ERIKUS project
2018-03-22 16:13:30 +11:00
Nyall Dawson
accdc23e0b Fix sip subclassing of metadata subclasses 2018-03-22 16:13:30 +11:00
Nyall Dawson
665f3e4cfc Spelling 2018-03-22 16:13:30 +11:00
Nyall Dawson
f4ed93e1ca Add project metadata mode to QgsMetadataWidget 2018-03-22 16:13:30 +11:00
Nyall Dawson
b10be8a8a3 Update metadata xml definitions 2018-03-22 16:13:30 +11:00