-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Profile tool: Add support for subsections indicator #61010
base: master
Are you sure you want to change the base?
Conversation
b736693
to
da654e6
Compare
🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. 🪟 Windows buildsDownload Windows builds of this PR for testing. |
da654e6
to
41eb429
Compare
Tests failed for Qt 6One or more tests failed using the build from commit 9bd135e vector_profile_with_subsectionsvector_profile_with_subsectionsTest failed at testRenderProfileWithSubsections at tests/src/python/test_qgsvectorlayerprofilegenerator.py:2749 Rendered image did not match tests/testdata/control_images/profile_chart/expected_vector_profile_with_subsections/expected_vector_profile_with_subsections.png (found 720 pixels different) The full test report (included comparison of rendered vs expected images) can be found here. Further documentation on the QGIS test infrastructure can be found in the Developer's Guide. |
Tests failed for Qt 5One or more tests failed using the build from commit 9bd135e vector_profile_with_subsectionsvector_profile_with_subsectionsTest failed at testRenderProfileWithSubsections at tests/src/python/test_qgsvectorlayerprofilegenerator.py:2749 Rendered image did not match tests/testdata/control_images/profile_chart/expected_vector_profile_with_subsections/expected_vector_profile_with_subsections.png (found 720 pixels different) The full test report (included comparison of rendered vs expected images) can be found here. Further documentation on the QGIS test infrastructure can be found in the Developer's Guide. |
1d6fdcb
to
d4ca754
Compare
Can you also add a test for print layout items rendering with subsections too? (and also a test that the subsections settings are correctly saved/restored for print layouts ) |
d4ca754
to
d93d1d5
Compare
d93d1d5
to
6794419
Compare
Done. |
047eb45
to
9bd135e
Compare
This adds support to display vertices lines over the profile graph to display indicator at the location of the curve's vertices. This is achieved with mainly 2 changes: - `QgsProfilePlotRenderer::setSubsectionsSymbol()` allows to set the line symbol of the vertical lines - `renderSubsectionsIndicator` generates and renders the vertical lines. It is called by `QgsProfilePlotRenderer::renderToImage()`.
This adds support to display vertices lines over the profile graph to display indicator at the location of the vertices of the trace. This is mainly achieved by adding `QgsElevationProfileCanvas::setSubsectionsSymbol()`. This method allows to set the line symbol of the vertical lines. Then, It sets the subsections symbol of the profile renderer of the plot item. It the renderer does not exist yet, the subsections symbol is set when a new profile renderer is created.
This will be used in the next commit.
This introduces two new actions in the options menu: - an action to display or the hide the subsections indicator - an action to to set the lines' symbology.
This adds support to display vertices lines over the profile graph to display indicator at the location of the curve's vertices. This is achieved with mainly 2 changes: - `setSubsectionsSymbol()` allows to set the line symbol of the vertical lines - Call `renderSubsectionsIndicator` on the `QgsProfilePlotRenderer`
This adds some new customization associated with the introduction of subsections indicator: - it allows to display or hide them - it allows to change the associated symbology
9bd135e
to
0a48791
Compare
Description
This PR allows to display subsections indicator as vertical lines in the profile tool. This is based on the ideas discussed in qgis/QGIS-Enhancement-Proposals#260
It works on the
Elevation Profile
and thePrint Layout
. In both cases, it is possible to change the symbology of the lines. For the elevation profile, theses new options are added to the options menu.Screenshots
Elevation Profile
Layout
cc @Simon-Lopez @T4mmi @Djedouas
Funded by BRGM