update
This commit is contained in:
parent
885065d38e
commit
5c0a48b3f4
|
@ -95,10 +95,33 @@ void MapKernel::registExecute(std::shared_ptr<ExecuteDelegate> ins)
|
||||||
_execute_types[ins->typeName()] = ins;
|
_execute_types[ins->typeName()] = ins;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct JsonString : public TopicData {
|
||||||
|
QString _string_content;
|
||||||
|
|
||||||
|
// ͨ¹ý TopicData ¼Ì³Ð
|
||||||
|
std::shared_ptr<Serializable> newDefault() const override
|
||||||
|
{
|
||||||
|
return std::shared_ptr<JsonString>();
|
||||||
|
}
|
||||||
|
void recoveryFrom(const QJsonObject& obj) override
|
||||||
|
{
|
||||||
|
STRING_PEAK(_string_content);
|
||||||
|
}
|
||||||
|
void saveTo(QJsonObject& obj) const override
|
||||||
|
{
|
||||||
|
STRING_SAVE(_string_content);
|
||||||
|
}
|
||||||
|
QString topicString() const override
|
||||||
|
{
|
||||||
|
return NAME(JsonString);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void MapKernel::initial()
|
void MapKernel::initial()
|
||||||
{
|
{
|
||||||
// 注册基础数据类型
|
// 注册基础数据类型
|
||||||
registData(std::make_shared<GeneralData>());
|
registData(std::make_shared<GeneralData>());
|
||||||
|
registData(std::make_shared<JsonString>());
|
||||||
for (auto key : _bind_loader->allType())
|
for (auto key : _bind_loader->allType())
|
||||||
registData(_bind_loader->makeDefault(key));
|
registData(_bind_loader->makeDefault(key));
|
||||||
|
|
||||||
|
@ -940,7 +963,7 @@ QList<std::shared_ptr<LogicalNode>> ExecuteNode::getForwards() const
|
||||||
|
|
||||||
QString ExecuteNode::rtName() const
|
QString ExecuteNode::rtName() const
|
||||||
{
|
{
|
||||||
return QString("%1<%2>(%3)").arg(typeName(),delegateName()).arg(getID());
|
return QString("%1<%2>(%3)").arg(typeName(), delegateName()).arg(getID());
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ExecuteNode::typeName() const
|
QString ExecuteNode::typeName() const
|
||||||
|
|
|
@ -26,9 +26,9 @@ ActionNodeConfiguration::ActionNodeConfiguration(QWidget* p)
|
||||||
p_layout->setColumnStretch(1, 1);
|
p_layout->setColumnStretch(1, 1);
|
||||||
|
|
||||||
_input_model->setHorizontalHeaderLabels(QStringList()
|
_input_model->setHorizontalHeaderLabels(QStringList()
|
||||||
<< u8"变量名" << u8"变量类型" << u8"关联变量序列" << u8"关联转换器类型");
|
<< u8"变量名" << u8"变量类型" << u8"关联转换器类型"<< u8"关联输入序列" );
|
||||||
_output_model->setHorizontalHeaderLabels(QStringList()
|
_output_model->setHorizontalHeaderLabels(QStringList()
|
||||||
<< u8"变量名" << u8"变量类型" << u8"关联变量序列" << u8"关联转换器类型");
|
<< u8"变量名" << u8"变量类型" << u8"关联转换器类型"<< u8"关联目标变量" );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ActionNodeConfiguration::setTarget(NodePresent* ins)
|
void ActionNodeConfiguration::setTarget(NodePresent* ins)
|
||||||
|
|
|
@ -99,8 +99,8 @@ VariableAdd::VariableAdd(std::shared_ptr<BehaviorMapNode> node, QWidget* parent)
|
||||||
|
|
||||||
auto cancel = new QPushButton(u8"È¡Ïû");
|
auto cancel = new QPushButton(u8"È¡Ïû");
|
||||||
auto yes = new QPushButton(u8"È·¶¨");
|
auto yes = new QPushButton(u8"È·¶¨");
|
||||||
d_layout->addWidget(yes, 2, 0);
|
d_layout->addWidget(yes, 3, 0);
|
||||||
d_layout->addWidget(cancel, 2, 2);
|
d_layout->addWidget(cancel, 3, 2);
|
||||||
|
|
||||||
connect(cancel, &QPushButton::clicked, this, &QDialog::reject);
|
connect(cancel, &QPushButton::clicked, this, &QDialog::reject);
|
||||||
connect(yes, &QPushButton::clicked, this, &VariableAdd::appendVariable);
|
connect(yes, &QPushButton::clicked, this, &VariableAdd::appendVariable);
|
||||||
|
|
Loading…
Reference in New Issue