4146 Commits

Author SHA1 Message Date
Alessandro Pasotti
041e18a85c
Merge pull request #48107 from elpaso/db_logger_2
Implementation of QEP: Add SQL Logging in the debugging/development panel
2022-04-28 10:11:31 +02:00
Nyall Dawson
5fb4f656c1 Fix doxygen warning 2022-04-28 13:54:47 +10:00
Nyall Dawson
bc7fa813e5 Only refine layers which benefit from refining (i.e. rasters) 2022-04-28 13:54:47 +10:00
Nyall Dawson
85966c7625 Add support for refining elevation plot based on scale and visible range
For some layer types (rasters, point clouds) this gives a much better
experience vs generating the profile completely upfront. (I.e. even
with super-detailed DEM layers the profile is now basically instant
to generate).
2022-04-28 13:54:47 +10:00
Nyall Dawson
940175fc66 [feature] Add option to render raster and mesh elevation surface levels
using a fill symbol below the elevation surface

This can be easier to interpret in some cases, and helps match expected
symbology conventions in certain disciplines.
2022-04-27 17:30:14 +10:00
Nyall Dawson
5e831971cc Cleanup light source handling in API 2022-04-27 11:50:13 +10:00
Nyall Dawson
5a6524f3aa Use "regenerate" instead of "update" for re-building the profile for
a layer, as "update" is ambiguous and is associated with "repainting"
a Qt widget
2022-04-27 10:24:12 +10:00
Nyall Dawson
ddfe22aedb Rename method to copyPropertiesFromGenerator and avoid some duplicate code 2022-04-27 10:24:12 +10:00
Nyall Dawson
e59c5d9881 Add dox note about source ID and layer IDs 2022-04-27 10:24:12 +10:00
Nyall Dawson
a35e74c656 Add api to allow redrawing of previously collected results for a single
elevation profile source

And use this to just redraw the existing results whenever a setting
relating only to the appearance of the profile chart is changed,
instead of regenerating the whole chart
2022-04-27 10:24:12 +10:00
Nyall Dawson
99da12fcac Add api to trigger regeneration of profile results for a single layer 2022-04-27 10:24:12 +10:00
Nyall Dawson
86704dbe16 Add means of linking profile results back to source layer 2022-04-27 10:24:12 +10:00
Nyall Dawson
6f8d668acd Add signals for when layer elevation properties change 2022-04-27 10:24:12 +10:00
Nyall Dawson
bc90217bc0 Add method to prepare animated images in advance, by extracting
all frames from the animation to a temporary directory

This avoids lengthy delays when trying to render a specific frame
from the animation, as most animation formats require us to
iterate through all preceding frames in order to retrieve a specific
frame. By iterating once in advance and saving the results out we
gain instant access to any individual frame from the animation.
2022-04-27 05:57:21 +10:00
Alessandro Pasotti
485cd0a15d Log execSql from connections API 2022-04-26 14:02:28 +02:00
Alessandro Pasotti
566c3cdb99 Handle errors 2022-04-26 14:02:27 +02:00
Alessandro Pasotti
8043bbdb55 Row count 2022-04-26 14:02:27 +02:00
Alessandro Pasotti
f388ef7a34 More on query logging 2022-04-26 14:02:27 +02:00
Nyall Dawson
a0c69216ab Enabled 2022-04-26 14:02:27 +02:00
Nyall Dawson
0108041c68 Add query log 2022-04-26 14:02:27 +02:00
Nyall Dawson
9de1920302 Add option for "forced bold" and "force italic" to QgsTextFormat
Unlike setting a font's style via setNamedStyle(), these settings
will ensure that a font is always rendered in bold or italic regardless
of whether the font family actually has a bold or italic variant. A
"faux bold" or slanted text effect will be emulated by Qt, which may
result in poor quality font rendering.

(For this reason it is greatly preferred to call setNamedStyle() instead.)

This API is being added so that QgsTextFormat/QgsTextRenderer can
replicate the same font behaviour as the base QFont/QPainter classes
do, where faux bold/italic effects are possible.

(It's not exposed anywhere for user control!)
2022-04-26 10:56:28 +10:00
Nyall Dawson
25a4468547 Add method to try to resolve a QFont to its equivalent style name
Eg if a font is built by calling .setBold/.setItalic and not
by QFont::setStyleName then this method will attempt to return
the equivalent style name.

Results are very platform dependent and font dependent, depending
on Qt's internal matching logic (hence no unit tests)
2022-04-26 10:56:28 +10:00
Nyall Dawson
9a99ed8800 Don't show vector layers with no interesting elevation properties
set by default in newly created elevation profiles

Fixes #48286
2022-04-22 13:07:16 +10:00
Nyall Dawson
1fc20cb026 Show elevation specific tooltips 2022-04-22 13:07:16 +10:00
Nyall Dawson
c52b2d3ce4 Show a layer tree next to elevation profile plots
This:

- Allows users to turn on or off the visibility of layers from
the profile plot on a plot-by-plot basis (previously the layer
visibility was taken straight from the main canvas layer visibility)
- Allows users to rearrange the drawing order of layers in the plot
- Allows a shortcut to the layer elevation properties settings by
double clicking layers
- Provides a "legend" for the features visible on the plot
2022-04-22 13:07:16 +10:00
Nyall Dawson
71c1c24d56 A vector layer with z values present should default to "relative"
clamping mode, not "clamped to terrain"
2022-04-22 11:40:29 +10:00
Nyall Dawson
0ee1cee1d5 Rework project coordinate format handling to use numeric format instead
This now follows the approach used for bearing formats, where a user
can defined a default coordinate format for newly created projects
in the Settings - Options - Map Tools section.

New projects will inherit that setting, but the format can then
be changed through the Project Properties - Coordinate Format button.

This ultimately exposes more control to users for how coordinates
are formatted for a project, eg allowing them to control whether
direction suffixes are shown, and whether leading or trailing zeros
should be included.
2022-04-21 19:05:38 +10:00
Nyall Dawson
ee5cbe93a9 Add a numeric format for geographic coordinates 2022-04-21 19:05:38 +10:00
Nyall Dawson
5ff12f41e7 Account for non-equal axis scaling during snapping 2022-04-15 12:15:54 +10:00
Nyall Dawson
d163b4fb21 Use Snap context class instead 2022-04-15 12:15:54 +10:00
Nyall Dawson
a5f9b558f4 Move snapping results class to own file 2022-04-15 12:15:54 +10:00
Nyall Dawson
e1eb8ffd4d Use QgsProfilePoint 2022-04-15 12:15:54 +10:00
Nyall Dawson
4b008ed7ac Add QgsProfilePoint class 2022-04-15 12:15:54 +10:00
Nyall Dawson
20613ea608 Add since 2022-04-15 12:15:54 +10:00
Nyall Dawson
27dc6e7a7d Snap plot cursor to sampled heights
And add a "snapping" toggle to disable this behavior
2022-04-15 12:15:54 +10:00
Denis Rouzaud
4045e51240 [settings] add option to save enum/flag as integer instead of text 2022-04-14 08:39:15 +02:00
Nyall Dawson
61d39a2e14 Fix doc warning 2022-04-14 14:16:26 +10:00
Nyall Dawson
935a49aa52 Add framework for data defined elevation properties 2022-04-14 14:16:26 +10:00
Nyall Dawson
cca19d74ff Add an expression context to QgsProfileRequest 2022-04-14 14:16:26 +10:00
Nyall Dawson
ad80958798 Make vector layer profile chart results default to respecting layer
symbology, and add checkbox to disable this in their elevation
properties page

This means that vector results in elevation profile charts will default
to showing features using their corresponding 2d renderer, allowing
eg categorized classes to be visible on the profile chart. (In the
case that a profile symbol type doesn't match the layer's renderer
symbol types, we just take the symbol color from the renderer)
2022-04-12 02:17:02 -07:00
Nyall Dawson
904a312f40 Add method to sort a list of layers by layer type 2022-04-12 02:08:39 -07:00
Juergen E. Fischer
30e6901931 fix msvc build 2022-04-11 09:54:00 +10:00
Nyall Dawson
4eede35d55 Allow any symbol to be an animated symbol
Users can now indicate that a symbol should be treated as a animated
symbol, through the new "Animation Settings" option in the symbol
widget's Advanced menu.

This settings panel allows users to enable animation for the symbol
and set a specific frame rate at which the symbol should be redrawn.
When enabled, the @symbol_frame variable can be used in any
symbol data defined property in order to animate that property.

For instance, setting the symbol's rotation to the data defined
expression

    @symbol_frame % 360

will cause the symbol to rotate over time. (with rotation speed
dictated by the symbol's refresh rate)
2022-04-09 18:14:44 +10:00
Nyall Dawson
f4f514dd86 Add choice of band to use for elevation profiles 2022-04-07 19:22:19 +10:00
Nyall Dawson
b779bfc44a Spelling 2022-04-07 19:22:19 +10:00
Nyall Dawson
d2e5186d56 Add action to export profile graph to PDF 2022-04-07 19:22:19 +10:00
Nyall Dawson
8ee20464a0 Ensure that elevation properties are copied whenever a layer is cloned 2022-04-07 19:22:19 +10:00
Nyall Dawson
3d0fd967af Add profile chart symbology settings for vector layers 2022-04-07 19:22:19 +10:00
Nyall Dawson
0d88a6f834 Documentation 2022-04-07 19:22:19 +10:00
Nyall Dawson
9970782045 Use actual ranges of plot when rendering, use correct raster/mesh profile symbols 2022-04-07 19:22:19 +10:00