Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass time step and time step unit into QgsTemporalNavigationObject
Currently, we pass the frame duration as a QgsInterval and use the average duration of a month or year during the animation, for instance, 30 days rather than a month. This makes it impossible to have an animation that displays on a particular day each month, as the day in the next month will change depending on the number of days in the previous month. This changes QgsTemporalNavigationObject to take the time step and time step unit as separate arguments. The settings in QgsTemporalUtils::exportAnimation are left unchanged, because in this case the user interface is already set up to use an interval. If the time step has a fractional value, the frame duration is calculated using a QgsInterval as before. If it has an integer value, the calculation uses QDateTime to advance by the specified time step instead. So a value of 1.5 months results in a frame duration of 45 days, but a value of 1 month will result in a duration that depends on the length of the current month. Fixes #37829.
- Loading branch information
Showing with 154 additions and 43 deletions.
- +28 −6 python/core/auto_generated/qgstemporalnavigationobject.sip.in
- +83 −21 src/core/qgstemporalnavigationobject.cpp
- +29 −7 src/core/qgstemporalnavigationobject.h
- +2 −1 src/core/qgstemporalutils.cpp
- +2 −2 src/gui/qgstemporalcontrollerwidget.cpp
- +10 −6 tests/src/core/testqgstemporalnavigationobject.cpp