refactored some classes

This commit is contained in:
itsmattkc
2019-05-08 00:41:44 +10:00
parent 127a773c54
commit 9a13776b2c
133 changed files with 1698 additions and 1627 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
#include "boolinput.h"
BoolInput::BoolInput(Node* parent, const QString& id, const QString& name, bool savable, bool keyframable) :
EffectRow(parent, id, name, savable, keyframable)
BoolInput::BoolInput(OldEffectNode* parent, const QString& id, const QString& name, bool savable, bool keyframable) :
NodeIO(parent, id, name, savable, keyframable)
{
BoolField* bool_field = new BoolField(this);
connect(bool_field, SIGNAL(Toggled(bool)), this, SIGNAL(Toggled(bool)));
+3 -3
View File
@@ -1,13 +1,13 @@
#ifndef BOOLINPUT_H
#define BOOLINPUT_H
#include "effects/effectrow.h"
#include "nodes/nodeio.h"
class BoolInput : public EffectRow
class BoolInput : public NodeIO
{
Q_OBJECT
public:
BoolInput(Node* parent, const QString& id, const QString& name, bool savable = true, bool keyframable = true);
BoolInput(OldEffectNode* parent, const QString& id, const QString& name, bool savable = true, bool keyframable = true);
/**
* @brief Get the boolean value at a given timecode
+2 -2
View File
@@ -1,7 +1,7 @@
#include "colorinput.h"
ColorInput::ColorInput(Node* parent, const QString& id, const QString& name, bool savable, bool keyframable) :
EffectRow(parent, id, name, savable, keyframable)
ColorInput::ColorInput(OldEffectNode* parent, const QString& id, const QString& name, bool savable, bool keyframable) :
NodeIO(parent, id, name, savable, keyframable)
{
AddField(new ColorField(this));
+3 -3
View File
@@ -1,13 +1,13 @@
#ifndef COLORINPUT_H
#define COLORINPUT_H
#include "effects/effectrow.h"
#include "nodes/nodeio.h"
class ColorInput : public EffectRow
class ColorInput : public NodeIO
{
Q_OBJECT
public:
ColorInput(Node* parent, const QString& id, const QString& name, bool savable = true, bool keyframable = true);
ColorInput(OldEffectNode* parent, const QString& id, const QString& name, bool savable = true, bool keyframable = true);
/**
* @brief Get the color value at a given timecode
+2 -2
View File
@@ -1,7 +1,7 @@
#include "comboinput.h"
ComboInput::ComboInput(Node* parent, const QString& id, const QString& name, bool savable, bool keyframable) :
EffectRow(parent, id, name, savable, keyframable)
ComboInput::ComboInput(OldEffectNode* parent, const QString& id, const QString& name, bool savable, bool keyframable) :
NodeIO(parent, id, name, savable, keyframable)
{
ComboField* combo_field = new ComboField(this);
connect(combo_field, SIGNAL(DataChanged(const QVariant&)), this, SIGNAL(DataChanged(const QVariant&)));
+3 -3
View File
@@ -1,13 +1,13 @@
#ifndef COMBOINPUT_H
#define COMBOINPUT_H
#include "effects/effectrow.h"
#include "nodes/nodeio.h"
class ComboInput : public EffectRow
class ComboInput : public NodeIO
{
Q_OBJECT
public:
ComboInput(Node* parent, const QString& id, const QString& name, bool savable = true, bool keyframable = true);
ComboInput(OldEffectNode* parent, const QString& id, const QString& name, bool savable = true, bool keyframable = true);
/**
* @brief Add an item to this ComboInput
+2 -2
View File
@@ -1,7 +1,7 @@
#include "fileinput.h"
FileInput::FileInput(Node* parent, const QString& id, const QString& name, bool savable, bool keyframable) :
EffectRow(parent, id, name, savable, keyframable)
FileInput::FileInput(OldEffectNode* parent, const QString& id, const QString& name, bool savable, bool keyframable) :
NodeIO(parent, id, name, savable, keyframable)
{
AddField(new FileField(this));
+3 -3
View File
@@ -1,13 +1,13 @@
#ifndef FILEINPUT_H
#define FILEINPUT_H
#include "effects/effectrow.h"
#include "nodes/nodeio.h"
class FileInput : public EffectRow
class FileInput : public NodeIO
{
Q_OBJECT
public:
FileInput(Node* parent, const QString& id, const QString& name, bool savable = true, bool keyframable = true);
FileInput(OldEffectNode* parent, const QString& id, const QString& name, bool savable = true, bool keyframable = true);
/**
* @brief Get the filename at the given timecode
+2 -2
View File
@@ -1,7 +1,7 @@
#include "fontinput.h"
FontInput::FontInput(Node* parent, const QString& id, const QString& name, bool savable, bool keyframable) :
EffectRow(parent, id, name, savable, keyframable)
FontInput::FontInput(OldEffectNode* parent, const QString& id, const QString& name, bool savable, bool keyframable) :
NodeIO(parent, id, name, savable, keyframable)
{
AddField(new FontField(this));
+3 -3
View File
@@ -1,13 +1,13 @@
#ifndef FONTINPUT_H
#define FONTINPUT_H
#include "effects/effectrow.h"
#include "nodes/nodeio.h"
class FontInput : public EffectRow
class FontInput : public NodeIO
{
Q_OBJECT
public:
FontInput(Node* parent, const QString& id, const QString& name, bool savable = true, bool keyframable = true);
FontInput(OldEffectNode* parent, const QString& id, const QString& name, bool savable = true, bool keyframable = true);
/**
* @brief Get the font family name at the given timecode
+2 -2
View File
@@ -1,7 +1,7 @@
#include "stringinput.h"
StringInput::StringInput(Node* parent, const QString& id, const QString& name, bool rich_text, bool savable, bool keyframable) :
EffectRow(parent, id, name, savable, keyframable)
StringInput::StringInput(OldEffectNode* parent, const QString& id, const QString& name, bool rich_text, bool savable, bool keyframable) :
NodeIO(parent, id, name, savable, keyframable)
{
AddField(new StringField(this, rich_text));
+3 -3
View File
@@ -1,13 +1,13 @@
#ifndef STRINGINPUT_H
#define STRINGINPUT_H
#include "effects/effectrow.h"
#include "nodes/nodeio.h"
class StringInput : public EffectRow
class StringInput : public NodeIO
{
Q_OBJECT
public:
StringInput(Node* parent,
StringInput(OldEffectNode* parent,
const QString& id,
const QString& name,
bool rich_text = true,
+6 -6
View File
@@ -4,8 +4,8 @@
#include <QVector4D>
#include <QDebug>
VecInput::VecInput(Node* parent, const QString& id, const QString& name, int values, bool savable, bool keyframable) :
EffectRow(parent, id, name, savable, keyframable),
VecInput::VecInput(OldEffectNode* parent, const QString& id, const QString& name, int values, bool savable, bool keyframable) :
NodeIO(parent, id, name, savable, keyframable),
single_value_mode_(false),
values_(values)
{
@@ -79,7 +79,7 @@ void VecInput::SetSingleValueMode(bool on)
}
}
DoubleInput::DoubleInput(Node *parent, const QString &id, const QString &name, bool savable, bool keyframable) :
DoubleInput::DoubleInput(OldEffectNode *parent, const QString &id, const QString &name, bool savable, bool keyframable) :
VecInput(parent, id, name, 1, savable, keyframable)
{
}
@@ -89,7 +89,7 @@ double DoubleInput::GetDoubleAt(double timecode)
return static_cast<DoubleField*>(Field(0))->GetDoubleAt(timecode);
}
Vec2Input::Vec2Input(Node *parent, const QString &id, const QString &name, bool savable, bool keyframable) :
Vec2Input::Vec2Input(OldEffectNode *parent, const QString &id, const QString &name, bool savable, bool keyframable) :
VecInput(parent, id, name, 2, savable, keyframable)
{
}
@@ -121,7 +121,7 @@ void Vec2Input::SetValueAt(double timecode, const QVariant &value)
static_cast<DoubleField*>(Field(1))->SetValueAt(timecode, vec2.y());
}
Vec3Input::Vec3Input(Node *parent, const QString &id, const QString &name, bool savable, bool keyframable) :
Vec3Input::Vec3Input(OldEffectNode *parent, const QString &id, const QString &name, bool savable, bool keyframable) :
VecInput(parent, id, name, 3, savable, keyframable)
{
}
@@ -156,7 +156,7 @@ void Vec3Input::SetValueAt(double timecode, const QVariant &value)
static_cast<DoubleField*>(Field(2))->SetValueAt(timecode, vec3.z());
}
Vec4Input::Vec4Input(Node *parent, const QString &id, const QString &name, bool savable, bool keyframable) :
Vec4Input::Vec4Input(OldEffectNode *parent, const QString &id, const QString &name, bool savable, bool keyframable) :
VecInput(parent, id, name, 4, savable, keyframable)
{
}
+7 -7
View File
@@ -3,13 +3,13 @@
#include <QVector2D>
#include "effects/effectrow.h"
#include "nodes/nodeio.h"
class VecInput : public EffectRow
class VecInput : public NodeIO
{
Q_OBJECT
public:
VecInput(Node* parent, const QString& id, const QString& name, int values, bool savable = true, bool keyframable = true);
VecInput(OldEffectNode* parent, const QString& id, const QString& name, int values, bool savable = true, bool keyframable = true);
void SetMinimum(double minimum);
void SetMaximum(double maximum);
@@ -43,14 +43,14 @@ private:
class DoubleInput : public VecInput
{
public:
DoubleInput(Node* parent, const QString& id, const QString& name, bool savable = true, bool keyframable = true);
DoubleInput(OldEffectNode* parent, const QString& id, const QString& name, bool savable = true, bool keyframable = true);
double GetDoubleAt(double timecode);
};
class Vec2Input : public VecInput {
public:
Vec2Input(Node* parent, const QString& id, const QString& name, bool savable = true, bool keyframable = true);
Vec2Input(OldEffectNode* parent, const QString& id, const QString& name, bool savable = true, bool keyframable = true);
QVector2D GetVector2DAt(double timecode);
virtual QVariant GetValueAt(double timecode) override;
@@ -59,7 +59,7 @@ public:
class Vec3Input : public VecInput {
public:
Vec3Input(Node* parent, const QString& id, const QString& name, bool savable = true, bool keyframable = true);
Vec3Input(OldEffectNode* parent, const QString& id, const QString& name, bool savable = true, bool keyframable = true);
QVector3D GetVector3DAt(double timecode);
virtual QVariant GetValueAt(double timecode) override;
@@ -68,7 +68,7 @@ public:
class Vec4Input : public VecInput {
public:
Vec4Input(Node* parent, const QString& id, const QString& name, bool savable = true, bool keyframable = true);
Vec4Input(OldEffectNode* parent, const QString& id, const QString& name, bool savable = true, bool keyframable = true);
QVector4D GetVector4DAt(double timecode);
virtual QVariant GetValueAt(double timecode) override;