began some rewrites to timeline drawing

This commit is contained in:
itsmattkc
2021-01-14 10:30:20 +11:00
parent fbdda3d6d4
commit f7883bd02c
60 changed files with 3134 additions and 951 deletions
+4 -71
View File
@@ -29,7 +29,10 @@ namespace olive {
Block::Block() :
previous_(nullptr),
next_(nullptr)
next_(nullptr),
track_(nullptr),
in_transition_(nullptr),
out_transition_(nullptr)
{
length_input_ = new NodeInput(this, QStringLiteral("length_in"), NodeValue::kRational);
length_input_->SetConnectable(false);
@@ -59,26 +62,6 @@ QVector<Node::CategoryID> Block::Category() const
return {kCategoryTimeline};
}
const rational &Block::in() const
{
return in_point_;
}
const rational &Block::out() const
{
return out_point_;
}
void Block::set_in(const rational &in)
{
in_point_ = in;
}
void Block::set_out(const rational &out)
{
out_point_ = out;
}
rational Block::length() const
{
return length_input_->GetStandardValue().value<rational>();
@@ -110,31 +93,6 @@ void Block::set_length_and_media_in(const rational &length)
set_length_internal(length);
}
TimeRange Block::range() const
{
return TimeRange(in(), out());
}
Block *Block::previous()
{
return previous_;
}
Block *Block::next()
{
return next_;
}
void Block::set_previous(Block *previous)
{
previous_ = previous;
}
void Block::set_next(Block *next)
{
next_ = next;
}
rational Block::media_in() const
{
return media_in_input_->GetStandardValue().value<rational>();
@@ -309,16 +267,6 @@ bool Block::AreLinked(Block *a, Block *b)
return a->linked_clips_.contains(b);
}
const QVector<Block*> &Block::linked_clips()
{
return linked_clips_;
}
bool Block::HasLinks()
{
return !linked_clips_.isEmpty();
}
void Block::Retranslate()
{
Node::Retranslate();
@@ -329,21 +277,6 @@ void Block::Retranslate()
speed_input_->set_name(tr("Speed"));
}
NodeInput *Block::length_input() const
{
return length_input_;
}
NodeInput *Block::media_in_input() const
{
return media_in_input_;
}
NodeInput *Block::speed_input() const
{
return speed_input_;
}
void Block::Hash(QCryptographicHash &, const rational &) const
{
// A block does nothing by default, so we hash nothing