added ability to open viewers on any viewer node or derivative

Fixes #1362

Also fixes some other bugs that impeded this from working.
This commit is contained in:
itsmattkc
2021-04-12 22:58:34 +10:00
parent 17f40cf91f
commit c03c197412
26 changed files with 173 additions and 85 deletions
+2 -2
View File
@@ -180,7 +180,7 @@ void Footage::InputValueChangedEvent(const QString &input, int element)
}
}
rational Footage::GetCustomLength(Track::Type type) const
rational Footage::VerifyLengthInternal(Track::Type type) const
{
if (type == Track::kVideo) {
VideoParams first_stream = GetFirstEnabledVideoStream();
@@ -196,7 +196,7 @@ rational Footage::GetCustomLength(Track::Type type) const
}
}
return super::GetCustomLength(type);
return super::VerifyLengthInternal(type);
}
QString Footage::GetColorspaceToUse(const VideoParams &params) const
+2 -2
View File
@@ -58,7 +58,7 @@ public:
virtual QString Name() const override
{
return tr("Footage");
return tr("Media");
}
virtual QString id() const override
@@ -195,7 +195,7 @@ protected:
virtual void InputValueChangedEvent(const QString &input, int element) override;
virtual rational GetCustomLength(Track::Type type) const override;
virtual rational VerifyLengthInternal(Track::Type type) const override;
private:
QString GetColorspaceToUse(const VideoParams& params) const;
-6
View File
@@ -430,9 +430,6 @@ void ProjectViewModel::ConnectItem(Node *n)
connect(f, &Folder::BeginRemoveItem, this, &ProjectViewModel::FolderBeginRemoveItem);
connect(f, &Folder::EndRemoveItem, this, &ProjectViewModel::FolderEndRemoveItem);
connect(f, &Folder::BeginInsertItem, this, &ProjectViewModel::ItemAdded);
connect(f, &Folder::BeginRemoveItem, this, &ProjectViewModel::ItemRemoved);
foreach (Node* c, f->children()) {
ConnectItem(c);
}
@@ -450,9 +447,6 @@ void ProjectViewModel::DisconnectItem(Node *n)
disconnect(f, &Folder::BeginRemoveItem, this, &ProjectViewModel::FolderBeginRemoveItem);
disconnect(f, &Folder::EndRemoveItem, this, &ProjectViewModel::FolderEndRemoveItem);
disconnect(f, &Folder::BeginInsertItem, this, &ProjectViewModel::ItemAdded);
disconnect(f, &Folder::BeginRemoveItem, this, &ProjectViewModel::ItemRemoved);
foreach (Node* c, f->children()) {
DisconnectItem(c);
}
-5
View File
@@ -104,11 +104,6 @@ public:
*/
QModelIndex CreateIndexFromItem(Node *item, int column = 0);
signals:
void ItemAdded(Node* node);
void ItemRemoved(Node* node);
private:
/**
* @brief Retrieve the index of `item` in its parent
+1 -1
View File
@@ -107,7 +107,7 @@ void Sequence::Retranslate()
}
}
rational Sequence::GetCustomLength(Track::Type type) const
rational Sequence::VerifyLengthInternal(Track::Type type) const
{
if (!track_lists_.isEmpty()) {
switch (type) {
+1 -1
View File
@@ -103,7 +103,7 @@ protected:
virtual void InputDisconnectedEvent(const QString &input, int element, const NodeOutput &output) override;
virtual rational GetCustomLength(Track::Type type) const override;
virtual rational VerifyLengthInternal(Track::Type type) const override;
signals:
void TrackAdded(Track* track);