updated NodeKeyframe class to QObject for easier signal/slot handling

While the keyframes themselves are relatively simple, their usage is quite
complex and using QObjects as their base will help a ton of UI and backend
functionality.
This commit is contained in:
itsmattkc
2019-12-26 16:30:25 +11:00
parent c62b59965e
commit a514265fc9
2 changed files with 25 additions and 2 deletions
+3 -1
View File
@@ -25,7 +25,6 @@ NodeKeyframe::NodeKeyframe() :
value_(0),
type_(kLinear)
{
}
NodeKeyframe::NodeKeyframe(const rational &time, const QVariant &value, const NodeKeyframe::Type &type) :
@@ -43,6 +42,7 @@ const rational &NodeKeyframe::time() const
void NodeKeyframe::set_time(const rational &time)
{
time_ = time;
emit TimeChanged(time_);
}
const QVariant &NodeKeyframe::value() const
@@ -53,6 +53,7 @@ const QVariant &NodeKeyframe::value() const
void NodeKeyframe::set_value(const QVariant &value)
{
value_ = value;
emit ValueChanged(value_);
}
const NodeKeyframe::Type &NodeKeyframe::type() const
@@ -63,4 +64,5 @@ const NodeKeyframe::Type &NodeKeyframe::type() const
void NodeKeyframe::set_type(const NodeKeyframe::Type &type)
{
type_ = type;
emit TypeChanged(type_);
}