feat/vtk-3d-view #7
|
|
@ -47,16 +47,16 @@ Column2DDataset::Column2DDataset(QWidget* parent) : QWidget(parent) {
|
|||
zSpin->setRange(-1000000, 1000000);
|
||||
zSpin->setSuffix(QStringLiteral(" m"));
|
||||
zSpin->setValue(0);
|
||||
zSpin->setVisible(false);
|
||||
connect(view2d, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||
[this, zSpin](int idx) {
|
||||
zSpin->setVisible(idx == 4);
|
||||
[this, form, zSpin](int idx) {
|
||||
form->setRowVisible(zSpin, idx == 4); // 整行隐藏(含"Z 值"标签),非自定义时不留孤标签
|
||||
emit view2DModeChanged(idx);
|
||||
});
|
||||
connect(zSpin, qOverload<double>(&QDoubleSpinBox::valueChanged), this,
|
||||
[this](double z) { emit customZChanged(z); });
|
||||
form->addRow(QStringLiteral("位置"), view2d);
|
||||
form->addRow(QStringLiteral("Z 值"), zSpin);
|
||||
form->setRowVisible(zSpin, false); // 默认非自定义→隐藏整行
|
||||
root->addWidget(new QLabel(QStringLiteral("2D视图")));
|
||||
root->addLayout(form);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue