20504 Commits

Author SHA1 Message Date
Nedjima Belgacem
b88b080777
Camera navigation improvements (#45979)
Fixes two issues in camera navigation:
- Unintuitive camera rotation
- Wrong center point when zooming in/out and rotating

See https://github.com/qgis/QGIS-Enhancement-Proposals/issues/215

This PR employs the following changes:
- The zoom in functionality will zoom in towards the real 3D position of an object in the scene instead the camera view center point used previously.
- The rotation will use the real clicked 3D position of a pixel as well instead of the camera view center point.
- The press and drag behaviour is improved to shift the map in real 3D coordinates instead of some arbitrary measurement (you can see the clicked pixel following the cursor instead of drifting away).
2022-01-05 12:13:25 +01:00
Denis Rouzaud
795bb6a245 move QgsMapToolCaptureRubberband class to its own file 2022-01-03 10:55:40 +01:00
nirvn
406520f754 [processing] Add an optional output extent to the gdal raster calculator algorithm 2022-01-02 13:15:43 +07:00
Nyall Dawson
dbff1e16cc Also add signal for when layer rendering starts 2021-12-31 16:26:50 +10:00
Nyall Dawson
79d50657c7 Add layerRendered signal to QgsMapRendererJob
Can be used to provide progress feedback on map render jobs
2021-12-31 16:26:50 +10:00
Mathieu Pellerin
463561506e
Merge pull request #46654 from nirvn/scalecalc_canvaswidth
[feature] Add a QgsScaleCalculator function to calculate canvas width from a given extent, scale, and dpi
2021-12-30 15:31:41 +07:00
nirvn
17b9bb8a60 [processing] Add the missing optional extent param to the gdal clip raster by mask aglorithm 2021-12-30 11:22:37 +07:00
nirvn
83b5183ac2 [feature] Add a QgsScaleCalculator function to calculate canvas width from a given extent, scale, and dpi 2021-12-30 11:17:58 +07:00
nirvn
6e607313bd [feature] Handy null painter device class to use with map renderer custom painter jobs 2021-12-30 11:06:41 +07:00
nirvn
4131714907 [feature][api] Add a map settings / render context flag to skip symbol rendering 2021-12-28 20:04:49 +07:00
nirvn
4dbcd389fc [feature][api] Allow a custom label sink to be used with map renderer jobs 2021-12-28 20:04:49 +07:00
Marco Hugentobler
7fbabb6744 Re-add accidentally removed white-space 2021-12-23 13:25:57 +10:00
Marco Hugentobler
be6d9b5f61 Add bracket (in case %2 is an arithmetic expression) and add unit test 2021-12-23 13:25:57 +10:00
Nyall Dawson
89524fc565 Add missing file 2021-12-22 08:29:27 +10:00
Nyall Dawson
26c8fe9aa6 Indent JSON copied from processing history 2021-12-21 15:32:57 +10:00
Nyall Dawson
940270e91f Also show "Copy as Python" action in right click menu 2021-12-21 15:32:57 +10:00
Nyall Dawson
3714e25800 [feature][processing] As 'copy as json' and 'copy as qgis_process
command' actions to right click menu in history dialog
2021-12-21 15:32:57 +10:00
Nyall Dawson
adf290b2b2 Improve title for algorithms in history
Use a string with just the input values instead of the python
command
2021-12-21 15:32:57 +10:00
Nyall Dawson
cf0e266a15 Store results for processing algorithm executions 2021-12-21 15:32:57 +10:00
Nyall Dawson
af03701ab8 Add method to allow an existing history entry to be updated
Intended for use in storing the results of a long running operation.
E.g. a processing task would store the initial operation history
when the operation starts, and when it finishes it should update
that entry with the full log and output results.
2021-12-21 15:32:57 +10:00
Nyall Dawson
5e5540c890 [processing] Port algorithm log to new history provider API
No user visible changes, but we gain the flexibility for better
history storage, including the ability to store the outputs
calculated by the algorithm execution...!
2021-12-21 15:32:57 +10:00
Nyall Dawson
dd5cbb746e Add bulk addEntries method for efficiently adding many entries at once to history 2021-12-21 15:32:57 +10:00
Nyall Dawson
09389ca763 Add method to clear the history log 2021-12-21 15:32:57 +10:00
Nyall Dawson
6783347896 Implement framework for history providers
As per https://github.com/qgis/QGIS-Enhancement-Proposals/issues/130
2021-12-21 15:32:57 +10:00
Nyall Dawson
0d332d34ec [processing] Fix gdal algorithms immediately show wrong or missing
parameter value warnings

Fixes #46532
2021-12-21 15:32:08 +10:00
Nyall Dawson
8dc8331394
Merge pull request #46270 from gbd-consult/feature/metasearch
[MetaSearch] Save Settings
2021-12-20 11:35:15 +10:00
Nyall Dawson
5fd9b209ac [feature] Allow input parameter values for qgis_process to be
specified as a JSON object passed via stdin to qgis_process

This provides a mechanism to support complex input parameters
for algorithms, and a way for qgis_process to gain support
for parameter types which are themselves specified as a dictionary
type object.

To indicate that parameters will be specified via stdin then
the qgis_process command must follow the format

    qgis_process run algid -

(with a trailing - in place of the usual arguments list).

The JSON object must contain an "inputs" key, which is a map
of the input parameter values.

E.g.

    echo "{"inputs": {\"INPUT\": \"my_shape.shp\", DISTANCE: 5}}" | qgis_process run native:buffer -

Specifying input parameters via stdin implies automatically
the --json output format for results.

One big motivation behind this enhancement is to provide a way for
the qgisprocess R libraries to support parameter types such as
aggregates.

Refs https://github.com/paleolimbot/qgisprocess/issues/56
Refs https://github.com/paleolimbot/qgisprocess/issues/44

Sponsored by the Research Institute for Nature and Forest, Flemish Govt
2021-12-20 11:33:50 +10:00
Nyall Dawson
e0dfc46916 Fix typos 2021-12-17 08:29:31 +10:00
Nyall Dawson
86e94aed42 [feature] Add action to processing algorithm advanced menu to copy the
current settings as JSON and paste json settings from clipboard

The utility of this is two fold:

1. It provides a way for users to copy the settings defined in the
dialog in a text format, so they can store these easily and then
restore later by pasting the value

2. It provides an easy way for users to copy the settings into
the json format consumed by qgis_process (following
https://github.com/qgis/QGIS/pull/46497), so that it is easy
for users to see the expected format even for complex parameters
(like tin interpolation parameters)
2021-12-17 08:29:31 +10:00
Nyall Dawson
53d08d73e6 Add method to convert parameters for a processing algorithm to a JSON
serializable map
2021-12-17 08:29:31 +10:00
Nyall Dawson
84cf46a629 Add method to copy QgsProcessingContext settings as a json map 2021-12-17 08:29:31 +10:00
Nyall Dawson
fe471eacce Add method to QgsProcessingAlgorithm to create equivalent qgis_process command 2021-12-17 08:29:31 +10:00
Nyall Dawson
6315133c8b Add method to convert parameter value to a list of strings 2021-12-17 08:29:31 +10:00
Nyall Dawson
4e71e45ae2 Add method to convert QgsProcessingContext settings to equivalent
qgis_process arguments
2021-12-17 08:29:31 +10:00
Nyall Dawson
ee3257b8e9 Add api to convert a processing parameter value to a string, if possible
Designed for use in converting an algorithm's parameters for
representation as a qgis_process command line
2021-12-17 08:29:31 +10:00
Nyall Dawson
e73d51d660 Add api to convert a processing parameter value to a value which
is compatible with storage in a JSON object
2021-12-17 08:29:31 +10:00
Julien Cabieces
93399e33a3
Merge pull request #46037 from Koyaani/doc_generation
[Doc] Add folders for documentation generation
2021-12-16 15:09:01 +01:00
Antoine
bb15678134 update the doc in the sipfile 2021-12-16 09:34:50 +01:00
Matthias Kuhn
9500bfba6d
Merge pull request #46504 from kadas-albireo/master
Automatically remove attached files used as layer sources when layer is deleted
2021-12-16 06:24:04 +01:00
Nyall Dawson
132294b3c9 Spelling 2021-12-16 11:15:34 +10:00
Nyall Dawson
eea2ba3d93 QgsProcessingAlgorithmDialogBase subclasses should also implement
the QgsProcessingContextGenerator interface
2021-12-16 11:15:34 +10:00
Nyall Dawson
03d0c573c4 Add mode enum for processing algorithm dialogs so that code can
determine if the single execution or batch execution dialog is shown
2021-12-16 11:15:34 +10:00
Nyall Dawson
5333f17791 Ensure that createProcessingParameters implementation in AlgorithmDialog won't leak exceptions to c++ callers 2021-12-16 11:15:34 +10:00
Nyall Dawson
86794dabdc Fix interface for QgsProcessingParametersGenerator was modified for
the python subclasses only and no longer correctly overrides the
base class method
2021-12-16 11:15:34 +10:00
Alessandro Pasotti
25337c25b2
Merge pull request #46471 from nyalldawson/fix_44871
Fix setting manual table content through PyQGIS
2021-12-15 21:52:38 +01:00
Alessandro Pasotti
b1144173e4
Merge pull request #46505 from elpaso/expression-widget-layer-fields
Expose layers field names to expression widget
2021-12-15 14:54:22 +01:00
Sandro Mani
792ce7f962 Automatically removed attached layer sources when layer is deleted 2021-12-15 13:20:14 +01:00
Alessandro Pasotti
9a0c54c5c4 Expose layers field names to expression widget
Fixes #37544
2021-12-15 12:22:19 +01:00
Matthias Kuhn
fab5d8a84e
Merge pull request #46493 from suricactus/fix_misleading_docs
Fix misleading docs that is only valid if edit buffer is used (so does not work in transaction mode)
2021-12-15 11:49:02 +01:00
Nyall Dawson
d0718cbffe [feature] qgis_process now supports running a Python script algorithm
directly by specifying the path to the .py file in place of
an algorithm ID or model file path
2021-12-15 15:24:23 +10:00