108 Commits

Author SHA1 Message Date
Julien Cabieces
eaa0261c5d
Merge pull request #57361 from troopa81/cmyk_colorwidget
[ColorWidget] Add CMYK support
2024-05-23 18:03:52 +02:00
Mathieu Pellerin
8413982ad6 Let the signal carry whether a feature has been found, that might come in handy 2024-05-23 11:00:34 +10:00
Mathieu Pellerin
8c389cf613 [attribute form] Fix initial multi editing state of relation reference editor widgets 2024-05-23 11:00:34 +10:00
Julien Cabieces
a6dd92abd8 Update and test cmyk radio buttons 2024-05-22 19:40:29 +02:00
Julien Cabieces
3bcfa9568b replace isCmyk with colorSpec 2024-05-22 19:40:29 +02:00
Julien Cabieces
4bd56fa0f8 feat(ColorWidget) : Add CMYK support
A new setting activeCmykComponent has been introduced, while the old
one activeComponent refers now only to the Rgb/Hsv part
2024-05-22 19:39:55 +02:00
Nyall Dawson
cbd25c1fdd Promote QgsColorRampShader enums to enum class, move to Qgis 2024-05-22 12:37:44 +10:00
Nyall Dawson
027cd208f2 Add API to show additional elevation labels in elevation filter widget 2024-05-20 11:52:10 +02:00
Nyall Dawson
1c23950304 Replace bar is not always visible when find is
Instead do the vscode/pycharm thing and only show it when a replace
toggle is clicked, or Ctrl + R is pressed
2024-05-16 08:44:14 +10:00
Nyall Dawson
1ea04ae712 Add warning methods to QgsCodeEditorWidget
These call the underlying QgsCodeEditor methods to show inline
warnings, but also add corresponding highlights on the scroll bar
2024-05-15 17:12:20 +10:00
Nyall Dawson
e435e3f931 Expose scrollbar controller to PyQGIS
Allows plugins etc to add custom highlights to the scrollbar
2024-05-15 17:12:20 +10:00
Nyall Dawson
64f9a1d17d Allow dropping paths onto data source select dialog to expand browser paths
Makes it a bit easier to fix data sources for files in deep paths
2024-05-12 07:52:15 +10:00
Nyall Dawson
54244d50be Set initial selected item to matching path when changing data source too 2024-05-12 07:52:15 +10:00
Nyall Dawson
280b92cd44 Indentation 2024-05-10 13:56:49 +10:00
Nyall Dawson
58dafb48f8 Move message bar logic to QgsCodeEditorWidget 2024-05-10 13:56:49 +10:00
Nyall Dawson
64e0fff67f [console] Rely on QgsCodeEditorWidget search functionality
Remove duplicate code searching functionality from console script
editor and just use the standard QgsCodeEditorWidget implementation
2024-05-10 13:56:49 +10:00
Nyall Dawson
19436fa9b1 Add framework for data defined property buttons at feature renderer level 2024-05-10 12:06:18 +10:00
Nyall Dawson
a34669e784 Add code editor color scheme option for search match highlight color 2024-05-10 06:11:36 +10:00
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