15 Commits

Author SHA1 Message Date
Jean Felder
28325c421a qgsplotcanvas: Fix mousePressEvent when no tool is set
In that case, `mTool->flags()` cannot be checked. Fix the issue by
also checking that `mTool` is set.

Closes: https://github.com/qgis/QGIS/issues/62800
2025-08-11 11:11:09 +10:00
Nyall Dawson
0ac9936b62 Upgrade std::unique_ptr xx( new XX ) to auto/std::make_unique 2025-02-07 13:10:27 +10:00
Denis Rouzaud
a6fab83cd9 run pre-commit 2024-12-07 05:16:00 +10:00
Matthias Kuhn
39e33dea65 Add include moc lines 2024-10-26 07:35:20 +02:00
Nyall Dawson
f5af506323 Remove unnecessary touch device check 2022-08-17 11:27:40 +10:00
Nyall Dawson
bf046be5ad [feature] Add a measure tool to elevation profile widget
Allows measuring distances on the plot
2022-05-07 21:42:54 +10:00
Nyall Dawson
28f02c4890 Fix clazy warning 2022-04-27 10:24:12 +10:00
Nyall Dawson
5ae87dfbec Fix cursor hangs after right click on plot 2022-04-22 13:07:16 +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
Nyall Dawson
cf5c82c400 Implement zooming actions and tools for plots 2022-04-07 19:22:19 +10:00
Nyall Dawson
6480b974d7 Implement plot panning and zoom
With all the usual interaction, e.g.

- middle mouse button + drag = pan
- hold space + drag = pan
- wheel = zoom
- ctrl + wheel = smooth zoom
2022-04-07 19:22:19 +10:00
Nyall Dawson
2653f5146f Implement plot panning by drag 2022-04-07 19:22:19 +10:00
Nyall Dawson
3efdad00ff Cleanup canvas destruction and job handling 2022-04-07 19:22:19 +10:00
Nyall Dawson
c5caecdab1 Implement absolutely insane solution to random crashes 2022-04-07 19:22:19 +10:00
Nyall Dawson
141f7bf9f2 Plot wip 2022-04-07 19:22:19 +10:00