change: change code style to Linux style except indent.
This commit is contained in:
@@ -20,7 +20,8 @@
|
||||
|
||||
#include "solid.h"
|
||||
|
||||
namespace olive {
|
||||
namespace olive
|
||||
{
|
||||
|
||||
const QString SolidGenerator::kColorInput = QStringLiteral("color_in");
|
||||
|
||||
@@ -28,47 +29,51 @@ const QString SolidGenerator::kColorInput = QStringLiteral("color_in");
|
||||
|
||||
SolidGenerator::SolidGenerator()
|
||||
{
|
||||
// Default to a color that isn't black
|
||||
AddInput(kColorInput, NodeValue::kColor, QVariant::fromValue(Color(1.0f, 0.0f, 0.0f, 1.0f)));
|
||||
// Default to a color that isn't black
|
||||
AddInput(kColorInput, NodeValue::kColor,
|
||||
QVariant::fromValue(Color(1.0f, 0.0f, 0.0f, 1.0f)));
|
||||
}
|
||||
|
||||
QString SolidGenerator::Name() const
|
||||
{
|
||||
return tr("Solid");
|
||||
return tr("Solid");
|
||||
}
|
||||
|
||||
QString SolidGenerator::id() const
|
||||
{
|
||||
return QStringLiteral("org.olivevideoeditor.Olive.solidgenerator");
|
||||
return QStringLiteral("org.olivevideoeditor.Olive.solidgenerator");
|
||||
}
|
||||
|
||||
QVector<Node::CategoryID> SolidGenerator::Category() const
|
||||
{
|
||||
return {kCategoryGenerator};
|
||||
return { kCategoryGenerator };
|
||||
}
|
||||
|
||||
QString SolidGenerator::Description() const
|
||||
{
|
||||
return tr("Generate a solid color.");
|
||||
return tr("Generate a solid color.");
|
||||
}
|
||||
|
||||
void SolidGenerator::Retranslate()
|
||||
{
|
||||
super::Retranslate();
|
||||
super::Retranslate();
|
||||
|
||||
SetInputName(kColorInput, tr("Color"));
|
||||
SetInputName(kColorInput, tr("Color"));
|
||||
}
|
||||
|
||||
void SolidGenerator::Value(const NodeValueRow &value, const NodeGlobals &globals, NodeValueTable *table) const
|
||||
void SolidGenerator::Value(const NodeValueRow &value,
|
||||
const NodeGlobals &globals,
|
||||
NodeValueTable *table) const
|
||||
{
|
||||
table->Push(NodeValue::kTexture, Texture::Job(globals.vparams(), ShaderJob(value)), this);
|
||||
table->Push(NodeValue::kTexture,
|
||||
Texture::Job(globals.vparams(), ShaderJob(value)), this);
|
||||
}
|
||||
|
||||
ShaderCode SolidGenerator::GetShaderCode(const ShaderRequest &request) const
|
||||
{
|
||||
Q_UNUSED(request)
|
||||
Q_UNUSED(request)
|
||||
|
||||
return ShaderCode(FileFunctions::ReadFileAsString(":/shaders/solid.frag"));
|
||||
return ShaderCode(FileFunctions::ReadFileAsString(":/shaders/solid.frag"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,28 +23,29 @@
|
||||
|
||||
#include "node/node.h"
|
||||
|
||||
namespace olive {
|
||||
|
||||
class SolidGenerator : public Node
|
||||
namespace olive
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
class SolidGenerator : public Node {
|
||||
Q_OBJECT
|
||||
public:
|
||||
SolidGenerator();
|
||||
SolidGenerator();
|
||||
|
||||
NODE_DEFAULT_FUNCTIONS(SolidGenerator)
|
||||
NODE_DEFAULT_FUNCTIONS(SolidGenerator)
|
||||
|
||||
virtual QString Name() const override;
|
||||
virtual QString id() const override;
|
||||
virtual QVector<CategoryID> Category() const override;
|
||||
virtual QString Description() const override;
|
||||
virtual QString Name() const override;
|
||||
virtual QString id() const override;
|
||||
virtual QVector<CategoryID> Category() const override;
|
||||
virtual QString Description() const override;
|
||||
|
||||
virtual void Retranslate() override;
|
||||
virtual void Retranslate() override;
|
||||
|
||||
virtual void Value(const NodeValueRow& value, const NodeGlobals &globals, NodeValueTable *table) const override;
|
||||
virtual ShaderCode GetShaderCode(const ShaderRequest &request) const override;
|
||||
|
||||
static const QString kColorInput;
|
||||
virtual void Value(const NodeValueRow &value, const NodeGlobals &globals,
|
||||
NodeValueTable *table) const override;
|
||||
virtual ShaderCode
|
||||
GetShaderCode(const ShaderRequest &request) const override;
|
||||
|
||||
static const QString kColorInput;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user