71 Commits

Author SHA1 Message Date
Nyall Dawson
a979931960 Function naming improvements 2024-04-21 06:46:35 +10:00
Nyall Dawson
de0f5cf87c Make API more future proof 2024-04-21 06:46:35 +10:00
Nyall Dawson
e2d6b54f35 Add "View Log" action for child algorithms
This action shows the log of that child step, regardless of whether
or not it failed. This is handy for debugging model errors after
testing, when you've already closed the algorithm window...!
2024-04-21 06:46:35 +10:00
Nyall Dawson
8302259463 Make child results handling API more flexible 2024-04-21 06:46:35 +10:00
Nyall Dawson
6c22cd0355 [feature] Add "View Output Layers" option for model child algorithms
When editing a model through the designer (and after having run
that model), you can now right click any child step in the model
and select "View Output Layers". This will add the output layers
from that step as new layers in the current QGIS project.

This action is available for ALL child algorithms in the model,
even if the model is not configured to use the outputs from those
children as model outputs.

This is designed as a helpful debugging action. If a user's model
fails (or gives unexpected results), they can then trace through
the model and view the outputs for suspected problematic steps.
It avoids the need to add temporary outputs to a model and re-run
to test.

Additionally, this action is always available after running the model,
EVEN if the model itself failed (eg because of a misconfigured
step later in the model).

Sponsored by City of Canning
2024-04-21 06:46:35 +10:00
Nyall Dawson
133bad76ee Move some model designer code to c++ 2024-04-21 06:46:35 +10:00
Nyall Dawson
f53fbfb4dd Avoid a bunch of text to double round trip conversions
Simplify api, and add a bunch of tests
2024-04-16 13:12:23 +10:00
Nyall Dawson
63c1d5cfc0 Implement a proper read-only state for list/key value widget wrappers
Instead of just setting the whole widget as disabled, implement proper
read-only state for these widgets. This fixes an annoying UI issue where
the list / key value widgets can't be scrolled when opening read-only
attribute forms, preventing users from viewing all the entries in
the widget.
2024-03-27 11:44:00 +10:00
Nyall Dawson
3f44760a82 Add "Fixed Time Range Per Band" mode for raster temporal control
This mode can be used when each band in the raster layer is associated
with a fixed time range, eg. NetCDF files.

The user can either manually populate a table with begin/end dates for
each band in the raster, or build the table using QGIS expressions
which return datetime values.
2024-03-22 12:40:54 +10:00
Nyall Dawson
d9a49f58fd Add API for custom preview generators in QgsExpressionBuilderWidget
In this mode, the widget will call a callback function to generate
a new QgsExpressionContext as the previewed object changes. This
can be used to provide custom preview values for different objects
(i.e. for objects which aren't vector layer features), such as raster
bands or other custom objects.
2024-03-21 12:33:33 +01:00
Nyall Dawson
465d8bd0ba Use inline settings widget in menu instead of separate dialog 2024-03-18 12:37:42 +10:00
Nyall Dawson
a9d2d43a0e Also rename QgsRangeSlider fixed range size methods 2024-03-18 12:37:42 +10:00
Nyall Dawson
9ee09c176a Rename to fixed range size 2024-03-18 12:37:42 +10:00
Nyall Dawson
ecc71b4479 Add fixed range width option to QgsElevationControllerWidget 2024-03-18 12:37:42 +10:00
Nyall Dawson
a91f5bf7c2 Add a fixed range width option to QgsRangeSlider
Allows forcing the widget to have a specific fixed range width,
so that interactions with the lower or upper slider automatically
force the other slider to move to keep a constant width
2024-03-18 12:37:42 +10:00
Nyall Dawson
4cbde0f067 Show labels in elevation controller widget 2024-03-13 13:18:20 +10:00
Nyall Dawson
9b780c1d36 Create QgsElevationControllerWidget
A widget which allows configuring a slice of a 2d map canvas to show
2024-03-13 13:18:20 +10:00
Nyall Dawson
222f05edea Add API to overlay widgets over the map canvas
E.g.

  iface.mapCanvas().addOverlayWidget(w, Qt.Edge.LeftEdge)

will float the `w` widget over the left edge of the map canvas
2024-03-07 06:32:28 +10:00
Nyall Dawson
07470d4bd9 [api] Create QgsOverlayWidgetLayout
This custom QLayout class allows for overlaying child widgets on top
of their parent widget.

It can be used like this:

   layout = QgsOverlayWidgetLayout()
   parent_widget.setLayout(layout)

   layout.setContentsMargins(20,20,20,20)
   layout.addWidget(QGroupBox(), Qt.Edge.LeftEdge)
   layout.addWidget(QLabel('My label on top of a parent!'), Qt.Edge.TopEdge)
   layout.addWidget(QGroupBox(), Qt.Edge.TopEdge)
2024-03-07 06:32:28 +10:00
Even Rouault
a68422b982 Various typo fixes
Including 3 public methods, which are deprecated by this commit and replaced by a typo-fixed version
2024-02-29 06:03:03 +10:00
Nyall Dawson
12dd3b293c [feature] Add layer tree filter for "Show Broken Layers Only"
When checked, only layers with broken sources will be shown in the
tree. This allows users to easily find broken layers in large complex
projects, where they may otherwise escape notice!
2024-02-27 10:15:26 +10:00
Even Rouault
c61231f67f
[WFS provider] Change feature paging enabled option to be tri-state (default, enabled, disabled), to allow a user to effectively override server capabilities 2024-02-19 20:09:14 +01:00
Even Rouault
f3ef66d073
Header files: remove all mentions of '\since QGIS 3.0' 2024-02-19 11:35:07 +01:00
Even Rouault
15ea5c46bc
Header files: remove all mentions of '\since QGIS 3.0' 2024-02-18 20:57:23 +01:00
Even Rouault
02caeb9db7
Header files: remove all mentions of '\since QGIS 2.' 2024-02-18 20:46:01 +01:00
Even Rouault
a5c8f01003
Header files: remove all mentions of '\since QGIS 1.' 2024-02-18 20:46:00 +01:00
Nyall Dawson
2357d80d25 Avoid sip property code for old api compatibility
This causes crashes on Qt6. Use Python monkey patching instead.
2024-02-17 05:38:14 +10:00
Nyall Dawson
926d6f90bd Support load/save sensor things connections 2024-02-15 12:39:11 +10:00
Nyall Dawson
0096246afe Sipify 2024-02-13 20:51:03 +10:00
Nyall Dawson
814e6db3b4 Don't map non-list of QVariantMaps to QMap<QString,QVariant>
The original workaround was only supposed to apply to QList/
QVector of QVariantMaps. By replacing them all in sip we
break mapping of signals defined in c++ which are emitted
by Python code.

Fixes exceptions after running processing algorithms in Qt6
builds.
2024-02-12 12:16:14 +10:00
Nyall Dawson
09dc6838a7 Upgrade another enum to get filtering working in processing toolbox 2024-02-10 17:25:22 +10:00
Nyall Dawson
ee53b9ae48 Port processing enums to enum class
A step towards a Qt6 compatible Processing framework
2024-02-10 17:25:22 +10:00
signedav
28706256be
Merge pull request #56189 from signedav/fix-apply-on
Fix double apply on update default values on volatile functions
2024-02-09 12:32:35 +01:00
jmkerloch
8e9267f584 feat(QgsLocatorWidget): define anchors for result container 2024-02-07 11:49:35 +10:00
Mathieu Pellerin
b6c7889f35
[attribute form] Insure that a field features multiple times in a feature form has its constraint properly reflected (#56163) 2024-02-06 20:27:38 +07:00
Stefanos Natsis
4dc4bff923
Don't open layer properties when toggling visibility (#56190) 2024-02-06 21:23:24 +10:00
Nyall Dawson
ac2f1179c8 More item data role enum to enum class conversions 2024-02-06 21:04:43 +10:00
signedav
3d28ce1b39 remove static function to return volatile function, since it's not needed anymore 2024-02-05 15:40:29 +01:00
Nyall Dawson
f2c74f377d Sipify 2024-01-31 17:16:18 +10:00
Nyall Dawson
078fd4f2ea Make IntFlag enum type opt-in, rather than opt-out
And make sipify handle this nicely. This means that all our non-flag
style enums correctly map across to IntFlag python enums on Qt 6,
fixing issues with negative enum values for these and providing
a better match for the original c++ enum.
2024-01-31 17:16:18 +10:00
Nyall Dawson
f1e3ba9e2d Use correct sip method
And use INDENT-OFF annotations to avoid astyle messing up
formatting of enum with inline macros
2024-01-31 13:48:49 +10:00
Nyall Dawson
23f3af4290 Use enum classes for QgsProperty property keys
Should fix usage on Qt 6 builds
2024-01-31 13:48:49 +10:00
Nyall Dawson
26798b84f4 Promote QgsFeatureRequest enums to enum class, move to Qgis 2024-01-30 19:10:43 +10:00
jmkerloch
0c0ffc818f feat(QgsLocatorWidget): add setPlaceholderText for lineedit 2024-01-26 08:42:01 +01:00
signedav
0fbdbc1255
Merge pull request #55633 from signedav/defaultsfix
Fix apply default values on update behavior
2024-01-25 15:02:19 +01:00
signedav
70ba909484 Add version information 2024-01-25 10:52:45 +01:00
Mathieu Pellerin
51648deda1 Fix documentation of QgsDateEdit and QgsTimeEdit classes (fixes #55758) 2024-01-25 13:41:37 +10:00
signedav
6219271c05 Static function for volatile functions like rand, randf, now and uuid.
As well fixed, that widgets are considered that have no dependencies at all when they do have volantile functions.
2024-01-24 16:17:33 +01:00
Nyall Dawson
4654ad3db5 Sipify 2024-01-23 08:32:38 +01:00
Nyall Dawson
e1965014f0 Use .exec() in example code 2024-01-22 05:46:15 +10:00