finished moving field data retrieving to row

This commit is contained in:
itsmattkc
2019-04-11 00:02:50 +10:00
parent 14ae903000
commit d3bc1d4f06
78 changed files with 1189 additions and 676 deletions
+3 -1
View File
@@ -22,6 +22,8 @@
#include <QCheckBox>
#include "effects/effect.h"
BoolField::BoolField(EffectRow *parent) :
EffectField(parent, EffectField::EFFECT_FIELD_BOOL)
{}
@@ -89,7 +91,7 @@ void BoolField::UpdateFromWidget(bool b)
{
KeyframeDataChange* kdc = new KeyframeDataChange(this);
SetValueAt(Now(), b);
SetValueAt(GetParentRow()->GetParentEffect()->Now(), b);
kdc->SetNewKeyframes();
olive::undo_stack.push(kdc);
+1 -1
View File
@@ -22,7 +22,7 @@
#include <QPushButton>
ButtonField::ButtonField(EffectRow *parent) :
ButtonField::ButtonField(EffectRow *parent, const QString &string) :
EffectField(parent, EffectField::EFFECT_FIELD_UI),
button_text_(string)
{}
+1 -1
View File
@@ -42,7 +42,7 @@ public:
/**
* @brief Reimplementation of EffectField::EffectField().
*/
ButtonField(EffectRow* parent);
ButtonField(EffectRow* parent, const QString& string);
/**
* @brief Set whether this pushbutton is checkable
+2 -1
View File
@@ -23,6 +23,7 @@
#include <QColor>
#include "ui/colorbutton.h"
#include "effects/effect.h"
ColorField::ColorField(EffectRow* parent) :
EffectField(parent, EffectField::EFFECT_FIELD_COLOR)
@@ -64,7 +65,7 @@ void ColorField::UpdateFromWidget(const QColor& c)
{
KeyframeDataChange* kdc = new KeyframeDataChange(this);
SetValueAt(Now(), c);
SetValueAt(GetParentRow()->GetParentEffect()->Now(), c);
kdc->SetNewKeyframes();
olive::undo_stack.push(kdc);
+2 -1
View File
@@ -22,6 +22,7 @@
#include <QDebug>
#include "effects/effect.h"
#include "ui/comboboxex.h"
ComboField::ComboField(EffectRow* parent) :
@@ -84,7 +85,7 @@ 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::undo_stack.push(kdc);
+2 -2
View File
@@ -20,7 +20,7 @@
#include "doublefield.h"
#include "effects/effectrow.h"
#include "effects/effect.h"
DoubleField::DoubleField(EffectRow* parent) :
EffectField(parent, EffectField::EFFECT_FIELD_DOUBLE),
@@ -138,7 +138,7 @@ void DoubleField::UpdateFromWidget(double d)
kdc_ = new KeyframeDataChange(this);
}
SetValueAt(Now(), d);
SetValueAt(GetParentRow()->GetParentEffect()->Now(), d);
if (!ls->IsDragging() && kdc_ != nullptr) {
kdc_->SetNewKeyframes();
+4 -3
View File
@@ -23,9 +23,10 @@
#include <QDebug>
#include "ui/embeddedfilechooser.h"
#include "effects/effect.h"
FileField::FileField(EffectRow* parent, const QString &id) :
EffectField(parent, id, EffectField::EFFECT_FIELD_FILE)
FileField::FileField(EffectRow* parent) :
EffectField(parent, EffectField::EFFECT_FIELD_FILE)
{
// Set default value to an empty string
SetValueAt(0, "");
@@ -59,7 +60,7 @@ void FileField::UpdateFromWidget(const QString &s)
{
KeyframeDataChange* kdc = new KeyframeDataChange(this);
SetValueAt(Now(), s);
SetValueAt(GetParentRow()->GetParentEffect()->Now(), s);
kdc->SetNewKeyframes();
olive::undo_stack.push(kdc);
+2 -2
View File
@@ -24,7 +24,7 @@
#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.
@@ -36,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
+5 -4
View File
@@ -24,11 +24,12 @@
#include <QDebug>
#include "ui/comboboxex.h"
#include "effects/effect.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, EffectField::EFFECT_FIELD_FONT)
FontField::FontField(EffectRow* parent) :
EffectField(parent, EffectField::EFFECT_FIELD_FONT)
{
font_list = QFontDatabase().families();
@@ -86,7 +87,7 @@ void FontField::UpdateFromWidget(const QString& s)
{
KeyframeDataChange* kdc = new KeyframeDataChange(this);
SetValueAt(Now(), s);
SetValueAt(GetParentRow()->GetParentEffect()->Now(), s);
kdc->SetNewKeyframes();
olive::undo_stack.push(kdc);
+1 -1
View File
@@ -37,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
+1 -1
View File
@@ -23,7 +23,7 @@
#include <QLabel>
LabelField::LabelField(EffectRow *parent, const QString &string) :
EffectField(parent, nullptr, EffectField::EFFECT_FIELD_UI),
EffectField(parent, EffectField::EFFECT_FIELD_UI),
label_text_(string)
{}
+2 -1
View File
@@ -23,6 +23,7 @@
#include <QtMath>
#include <QDebug>
#include "effects/effect.h"
#include "ui/texteditex.h"
#include "global/config.h"
@@ -92,7 +93,7 @@ void StringField::UpdateFromWidget(const QString &s)
{
KeyframeDataChange* kdc = new KeyframeDataChange(this);
SetValueAt(Now(), s);
SetValueAt(GetParentRow()->GetParentEffect()->Now(), s);
kdc->SetNewKeyframes();
olive::undo_stack.push(kdc);
+1 -1
View File
@@ -39,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