37 lines
1.2 KiB
C++
37 lines
1.2 KiB
C++
#include "ActionNodeConfiguration.h"
|
|
#include <QGridLayout>
|
|
|
|
ActionNodeConfiguration::ActionNodeConfiguration(QWidget* p)
|
|
:QFrame(p),
|
|
_execute_select(new QComboBox(this)),
|
|
_variables_input(new QTableView(this)),
|
|
_input_model(new QStandardItemModel(this)),
|
|
_variables_output(new QTableView(this)),
|
|
_output_model(new QStandardItemModel(this))
|
|
{
|
|
this->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
|
|
auto p_layout = new QGridLayout(this);
|
|
|
|
p_layout->addWidget(new QLabel(u8"执行器类型:", this));
|
|
p_layout->addWidget(_execute_select, 0, 1, 1, 4);
|
|
auto vars_tabw = new QTabWidget(this);
|
|
p_layout->addWidget(vars_tabw, 1, 0, 3, 5);
|
|
vars_tabw->setTabPosition(QTabWidget::West);
|
|
|
|
vars_tabw->addTab(_variables_input, u8"输入变量");
|
|
_variables_input->setModel(_input_model);
|
|
vars_tabw->addTab(_variables_output, u8"输出变量");
|
|
_variables_output->setModel(_output_model);
|
|
|
|
p_layout->setColumnStretch(1, 1);
|
|
|
|
_input_model->setHorizontalHeaderLabels(QStringList()
|
|
<< u8"变量名" << u8"变量类型" << u8"关联变量序列" << u8"关联转换器类型");
|
|
_output_model->setHorizontalHeaderLabels(QStringList()
|
|
<< u8"变量名" << u8"变量类型" << u8"关联变量序列" << u8"关联转换器类型");
|
|
}
|
|
|
|
void ActionNodeConfiguration::setTarget(NodePresent* ins)
|
|
{
|
|
}
|