85 Commits

Author SHA1 Message Date
Nyall Dawson
a484895363 Fix some checks 2024-05-10 06:10:59 +10:00
Nyall Dawson
e59c0df8a8 Port decorated scrollbar widget class from QtCreator
Allows decorating scrollbars with colored highlight bars
2024-05-10 06:10:59 +10:00
Nyall Dawson
564f3b85c7 Use QgsCodeEditorWidget in expression builder dialog
Adds Ctrl+F search bar support to expression builder dialog
2024-05-10 06:10:30 +10:00
Nyall Dawson
a095dc5e4e Hide settings which don't apply for heatmap legends 2024-05-10 06:09:56 +10:00
Nyall Dawson
e9976c2ee7 [processing] Show more detail in history dialog
Use a tree display for processing history entries, where the root
item for each entry shows the full algorithm log when clicked,
and the python/qgis_process commands are instead shown as child
items

This provides more useful information for users browsing the history,
while still making the all the previous information available
2024-05-10 06:09:33 +10:00
Nyall Dawson
1e8c00354f Move QgsCodeEditorWidget to a new file 2024-05-08 11:56:35 +10:00
Nyall Dawson
8654d57f16 Rename methods for clarity 2024-05-08 11:56:35 +10:00
Nyall Dawson
347191e797 Add since 2024-05-08 11:56:35 +10:00
Nyall Dawson
b7f0770633 Introduce QgsCodeEditorWidget
This widget wraps an existing QgsCodeEditor object in a widget which provides
additional standard functionality, currently a line-for-line port of the Python
console script editor search tools.

The caller must create an unparented QgsCodeEditor object
(or a subclass of QgsCodeEditor) first, and then construct a
QgsCodeEditorWidget passing this object to the constructor.

Ideally, this functionality would be added to the base QgsCodeEditor
class itself. But this is NOT possible without considerable API
breakage, as QgsCodeEditor currently inherits the QsciScintilla widget.
We cannot change QgsCodeEditor to inherit a generic QWidget
container containing a QsciScintilla widget + other widgets in
a layout without breaking API. I've added a cleanup note for
QGIS 4.0 here.
2024-05-08 11:56:35 +10:00
Nyall Dawson
2f5ad6b51f Add Run Selected option to right click menu for selected algorithms 2024-05-04 06:30:43 +10:00
Nyall Dawson
e6fb69c41e Also add "Run from Here" action to right click menu on algorithms
Allows running the part of the model which starts at the right
clicked algorithm only
2024-05-04 06:30:43 +10:00
Nyall Dawson
834167018e Add algorithmAboutToRun signal to QgsProcessingAlgorithmDialogBase
This signal can be used to tweak the algorithm's context prior to
the algorithm execution.
2024-05-04 06:30:43 +10:00
Nyall Dawson
6ee262f401 Add option to invert the elevation filter widget
If checked, this option reverse the slider in the elevation filter
so that the widget goes from high values at the bottom to low values at the top.

See justification in https://github.com/qgis/QGIS/issues/56995

Fixes #56995
2024-05-01 13:48:19 +10:00
Nyall Dawson
1698bd3391 Store elevation filter fixed range size in project
Remember this setting between sessions for a project
2024-05-01 13:48:19 +10:00
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