1#pragma once
2
3#include <mbgl/util/chrono.hpp>
4#include <mbgl/util/optional.hpp>
5
6namespace mbgl {
7namespace style {
8
9class TransitionOptions {
10public:
11 optional<Duration> duration;
12 optional<Duration> delay;
13
14 TransitionOptions(optional<Duration> duration_ = {},
15 optional<Duration> delay_ = {})
16 : duration(std::move(duration_)),
17 delay(std::move(delay_)) {}
18
19 TransitionOptions reverseMerge(const TransitionOptions& defaults) const {
20 return {
21 duration ? duration : defaults.duration,
22 delay ? delay : defaults.delay
23 };
24 }
25
26 bool isDefined() const {
27 return duration || delay;
28 }
29};
30
31} // namespace style
32} // namespace mbgl
33

source code of qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/style/transition_options.hpp