created enum for more node data types

This commit is contained in:
itsmattkc
2019-04-09 20:55:25 +10:00
parent 433ae494ad
commit 7cbcb20543
22 changed files with 237 additions and 114 deletions
+1 -1
View File
@@ -23,7 +23,7 @@
#include <QCheckBox>
BoolField::BoolField(EffectRow *parent, const QString &id) :
EffectField(parent, id, EFFECT_FIELD_BOOL)
EffectField(parent, id, olive::nodes::kBoolean)
{}
bool BoolField::GetBoolAt(double timecode)
+1 -1
View File
@@ -23,7 +23,7 @@
#include <QPushButton>
ButtonField::ButtonField(EffectRow *parent, const QString &string) :
EffectField(parent, nullptr, EFFECT_FIELD_UI),
EffectField(parent, nullptr, olive::nodes::kUI),
button_text_(string)
{}
+1 -1
View File
@@ -25,7 +25,7 @@
#include "ui/colorbutton.h"
ColorField::ColorField(EffectRow* parent, const QString& id) :
EffectField(parent, id, EFFECT_FIELD_COLOR)
EffectField(parent, id, olive::nodes::kColor)
{}
QColor ColorField::GetColorAt(double timecode)
+1 -1
View File
@@ -25,7 +25,7 @@
#include "ui/comboboxex.h"
ComboField::ComboField(EffectRow* parent, const QString& id) :
EffectField(parent, id, EFFECT_FIELD_COMBO)
EffectField(parent, id, olive::nodes::kCombo)
{}
void ComboField::AddItem(const QString &text, const QVariant &data)
+1 -1
View File
@@ -23,7 +23,7 @@
#include "effects/effectrow.h"
DoubleField::DoubleField(EffectRow* parent, const QString& id) :
EffectField(parent, id, EFFECT_FIELD_DOUBLE),
EffectField(parent, id, olive::nodes::kFloat),
min_(qSNaN()),
max_(qSNaN()),
default_(0),
+1 -1
View File
@@ -25,7 +25,7 @@
#include "ui/embeddedfilechooser.h"
FileField::FileField(EffectRow* parent, const QString &id) :
EffectField(parent, id, EFFECT_FIELD_FILE)
EffectField(parent, id, olive::nodes::kFile)
{
// Set default value to an empty string
SetValueAt(0, "");
+1 -1
View File
@@ -28,7 +28,7 @@
// NOTE/TODO: This shares a lot of similarity with ComboField, and could probably be a derived class of it
FontField::FontField(EffectRow* parent, const QString &id) :
EffectField(parent, id, EFFECT_FIELD_FONT)
EffectField(parent, id, olive::nodes::kFont)
{
font_list = QFontDatabase().families();
+1 -1
View File
@@ -23,7 +23,7 @@
#include <QLabel>
LabelField::LabelField(EffectRow *parent, const QString &string) :
EffectField(parent, nullptr, EFFECT_FIELD_UI),
EffectField(parent, nullptr, olive::nodes::kUI),
label_text_(string)
{}
+1 -1
View File
@@ -27,7 +27,7 @@
#include "global/config.h"
StringField::StringField(EffectRow* parent, const QString& id, bool rich_text) :
EffectField(parent, id, EFFECT_FIELD_STRING),
EffectField(parent, id, olive::nodes::kString),
rich_text_(rich_text)
{
// Set default value to an empty string