OSSIA
Open Scenario System for Interactive Application
Loading...
Searching...
No Matches
qml_util.hpp
1#pragma once
3
4#include <QtGlobal>
5
6#include <limits>
7namespace ossia
8{
9namespace qt
10{
11constexpr inline qint32 infinite()
12{
13 return std::numeric_limits<qint32>::lowest();
14}
15
16inline bool isInfinite(qint32 t)
17{
18 return t == infinite();
19}
20
21inline auto defaultTime(qint32 t) -> ossia::time_value
22{
23 return t == infinite() ? ossia::Infinite : ossia::time_value{t * 1000};
24}
25
26inline auto reverseTime(time_value t) -> qint32
27{
28 return t.infinite() ? infinite() : double(t.impl) / 1000.;
29}
30}
31}
Definition git_info.h:7
The time_value class.
Definition ossia/editor/scenario/time_value.hpp:30