change: change code style to Linux style except indent.

This commit is contained in:
Mike Solar
2025-08-03 03:09:40 +08:00
parent 65ab76edc8
commit 74f73ab3be
789 changed files with 77113 additions and 68888 deletions
+30 -31
View File
@@ -20,63 +20,62 @@
#include "valuenode.h"
namespace olive {
namespace olive
{
const QString ValueNode::kTypeInput = QStringLiteral("type_in");
const QString ValueNode::kValueInput = QStringLiteral("value_in");
const QVector<NodeValue::Type> ValueNode::kSupportedTypes = {
NodeValue::kFloat,
NodeValue::kInt,
NodeValue::kRational,
NodeValue::kVec2,
NodeValue::kVec3,
NodeValue::kVec4,
NodeValue::kColor,
NodeValue::kText,
NodeValue::kMatrix,
NodeValue::kFont,
NodeValue::kBoolean,
NodeValue::kFloat, NodeValue::kInt, NodeValue::kRational,
NodeValue::kVec2, NodeValue::kVec3, NodeValue::kVec4,
NodeValue::kColor, NodeValue::kText, NodeValue::kMatrix,
NodeValue::kFont, NodeValue::kBoolean,
};
#define super Node
ValueNode::ValueNode()
{
AddInput(kTypeInput, NodeValue::kCombo, 0, InputFlags(kInputFlagNotConnectable | kInputFlagNotKeyframable));
AddInput(kTypeInput, NodeValue::kCombo, 0,
InputFlags(kInputFlagNotConnectable | kInputFlagNotKeyframable));
AddInput(kValueInput, kSupportedTypes.first(), QVariant(), InputFlags(kInputFlagNotConnectable));
AddInput(kValueInput, kSupportedTypes.first(), QVariant(),
InputFlags(kInputFlagNotConnectable));
}
void ValueNode::Retranslate()
{
super::Retranslate();
super::Retranslate();
SetInputName(kTypeInput, QStringLiteral("Type"));
SetInputName(kValueInput, QStringLiteral("Value"));
SetInputName(kTypeInput, QStringLiteral("Type"));
SetInputName(kValueInput, QStringLiteral("Value"));
QStringList type_names;
type_names.reserve(kSupportedTypes.size());
foreach (NodeValue::Type type, kSupportedTypes) {
type_names.append(NodeValue::GetPrettyDataTypeName(type));
}
SetComboBoxStrings(kTypeInput, type_names);
QStringList type_names;
type_names.reserve(kSupportedTypes.size());
foreach (NodeValue::Type type, kSupportedTypes) {
type_names.append(NodeValue::GetPrettyDataTypeName(type));
}
SetComboBoxStrings(kTypeInput, type_names);
}
void ValueNode::Value(const NodeValueRow &value, const NodeGlobals &globals, NodeValueTable *table) const
void ValueNode::Value(const NodeValueRow &value, const NodeGlobals &globals,
NodeValueTable *table) const
{
Q_UNUSED(globals)
Q_UNUSED(globals)
// Ensure value is pushed onto the table
table->Push(value[kValueInput]);
// Ensure value is pushed onto the table
table->Push(value[kValueInput]);
}
void ValueNode::InputValueChangedEvent(const QString &input, int element)
{
if (input == kTypeInput) {
SetInputDataType(kValueInput, kSupportedTypes.at(GetStandardValue(kTypeInput).toInt()));
}
if (input == kTypeInput) {
SetInputDataType(
kValueInput,
kSupportedTypes.at(GetStandardValue(kTypeInput).toInt()));
}
super::InputValueChangedEvent(input, element);
super::InputValueChangedEvent(input, element);
}
}