viewer: allow switching open sequences

This commit is contained in:
itsmattkc
2020-03-21 22:18:17 +11:00
parent 3c3543a2a9
commit 51f02ea01b
19 changed files with 207 additions and 70 deletions
-2
View File
@@ -46,8 +46,6 @@ QIcon Folder::icon()
void Folder::Load(QXmlStreamReader *reader, QHash<quintptr, StreamPtr> &footage_ptrs, QList<NodeParam::FootageConnection>& footage_connections, const QAtomicInt *cancelled)
{
qDebug() << "Hello?";
XMLAttributeLoop(reader, attr) {
if (cancelled && *cancelled) {
return;
+1 -14
View File
@@ -32,7 +32,7 @@
#include "panel/curve/curve.h"
#include "panel/param/param.h"
#include "panel/timeline/timeline.h"
#include "panel/viewer/viewer.h"
#include "panel/sequenceviewer/sequenceviewer.h"
#include "ui/icons/icons.h"
Sequence::Sequence()
@@ -161,19 +161,6 @@ void Sequence::Save(QXmlStreamWriter *writer) const
writer->writeEndElement(); // sequence
}
void Sequence::Open(Sequence* sequence)
{
// FIXME: This is fairly "hardcoded" behavior and doesn't support infinite panels
ViewerPanel* viewer_panel = PanelManager::instance()->MostRecentlyFocused<ViewerPanel>();
TimelinePanel* timeline_panel = PanelManager::instance()->MostRecentlyFocused<TimelinePanel>();
NodePanel* node_panel = PanelManager::instance()->MostRecentlyFocused<NodePanel>();
viewer_panel->ConnectViewerNode(sequence->viewer_output_);
timeline_panel->ConnectViewerNode(sequence->viewer_output_);
node_panel->SetGraph(sequence);
}
void Sequence::add_default_nodes()
{
// Create tracks and connect them to the viewer
-2
View File
@@ -50,8 +50,6 @@ public:
*/
virtual void Save(QXmlStreamWriter *writer) const override;
static void Open(Sequence *sequence);
void add_default_nodes();
/**
-2
View File
@@ -35,8 +35,6 @@ Project::Project()
void Project::Load(QXmlStreamReader *reader, const QAtomicInt* cancelled)
{
qDebug() << "Hello?";
QHash<quintptr, StreamPtr> footage_ptrs;
QList<NodeInput::FootageConnection> footage_connections;
-2
View File
@@ -19,8 +19,6 @@ void ProjectLoadManager::Action()
if (project_file.open(QFile::ReadOnly | QFile::Text)) {
QXmlStreamReader reader(&project_file);
qDebug() << "Hello?";
while (XMLReadNextStartElement(&reader)) {
if (reader.name() == QStringLiteral("olive")) {
while(XMLReadNextStartElement(&reader)) {