1433 Commits

Author SHA1 Message Date
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
Nyall Dawson
758b33ed2e [api] Add initial framework for QgsMapToolModifyAnnotation
This is the start of a map tool for interactive editing of items
in annotation layers. Currently it supports selecting items, and
pre-highlighting their nodes as the cursor is moved over the items.

(Not exposed in QGIS gui yet)
2021-09-07 10:35:02 +10:00
Nyall Dawson
3f977b51a3 [api] Also expose method for adding additional (non-project) layers
to QgsMapLayerComboBox
2021-09-06 16:24:15 +10:00
Nyall Dawson
26b536b068 Add QgsRubberBand::copyPointsFrom to quickly copy all points from
one rubber band to another
2021-09-01 17:25:45 +10:00
Nyall Dawson
660433d9a9 [api] Add framework for collecting rendered item details during map
renderer operations

This follow a similar pattern as how labeling results could be collected
after a map render job, but generalises the API so that it can be
used for storing details of rendered items of any type.

It's currently used for storing details of rendered annotation items,
so that map tools can retrieve details of annotation items visible
in the canvas in an optimised way.
2021-08-31 11:04:29 +10:00
Julien Cabieces
5c35b1cb82 Add external storage file widget drag'n drop support 2021-08-30 13:50:21 +10:00
Nyall Dawson
204af6f02f Fix a crash when destroying an extent widget while the "draw on canvas"
option is still active
2021-08-26 18:01:57 +10:00
Alessandro Pasotti
a25f798d04
Merge pull request #44710 from elpaso/dd-form-actions
[feature] Drag & Drop designer form actions
2021-08-19 17:23:22 +02:00
Nyall Dawson
06b3b1650a Fix clazy, cppcheck warnings in expression builder widgets 2021-08-17 10:41:30 +10:00
Alessandro Pasotti
6de2f2dcc4 Fix setEnabled 2021-08-16 17:44:26 +02:00
Alessandro Pasotti
cd6cd2f6f3 Tests for form action widget 2021-08-16 15:14:31 +02:00
Julien Cabieces
bbf2429d6b Fix sip incomplete type QgsExternalStorageFileWidget 2021-08-16 09:18:14 +02:00
Julien Cabieces
36813e737d Fix doc 2021-08-16 09:18:14 +02:00
Julien Cabieces
7a7964c767 Fix typo & return string by value not ref 2021-08-16 09:18:14 +02:00
Julien Cabieces
74512ffde9 Separate QgsFileWidget from QgsExternalStorageFileWidget 2021-08-16 09:18:14 +02:00
Julien Cabieces
16c916b723 fix typos and doc 2021-08-16 09:18:14 +02:00
Julien Cabieces
56127039f5 [ExternalStorage] Add widget to configure/edit and visualize external storage 2021-08-16 09:18:12 +02:00
Alessandro Pasotti
889359c3a1 Form DD action widgets initial implementation 2021-08-14 19:06:52 +02:00
uclaros
55c02f6b5b skip sip 2021-08-12 11:42:23 +10:00
uclaros
5f7a067fdf Simplify whitespaces in saved expression labels 2021-08-12 11:42:23 +10:00
Nyall Dawson
550a1d3a52 Factories can specify a path to add their pages to the options tree 2021-07-29 15:48:53 +10:00
Nyall Dawson
0a8f24e895 Show search hits for tables and tree/table headers 2021-07-29 15:48:53 +10:00
Nyall Dawson
b932108acd Working search for items when using options tree views 2021-07-29 15:48:53 +10:00
Nyall Dawson
f22f742a9f Allow options dialog to use a tree structure for tab list instead
of a flat list widget
2021-07-29 15:48:53 +10:00
Nyall Dawson
88ead4ba4d Spelling 2021-07-28 12:39:31 +10:00
Nyall Dawson
8aec877aec Documentation improvements, clazy fixed for QgsFileWidget 2021-07-28 12:39:31 +10:00
Nyall Dawson
5345103ada Fix dox warning 2021-07-27 14:25:24 +10:00
Nyall Dawson
2164a090db [api break] Remove QRegExp argument from QgsNewNameDialog constructor
Replaced with QgsNewNameDialog::setRegularExpression which accepts
a string argument.

QRegExp is deprecated and removed in qt6.
2021-07-27 14:25:24 +10:00
Nyall Dawson
b36bb62605 [browser] Ensure "File Properties" action is always present for
items which represent a file
2021-07-27 11:56:19 +10:00