moved block links to node links

Seems like it might be useful to have this as part of the node architecture as a whole
This commit is contained in:
itsmattkc
2021-01-25 09:17:25 +11:00
parent 2c7e974f78
commit 7795d42347
11 changed files with 222 additions and 227 deletions
+8 -23
View File
@@ -112,22 +112,6 @@ public:
bool is_enabled() const;
void set_enabled(bool e);
static bool Link(Block* a, Block* b);
static void Link(const QList<Block*>& blocks);
static bool Unlink(Block* a, Block* b);
static void Unlink(const QList<Block*>& blocks);
static bool AreLinked(Block* a, Block* b);
const QVector<Block*>& linked_clips() const
{
return linked_clips_;
}
bool HasLinks() const
{
return !linked_clips_.isEmpty();
}
virtual void Retranslate() override;
NodeInput* length_input() const
@@ -175,13 +159,16 @@ public:
index_ = i;
}
const QVector<Block*>& block_links() const
{
return block_links_;
}
virtual void Hash(QCryptographicHash &hash, const rational &time) const override;
public slots:
signals:
void LinksChanged();
void EnabledChanged();
void LengthChanged();
@@ -191,12 +178,10 @@ protected:
rational MediaToSequenceTime(const rational& media_time) const;
virtual void LoadInternal(QXmlStreamReader* reader, XMLNodeData& xml_node_data) override;
virtual void SaveInternal(QXmlStreamWriter* writer) const override;
virtual QVector<NodeInput*> GetInputsToHash() const override;
virtual void LinkChangeEvent() override;
Block* previous_;
Block* next_;
@@ -216,7 +201,7 @@ private:
TransitionBlock* in_transition_;
TransitionBlock* out_transition_;
QVector<Block*> linked_clips_;
QVector<Block*> block_links_;
};