SimsWorld/SimsWorld/CompareNodeConfiguration.cpp

29 lines
964 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "CompareNodeConfiguration.h"
#include <QGridLayout>
#include <QLabel>
CompareNodeConfiguration::CompareNodeConfiguration(QWidget* p)
: QFrame(p),
_type_select(new QComboBox(this)),
_compare_select(new QComboBox(this)),
_variable_a(new QComboBox(this)),
_variable_b(new QComboBox(this))
{
this->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
auto p_layout = new QGridLayout(this);
p_layout->addWidget(new QLabel(u8"类型筛选:", this), 0, 0);
p_layout->addWidget(_type_select, 0, 1, 1, 5);
p_layout->addWidget(new QLabel(u8"比较器类型:"), 1, 0);
p_layout->addWidget(_compare_select, 1, 1, 1, 5);
p_layout->addWidget(new QLabel(u8"输入变量A", this), 2, 0);
p_layout->addWidget(_variable_a, 2, 1, 1, 5);
p_layout->addWidget(new QLabel(u8"输入变量B", this), 3, 0);
p_layout->addWidget(_variable_b, 3, 1, 1, 5);
p_layout->addWidget(new QWidget(this), 4, 0, 1, 6);
p_layout->setColumnStretch(1, 1);
p_layout->setRowStretch(4, 1);
}