timelinepoints: implemented saving/loading into project files

This commit is contained in:
itsmattkc
2020-04-05 19:21:17 +10:00
parent e3a8d32e4a
commit 56178648bd
10 changed files with 138 additions and 0 deletions
+5
View File
@@ -48,6 +48,11 @@ bool TimeRange::operator==(const TimeRange &r) const
return in() == r.in() && out() == r.out();
}
bool TimeRange::operator!=(const TimeRange &r) const
{
return in() != r.in() || out() != r.out();
}
bool TimeRange::OverlapsWith(const TimeRange &a, bool in_inclusive, bool out_inclusive) const
{
bool overlaps_in = (in_inclusive) ? (a.out() < in()) : (a.out() <= in());
+1
View File
@@ -17,6 +17,7 @@ public:
void set_range(const rational& in, const rational& out);
bool operator==(const TimeRange& r) const;
bool operator!=(const TimeRange& r) const;
bool OverlapsWith(const TimeRange& a, bool in_inclusive = true, bool out_inclusive = true) const;
bool Contains(const TimeRange& a, bool in_inclusive = true, bool out_inclusive = true) const;