created new sequence dialog

This commit is contained in:
itsmattkc
2019-07-21 18:21:40 -07:00
parent 9cfed140b3
commit f8830beac7
37 changed files with 911 additions and 101 deletions
+20
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef CLAMP_H
#define CLAMP_H
+23
View File
@@ -1,9 +1,32 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef LERP_H
#define LERP_H
template<typename T>
/**
* @brief Linearly interpolate a value between a and b using t
*
* t should be a number between 0.0 and 1.0. 0.0 will return a, 1.0 will return b, and between will return a value
* in between a and b at that point linearly.
*/
T lerp(T a, T b, double t) {
return (a * (1.0 - t)) + (b * t);
+20
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef QOBJECTLISTCAST_H
#define QOBJECTLISTCAST_H
+7 -2
View File
@@ -324,16 +324,21 @@ double rational::ToDouble() const
}
}
const int64_t &rational::numerator()
const int64_t &rational::numerator() const
{
return numerator_;
}
const int64_t &rational::denominator()
const int64_t &rational::denominator() const
{
return denominator_;
}
rational rational::flipped() const
{
return rational(denominator_, numerator_);
}
void rational::FixSigns()
{
// Ensures denominator is always positive (while numerator can be positive or negative)
+4 -2
View File
@@ -84,8 +84,10 @@ public:
double ToDouble() const;
// Specific values
const int64_t& numerator();
const int64_t& denominator();
const int64_t& numerator() const;
const int64_t& denominator() const;
rational flipped() const;
private:
int64_t numerator_;
int64_t denominator_;