20 Commits

Author SHA1 Message Date
Samweli
21c28bc9dc addressed review comments 2021-01-06 13:28:16 +10:00
Samweli
4513033c05 returned setFrameDuration and frameDuration functions in the temporal navigation object 2021-01-06 13:28:16 +10:00
Daniel Minor
d07cb9720f Rerun sipify after documentation fix 2021-01-06 13:28:16 +10:00
Daniel Minor
9da580cb3d 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.
2021-01-06 13:28:16 +10:00
Richard Duivenvoorde
6797118e2f
On timestep-size change, Set timeslider to best possible fit (instead of resetting to start)
Try to remember/set last timeframe (upon timestep- or timeframe-changes).

Setting the stepsize to a different size, did reset the slider to start
(aka timeframe 0).
Same when you changed the range (data time) extent.

This commit tries to set the slider to the same position as before the
step change, if possible). Else it will take the position of the timeframe
in which the start of the old timeframe fits.

fixes #39994
2020-11-19 11:20:42 +10:00
Nyall Dawson
8c45aad09e Mark method as const 2020-11-18 08:21:43 +10:00
Richard Duivenvoorde
a59de0658d Add temporalFrameDurationChanged signal, and make view more aware of changes
This commit adds a new signal to the QgsTemporalNavigationObject, which is
emitted when the frameDuration (of current QgsTemporalNavigationObject) is
change.

It also fixes the issue that changing the frame in the Temporal
Navigation-WIDGET was not reflected in the widget itself.
2020-10-23 03:59:09 +10:00
Richard Duivenvoorde
34c035631f Implement != operator, update sip 2020-09-07 12:12:34 +02:00
Richard Duivenvoorde
47a66d9213 Run scripts/sipify_all.sh 2020-09-05 12:05:30 +02:00
Nyall Dawson
81a9db9f57 [sipify] Fix creation of cross references 2020-06-15 13:43:58 +10:00
nirvn
ba5b4166da [FEATURE][temporal] Add off and fixed range modes to temporal navigation 2020-05-15 13:47:02 +07:00
Samweli Mwakisambwe
ac0249e8bc enable cumulative temporal controller range setting 2020-05-11 09:00:24 +10:00
Nyall Dawson
072222d2fd [feature][temporal] Add expression variables for frame properties
Adds @frame_number, @frame_rate, @frame_duration, which give
the current frame number, frames per second, and length of frames
respectively
2020-05-09 18:06:58 +10:00
Nyall Dawson
ac3409eab1 Doc and spelling test fixes 2020-03-12 20:06:25 +10:00
Nyall Dawson
05fa67a819 Add an option to loop animations 2020-03-12 20:06:25 +10:00
Nyall Dawson
fb13b0f0dc Emit signals when animation state changes 2020-03-12 20:06:25 +10:00
Nyall Dawson
92b257440d Dox and API naming improvements 2020-03-12 20:06:25 +10:00
Samweli
dd129c1aef updates on temporal animation logic 2020-03-12 20:06:25 +10:00
Samweli
99129fe4a8 updates on the temporal controller navigation logic 2020-03-12 20:06:25 +10:00
Samweli
c119ea5518 logic for temporal navigation vcr widget 2020-03-12 20:06:25 +10:00