merge of long discussed new pipeline

This commit is contained in:
itsmattkc
2019-05-04 10:48:20 +10:00
382 changed files with 22362 additions and 11653 deletions
+27 -4
View File
@@ -1,9 +1,32 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "boolfield.h"
#include <QCheckBox>
BoolField::BoolField(EffectRow *parent, const QString &id) :
EffectField(parent, id, EFFECT_FIELD_BOOL)
#include "nodes/node.h"
#include "undo/undo.h"
BoolField::BoolField(EffectRow *parent) :
EffectField(parent, EffectField::EFFECT_FIELD_BOOL)
{}
bool BoolField::GetBoolAt(double timecode)
@@ -69,8 +92,8 @@ void BoolField::UpdateFromWidget(bool b)
{
KeyframeDataChange* kdc = new KeyframeDataChange(this);
SetValueAt(Now(), b);
SetValueAt(GetParentRow()->GetParentEffect()->Now(), b);
kdc->SetNewKeyframes();
olive::UndoStack.push(kdc);
olive::undo_stack.push(kdc);
}
+21 -1
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef BOOLFIELD_H
#define BOOLFIELD_H
@@ -15,7 +35,7 @@ public:
/**
* @brief Reimplementation of EffectField::EffectField().
*/
BoolField(EffectRow* parent, const QString& id);
BoolField(EffectRow* parent);
/**
* @brief Get the boolean value at a given timecode
+21 -1
View File
@@ -1,9 +1,29 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "buttonfield.h"
#include <QPushButton>
ButtonField::ButtonField(EffectRow *parent, const QString &string) :
EffectField(parent, nullptr, EFFECT_FIELD_UI),
EffectField(parent, EffectField::EFFECT_FIELD_UI),
button_text_(string)
{}
+20
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef BUTTONFIELD_H
#define BUTTONFIELD_H
+26 -4
View File
@@ -1,11 +1,33 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "colorfield.h"
#include <QColor>
#include "ui/colorbutton.h"
#include "nodes/node.h"
#include "undo/undo.h"
ColorField::ColorField(EffectRow* parent, const QString& id) :
EffectField(parent, id, EFFECT_FIELD_COLOR)
ColorField::ColorField(EffectRow* parent) :
EffectField(parent, EffectField::EFFECT_FIELD_COLOR)
{}
QColor ColorField::GetColorAt(double timecode)
@@ -44,8 +66,8 @@ void ColorField::UpdateFromWidget(const QColor& c)
{
KeyframeDataChange* kdc = new KeyframeDataChange(this);
SetValueAt(Now(), c);
SetValueAt(GetParentRow()->GetParentEffect()->Now(), c);
kdc->SetNewKeyframes();
olive::UndoStack.push(kdc);
olive::undo_stack.push(kdc);
}
+21 -1
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef COLORFIELD_H
#define COLORFIELD_H
@@ -15,7 +35,7 @@ public:
/**
* @brief Reimplementation of EffectField::EffectField().
*/
ColorField(EffectRow* parent, const QString& id);
ColorField(EffectRow* parent);
/**
* @brief Get the color value at a given timecode
+26 -4
View File
@@ -1,11 +1,33 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "combofield.h"
#include <QDebug>
#include "nodes/node.h"
#include "ui/comboboxex.h"
#include "undo/undo.h"
ComboField::ComboField(EffectRow* parent, const QString& id) :
EffectField(parent, id, EFFECT_FIELD_COMBO)
ComboField::ComboField(EffectRow* parent) :
EffectField(parent, EffectField::EFFECT_FIELD_COMBO)
{}
void ComboField::AddItem(const QString &text, const QVariant &data)
@@ -64,8 +86,8 @@ void ComboField::UpdateFromWidget(int index)
{
KeyframeDataChange* kdc = new KeyframeDataChange(this);
SetValueAt(Now(), items_.at(index).data);
SetValueAt(GetParentRow()->GetParentEffect()->Now(), items_.at(index).data);
kdc->SetNewKeyframes();
olive::UndoStack.push(kdc);
olive::undo_stack.push(kdc);
}
+21 -1
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef COMBOFIELD_H
#define COMBOFIELD_H
@@ -28,7 +48,7 @@ public:
/**
* @brief Reimplementation of EffectField::EffectField().
*/
ComboField(EffectRow* parent, const QString& id);
ComboField(EffectRow* parent);
/**
* @brief Add an item to this ComboField
+26 -5
View File
@@ -1,9 +1,30 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "doublefield.h"
#include "effects/effectrow.h"
#include "nodes/node.h"
#include "undo/undo.h"
DoubleField::DoubleField(EffectRow* parent, const QString& id) :
EffectField(parent, id, EFFECT_FIELD_DOUBLE),
DoubleField::DoubleField(EffectRow* parent) :
EffectField(parent, EffectField::EFFECT_FIELD_DOUBLE),
min_(qSNaN()),
max_(qSNaN()),
default_(0),
@@ -118,12 +139,12 @@ void DoubleField::UpdateFromWidget(double d)
kdc_ = new KeyframeDataChange(this);
}
SetValueAt(Now(), d);
SetValueAt(GetParentRow()->GetParentEffect()->Now(), d);
if (!ls->IsDragging() && kdc_ != nullptr) {
kdc_->SetNewKeyframes();
olive::UndoStack.push(kdc_);
olive::undo_stack.push(kdc_);
kdc_ = nullptr;
}
+23 -1
View File
@@ -1,9 +1,31 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef DOUBLEFIELD_H
#define DOUBLEFIELD_H
#include "../effectfield.h"
#include "ui/labelslider.h"
class KeyframeDataChange;
/**
* @brief The DoubleField class
*
@@ -17,7 +39,7 @@ public:
/**
* @brief Reimplementation of EffectField::EffectField().
*/
DoubleField(EffectRow* parent, const QString& id);
DoubleField(EffectRow* parent);
/**
* @brief Get double value at timecode
+26 -4
View File
@@ -1,11 +1,33 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "filefield.h"
#include <QDebug>
#include "ui/embeddedfilechooser.h"
#include "nodes/node.h"
#include "undo/undo.h"
FileField::FileField(EffectRow* parent, const QString &id) :
EffectField(parent, id, EFFECT_FIELD_FILE)
FileField::FileField(EffectRow* parent) :
EffectField(parent, EffectField::EFFECT_FIELD_FILE)
{
// Set default value to an empty string
SetValueAt(0, "");
@@ -39,8 +61,8 @@ void FileField::UpdateFromWidget(const QString &s)
{
KeyframeDataChange* kdc = new KeyframeDataChange(this);
SetValueAt(Now(), s);
SetValueAt(GetParentRow()->GetParentEffect()->Now(), s);
kdc->SetNewKeyframes();
olive::UndoStack.push(kdc);
olive::undo_stack.push(kdc);
}
+22 -2
View File
@@ -1,10 +1,30 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef FILEFIELD_H
#define FILEFIELD_H
#include "../effectfield.h"
/**
* @brief The FileField class
* @brief The FileInput class
*
* An EffectField derivative that produces filenames in string and uses an EmbeddedFileChooser
* as its visual representation.
@@ -16,7 +36,7 @@ public:
/**
* @brief Reimplementation of EffectField::EffectField().
*/
FileField(EffectRow* parent, const QString& id);
FileField(EffectRow* parent);
/**
* @brief Get the filename at the given timecode
+27 -5
View File
@@ -1,14 +1,36 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "fontfield.h"
#include <QFontDatabase>
#include <QDebug>
#include "ui/comboboxex.h"
#include "nodes/node.h"
#include "undo/undo.h"
// NOTE/TODO: This shares a lot of similarity with ComboField, and could probably be a derived class of it
// NOTE/TODO: This shares a lot of similarity with ComboInput, and could probably be a derived class of it
FontField::FontField(EffectRow* parent, const QString &id) :
EffectField(parent, id, EFFECT_FIELD_FONT)
FontField::FontField(EffectRow* parent) :
EffectField(parent, EffectField::EFFECT_FIELD_FONT)
{
font_list = QFontDatabase().families();
@@ -66,8 +88,8 @@ void FontField::UpdateFromWidget(const QString& s)
{
KeyframeDataChange* kdc = new KeyframeDataChange(this);
SetValueAt(Now(), s);
SetValueAt(GetParentRow()->GetParentEffect()->Now(), s);
kdc->SetNewKeyframes();
olive::UndoStack.push(kdc);
olive::undo_stack.push(kdc);
}
+21 -1
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef FONTFIELD_H
#define FONTFIELD_H
@@ -17,7 +37,7 @@ public:
/**
* @brief Reimplementation of EffectField::EffectField().
*/
FontField(EffectRow* parent, const QString& id);
FontField(EffectRow* parent);
/**
* @brief Get the font family name at the given timecode
+21 -1
View File
@@ -1,9 +1,29 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "labelfield.h"
#include <QLabel>
LabelField::LabelField(EffectRow *parent, const QString &string) :
EffectField(parent, nullptr, EFFECT_FIELD_UI),
EffectField(parent, EffectField::EFFECT_FIELD_UI),
label_text_(string)
{}
+20
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef LABELFIELD_H
#define LABELFIELD_H
+27 -5
View File
@@ -1,13 +1,35 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "stringfield.h"
#include <QtMath>
#include <QDebug>
#include "nodes/node.h"
#include "ui/texteditex.h"
#include "global/config.h"
#include "undo/undo.h"
StringField::StringField(EffectRow* parent, const QString& id, bool rich_text) :
EffectField(parent, id, EFFECT_FIELD_STRING),
StringField::StringField(EffectRow* parent, bool rich_text) :
EffectField(parent, EffectField::EFFECT_FIELD_STRING),
rich_text_(rich_text)
{
// Set default value to an empty string
@@ -31,7 +53,7 @@ QWidget *StringField::CreateWidget(QWidget *existing)
text_edit->setUndoRedoEnabled(true);
// the "2" is because the height needs one extra pixel of padding on the top and the bottom
text_edit->setTextHeight(qCeil(text_edit->fontMetrics().lineSpacing()*olive::CurrentConfig.effect_textbox_lines
text_edit->setTextHeight(qCeil(text_edit->fontMetrics().lineSpacing()*olive::config.effect_textbox_lines
+ text_edit->document()->documentMargin()
+ text_edit->document()->documentMargin() + 2));
@@ -72,8 +94,8 @@ void StringField::UpdateFromWidget(const QString &s)
{
KeyframeDataChange* kdc = new KeyframeDataChange(this);
SetValueAt(Now(), s);
SetValueAt(GetParentRow()->GetParentEffect()->Now(), s);
kdc->SetNewKeyframes();
olive::UndoStack.push(kdc);
olive::undo_stack.push(kdc);
}
+21 -1
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef STRINGFIELD_H
#define STRINGFIELD_H
@@ -19,7 +39,7 @@ public:
* Provides a setting for whether this StringField - and its attached TextEditEx objects - should operate in rich
* text or plain text mode, defaulting to rich text mode.
*/
StringField(EffectRow* parent, const QString& id, bool rich_text = true);
StringField(EffectRow* parent, bool rich_text = true);
/**
* @brief Get the string at the given timecode