3053 Commits

Author SHA1 Message Date
Nyall Dawson
b5fb85bf7a Add missing signals to QgsAuthSettingsWidget 2021-09-27 15:38:20 +10:00
Nyall Dawson
0ab6113e88 Promote QgsMapSettings and QgsRenderContext enums to enum class, move to Qgis 2021-09-26 11:24:51 +10:00
Nyall Dawson
f9def2d92b Move QgsMapToolCapture::layer to parent class (QgsMapToolAdvancedDigitizing) 2021-09-24 16:21:44 +10:00
Nyall Dawson
db4b0fed86 Move to core 2021-09-24 15:47:10 +10:00
Nyall Dawson
d1e43b63fb Add new class QgsRecentStyleHandler
Accessible via QgsGui::recentStyleHandler(), this is intended as
a place to store recently used style items (e.g. symbols).

Initially it's used just for annotation items so that newly
created annotation items are automatically set to the same style
as the most recently modified item of the same type (e.g. so
that users drawing many point annotations don't need to keep
setting it back to the same appearance)! But the api is kept
flexible for additional uses in future... (eg layout items)
2021-09-24 15:47:10 +10:00
Even Rouault
988d862fb5 New shapefile layer dialog: avoid accidental overwrite of a file whose extension is not specified
and avoid closing the dialog when the user doesn't confirm overwriting

Fixes #44299
2021-09-24 13:42:35 +10:00
Even Rouault
0e45d513a8 QgisApp::closeProject(): cancel canvas jobs before closing the project, to avoid rendering jobs to access deleted objects (fixes #44144) 2021-09-24 12:40:53 +10:00
Sandro Mani
6fd34ca92b Add sip5/sip6 sip-build support 2021-09-24 08:56:40 +10:00
Nyall Dawson
139cc2d3b4 Dynamically change x/y constraint precision based on geographic/non
geographic crs
2021-09-24 08:13:32 +10:00
Nyall Dawson
a94dd8b3c1 Allow CAD dock to be used for geographic CRS, but only allow
the x/y/z/m constraints to be set (not distance or angle based
constraints)
2021-09-24 08:13:32 +10:00
Peter Petrik
b4ec12041f
Merge pull request #45140 from vcloarec/tuneMeshEditingWithAdvancedZvalue
Adapt mesh editing following new CAD Z value
2021-09-21 08:11:11 +02:00
Nyall Dawson
d47dc4b210 Expose choice of units for geometry generator symbol layers
Usually a geometry generator expression must return a geometry
in the associated layer's CRS. But this doesn't work in situations
where a geometry generator symbol is NOT associated with a layer,
e.g. when used in a layout item.

So add a new option to allow users to specify which unit the expression
will return geometries in, with choices of map units (the default,
previous behavior), millimeters, pixels, inches and points.

When millimeters, points, inches or pixels is selected then
the @map_geometry variable will be available for the expression,
and contain the feature's geometry in the specified units (relative
to the map frame). (The $geometry variable remains available and
still in layer CRS, in case an expression needs to calculate the
original area, perimeter, etc in real-world units while returning
results in a different unit!)

A step toward fixing #39159
2021-09-21 09:49:52 +10:00
vcloarec
bb09d06e2a use constraint cad Z value for mesh editing 2021-09-19 18:34:07 -04:00
Nyall Dawson
73ced5dd80 Fix digitizing features using CAD dock when layer CRS != canvas CRS 2021-09-18 05:34:32 +10:00
rldhont
909859188c
Merge pull request #44862 from 3liz/metadata_api_july
Enable many MetadataUrl on the server side
2021-09-17 15:14:01 +02:00
Alessandro Pasotti
251ebd20c0 Fixes custom ellipsoid locale double input
Fixes #45015

Funded by: QGIS Grant 2021
2021-09-17 13:27:59 +10:00
Etienne Trimaille
a3df6b6649
UI - Update vector and raster to be able to add many metadata urls on server side 2021-09-16 14:23:42 +02:00
Alessandro Pasotti
adf102a839 Use QgsRasterTransparencyWidget in raster properties dlg
Remove a bunch of duplicated code and fix #44949
2021-09-14 17:00:10 +02:00
Nyall Dawson
50ab8c1c81 Cleanup API docs for QgsCadUtils 2021-09-13 13:22:28 +10:00
Loïc Bartoletti
f4383aaa5b fix api break for pointChanged. use pointChangedV2 2021-09-13 08:03:46 +10:00
Loïc Bartoletti
99af22b977 fix api break for current,previous,penultimatepoint 2021-09-13 08:03:46 +10:00
Loïc Bartoletti
42794288ab 3.20 -> 3.22 2021-09-13 08:03:46 +10:00
Loïc Bartoletti
a5fca0b9a5 Use values from DockWidget instead of snapped ones 2021-09-13 08:03:46 +10:00
Loïc Bartoletti
d81d236540 fix sip 2021-09-13 08:03:46 +10:00
Loïc Bartoletti
29d95c7614 Disable Z/M parts when layer is not 3D or Measure 2021-09-13 08:03:46 +10:00
Loïc Bartoletti
16d86302c7 fix sip 2021-09-13 08:03:46 +10:00
Loïc Bartoletti
453d85c6a2 Disable Z/M parts when layer is not 3D or Measure 2021-09-13 08:03:46 +10:00
Loïc Bartoletti
0706585e0f init zm support in QgsAdvancedDigitzingDockWidgetBase 2021-09-13 08:03:46 +10:00
Nyall Dawson
8cf4903204 Don't expose QgsMapToolModifyAnnotation to python
We want to leave this private for now, to give flexibility to change
api if/when needed
2021-09-10 15:01:26 +10:00
Vincent Cloarec
45e07dd72f
Select mesh elements by expression UI (#44835)
[mesh] [feature] Select mesh elements by expression
2021-09-09 08:29:45 +02:00
Nyall Dawson
bd8a8d5744 Spelling 2021-09-08 17:58:08 +10:00
Nyall Dawson
ec9d5268f9 Allow QgsMapToolCapture subclasses to bypass geometry validation 2021-09-08 17:58:08 +10:00
Nyall Dawson
e7ce050e18 Allow QgsMapToolCapture subclasses to create tools which are associated
with a specific map layer, instead of always following the current
canvas layer
2021-09-08 17:58:08 +10:00
Nyall Dawson
e7faf956b6 Remove another restriction on QgsMapToolCapture preventing non-vector
use of this class
2021-09-08 17:58:08 +10:00
Nyall Dawson
c8ac971dd8 Remove -1 return code for QgsMapToolCapture::addVertex
This code corresponded to a "not a vector layer" error, which needlessly
prevents the QgsMapToolCapture class from being usable as a base class
for map tools which operate on non-vector layers.
2021-09-08 17:58:08 +10:00
Nyall Dawson
d43c575ff3 Don't force a vector layer to be used for QgsRubberBand::addGeometry
There's no reason to restrict this call solely to vector layers
-- it's useful to have accessible for adding geometries associated
with other layer types too.
2021-09-08 17:58:08 +10:00
Nyall Dawson
ef25d914e6 Rework API to use composition pattern instead of direct inheritance
If we require all annotation item map tools to inherit from
QgsMapToolAdvancedDigitizing, then we lose the flexibility to
subclasss other map tools for annotation item creation (e.g.
QgsMapToolCapture)
2021-09-08 15:32:15 +10:00
Nyall Dawson
24089aa34a Automatically open annotation properties and focus an appropriate
widget after creating a new annotation
2021-09-08 15:32:15 +10:00
Nyall Dawson
303cb455e0 Point text annotations can be created 2021-09-08 15:32:15 +10:00
Nyall Dawson
01226a3294 [annotations] Add framework for map tools for creating new annotation
items
2021-09-08 15:32:15 +10:00
Nyall Dawson
76e20c608e Correctly set context for annotation items (map canvas, message bar) 2021-09-07 18:44:57 +10:00
Nyall Dawson
adcd793b89 Add QgsAnnotationItemCommonPropertiesWidget widget for controlling
common properties of annotation items (e.g. reference scale, z order)

And include this in the point text item configuration widget
2021-09-07 18:44:57 +10:00
Nyall Dawson
4f1fc3b1a4 Always refetch the current item from the layer and then update it
when we are editing annotation items, as properties of the item
which aren't exposed in the widget (e.g. it's geometry) may
have changed in the meantime and we don't want to lose those.
2021-09-07 15:48:17 +10:00
Nyall Dawson
ac4d252b1a [annotations] Pressing delete while an annotation item is selected
will delete the item
2021-09-07 15:48:17 +10:00
Nyall Dawson
d16254e0a3 Add QgsMapToolModifyAnnotation::selectionCleared signal 2021-09-07 15:48:17 +10:00
Nyall Dawson
a8b6f89316 Fix naming clash 2021-09-07 10:35:02 +10:00
Nyall Dawson
77466dadaa Fix doxygen warning 2021-09-07 10:35:02 +10:00
Nyall Dawson
48715202f7 When the modify annotation tool is used to select an annotation item,
show a panel in the layer styling dock allowing users to modify
the appearance of the annotation
2021-09-07 10:35:02 +10:00
Nyall Dawson
39263a421f Add new class QgsMapLayerConfigWidgetContext
This class encapsulates the context in which a map layer config
widget is being shown (e.g. the corresponding map canvas, message
bar and other properties useful for the config widgets)
2021-09-07 10:35:02 +10:00
Nyall Dawson
c7c7b6dd1e [api] Create annotation item gui registry
This registry is attached to QgsGui and handles registration of
functions which create widgets for modifying QgsAnnotationItems

Modeled heavily off the print layout API
2021-09-07 10:35:02 +10:00