implement entire project in nodes

Project items are now represented directly in nodes opening up more versatility and possibilities. This is the first iteration of this and will be buggy. Need to test thoroughly.
This commit is contained in:
itsmattkc
2021-02-15 21:31:57 +11:00
parent 155470bec1
commit d7c5ac4b44
174 changed files with 3515 additions and 4658 deletions
+3 -3
View File
@@ -138,7 +138,7 @@ void Track::SetTrackHeight(const double &height)
emit TrackHeightChangedInPixels(GetTrackHeightInPixels());
}
void Track::LoadInternal(QXmlStreamReader *reader, XMLNodeData &)
void Track::LoadInternal(QXmlStreamReader *reader, XMLNodeData &, uint , const QAtomicInt* )
{
while (XMLReadNextStartElement(reader)) {
if (reader->name() == QStringLiteral("height")) {
@@ -567,13 +567,13 @@ bool Track::IsLocked() const
return locked_;
}
void Track::Hash(QCryptographicHash &hash, const rational &time) const
void Track::Hash(const QString &output, QCryptographicHash &hash, const rational &time) const
{
Block* b = BlockAtTime(time);
// Defer to block at this time, don't add any of our own information to the hash
if (b) {
b->Hash(hash, TransformTimeForBlock(b, time));
b->Hash(output, hash, TransformTimeForBlock(b, time));
}
}
+2 -2
View File
@@ -274,7 +274,7 @@ public:
bool IsLocked() const;
virtual void Hash(QCryptographicHash& hash, const rational &time) const override;
virtual void Hash(const QString& output, QCryptographicHash& hash, const rational &time) const override;
AudioVisualWaveform& waveform()
{
@@ -335,7 +335,7 @@ signals:
void BlocksRefreshed();
protected:
virtual void LoadInternal(QXmlStreamReader* reader, XMLNodeData& xml_node_data) override;
virtual void LoadInternal(QXmlStreamReader* reader, XMLNodeData& xml_node_data, uint version, const QAtomicInt* cancelled) override;
virtual void SaveInternal(QXmlStreamWriter* writer) const override;
+4 -4
View File
@@ -27,7 +27,7 @@
namespace olive {
TrackList::TrackList(ViewerOutput *parent, const Track::Type &type, const QString &track_input) :
TrackList::TrackList(Sequence *parent, const Track::Type &type, const QString &track_input) :
QObject(parent),
track_input_(track_input),
type_(type)
@@ -136,7 +136,7 @@ void TrackList::UpdateTrackIndexesFrom(int index)
NodeGraph *TrackList::GetParentGraph() const
{
return static_cast<NodeGraph*>(parent()->parent());
return parent()->parent();
}
const QString& TrackList::track_input() const
@@ -149,9 +149,9 @@ NodeInput TrackList::track_input(int element) const
return NodeInput(parent(), track_input(), element);
}
ViewerOutput *TrackList::parent() const
Sequence *TrackList::parent() const
{
return static_cast<ViewerOutput*>(QObject::parent());
return static_cast<Sequence*>(QObject::parent());
}
int TrackList::ArraySize() const
+3 -3
View File
@@ -29,13 +29,13 @@
namespace olive {
class ViewerOutput;
class Sequence;
class TrackList : public QObject
{
Q_OBJECT
public:
TrackList(ViewerOutput *parent, const Track::Type& type, const QString& track_input);
TrackList(Sequence *parent, const Track::Type& type, const QString& track_input);
const Track::Type& type() const
{
@@ -64,7 +64,7 @@ public:
const QString &track_input() const;
NodeInput track_input(int element) const;
ViewerOutput* parent() const;
Sequence* parent() const;
int ArraySize() const;