Dialog detail spinBox instead doubleSpinBox.
--HG-- branch : develop
This commit is contained in:
parent
708573c96e
commit
bc855ce265
|
@ -49,9 +49,9 @@ DialogDetail::DialogDetail(const VContainer *data, QWidget *parent)
|
||||||
connect(bCansel, &QPushButton::clicked, this, &DialogDetail::DialogRejected);
|
connect(bCansel, &QPushButton::clicked, this, &DialogDetail::DialogRejected);
|
||||||
|
|
||||||
connect(ui.listWidget, &QListWidget::currentRowChanged, this, &DialogDetail::ObjectChanged);
|
connect(ui.listWidget, &QListWidget::currentRowChanged, this, &DialogDetail::ObjectChanged);
|
||||||
connect(ui.doubleSpinBoxBiasX, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
|
connect(ui.spinBoxBiasX, static_cast<void (QSpinBox::*)(qint32)>(&QSpinBox::valueChanged),
|
||||||
this, &DialogDetail::BiasXChanged);
|
this, &DialogDetail::BiasXChanged);
|
||||||
connect(ui.doubleSpinBoxBiasY, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
|
connect(ui.spinBoxBiasY, static_cast<void (QSpinBox::*)(qint32)>(&QSpinBox::valueChanged),
|
||||||
this, &DialogDetail::BiasYChanged);
|
this, &DialogDetail::BiasYChanged);
|
||||||
connect(ui.checkBoxSeams, &QCheckBox::clicked, this, &DialogDetail::ClickedSeams);
|
connect(ui.checkBoxSeams, &QCheckBox::clicked, this, &DialogDetail::ClickedSeams);
|
||||||
connect(ui.checkBoxClosed, &QCheckBox::clicked, this, &DialogDetail::ClickedClosed);
|
connect(ui.checkBoxClosed, &QCheckBox::clicked, this, &DialogDetail::ClickedClosed);
|
||||||
|
@ -95,7 +95,7 @@ void DialogDetail::DialogAccepted()
|
||||||
QListWidgetItem *item = ui.listWidget->item(i);
|
QListWidgetItem *item = ui.listWidget->item(i);
|
||||||
details.append( qvariant_cast<VNodeDetail>(item->data(Qt::UserRole)));
|
details.append( qvariant_cast<VNodeDetail>(item->data(Qt::UserRole)));
|
||||||
}
|
}
|
||||||
details.setWidth(ui.doubleSpinBoxSeams->value());
|
details.setWidth(ui.spinBoxSeams->value());
|
||||||
details.setName(ui.lineEditNameDetail->text());
|
details.setName(ui.lineEditNameDetail->text());
|
||||||
details.setSeamAllowance(supplement);
|
details.setSeamAllowance(supplement);
|
||||||
details.setClosed(closed);
|
details.setClosed(closed);
|
||||||
|
@ -144,15 +144,15 @@ void DialogDetail::NewItem(qint64 id, const Tool::Tools &typeTool, const NodeDet
|
||||||
item->setData(Qt::UserRole, QVariant::fromValue(node));
|
item->setData(Qt::UserRole, QVariant::fromValue(node));
|
||||||
ui.listWidget->addItem(item);
|
ui.listWidget->addItem(item);
|
||||||
ui.listWidget->setCurrentRow(ui.listWidget->count()-1);
|
ui.listWidget->setCurrentRow(ui.listWidget->count()-1);
|
||||||
disconnect(ui.doubleSpinBoxBiasX, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
|
disconnect(ui.spinBoxBiasX, static_cast<void (QSpinBox::*)(qint32)>(&QSpinBox::valueChanged),
|
||||||
this, &DialogDetail::BiasXChanged);
|
this, &DialogDetail::BiasXChanged);
|
||||||
disconnect(ui.doubleSpinBoxBiasY, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
|
disconnect(ui.spinBoxBiasY, static_cast<void (QSpinBox::*)(qint32)>(&QSpinBox::valueChanged),
|
||||||
this, &DialogDetail::BiasYChanged);
|
this, &DialogDetail::BiasYChanged);
|
||||||
ui.doubleSpinBoxBiasX->setValue(toMM(node.getMx()));
|
ui.spinBoxBiasX->setValue(static_cast<qint32>(toMM(node.getMx())));
|
||||||
ui.doubleSpinBoxBiasY->setValue(toMM(node.getMy()));
|
ui.spinBoxBiasY->setValue(static_cast<qint32>(toMM(node.getMy())));
|
||||||
connect(ui.doubleSpinBoxBiasX, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
|
connect(ui.spinBoxBiasX, static_cast<void (QSpinBox::*)(qint32)>(&QSpinBox::valueChanged),
|
||||||
this, &DialogDetail::BiasXChanged);
|
this, &DialogDetail::BiasXChanged);
|
||||||
connect(ui.doubleSpinBoxBiasY, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
|
connect(ui.spinBoxBiasY, static_cast<void (QSpinBox::*)(qint32)>(&QSpinBox::valueChanged),
|
||||||
this, &DialogDetail::BiasYChanged);
|
this, &DialogDetail::BiasYChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ void DialogDetail::setDetails(const VDetail &value)
|
||||||
ui.checkBoxClosed->setChecked(details.getClosed());
|
ui.checkBoxClosed->setChecked(details.getClosed());
|
||||||
ClickedClosed(details.getClosed());
|
ClickedClosed(details.getClosed());
|
||||||
ClickedSeams(details.getSeamAllowance());
|
ClickedSeams(details.getSeamAllowance());
|
||||||
ui.doubleSpinBoxSeams->setValue(details.getWidth());
|
ui.spinBoxSeams->setValue(static_cast<qint32>(details.getWidth()));
|
||||||
ui.listWidget->setCurrentRow(0);
|
ui.listWidget->setCurrentRow(0);
|
||||||
ui.listWidget->setFocus(Qt::OtherFocusReason);
|
ui.listWidget->setFocus(Qt::OtherFocusReason);
|
||||||
ui.toolButtonDelete->setEnabled(true);
|
ui.toolButtonDelete->setEnabled(true);
|
||||||
|
@ -200,7 +200,7 @@ void DialogDetail::ClickedSeams(bool checked)
|
||||||
{
|
{
|
||||||
supplement = checked;
|
supplement = checked;
|
||||||
ui.checkBoxClosed->setEnabled(checked);
|
ui.checkBoxClosed->setEnabled(checked);
|
||||||
ui.doubleSpinBoxSeams->setEnabled(checked);
|
ui.spinBoxSeams->setEnabled(checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogDetail::ClickedClosed(bool checked)
|
void DialogDetail::ClickedClosed(bool checked)
|
||||||
|
@ -216,8 +216,8 @@ void DialogDetail::ObjectChanged(int row)
|
||||||
}
|
}
|
||||||
QListWidgetItem *item = ui.listWidget->item( row );
|
QListWidgetItem *item = ui.listWidget->item( row );
|
||||||
VNodeDetail node = qvariant_cast<VNodeDetail>(item->data(Qt::UserRole));
|
VNodeDetail node = qvariant_cast<VNodeDetail>(item->data(Qt::UserRole));
|
||||||
ui.doubleSpinBoxBiasX->setValue(toMM(node.getMx()));
|
ui.spinBoxBiasX->setValue(static_cast<qint32>(toMM(node.getMx())));
|
||||||
ui.doubleSpinBoxBiasY->setValue(toMM(node.getMy()));
|
ui.spinBoxBiasY->setValue(static_cast<qint32>(toMM(node.getMy())));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogDetail::DeleteItem()
|
void DialogDetail::DeleteItem()
|
||||||
|
|
|
@ -47,14 +47,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDoubleSpinBox" name="doubleSpinBoxBiasX">
|
<widget class="QSpinBox" name="spinBoxBiasX"/>
|
||||||
<property name="minimum">
|
|
||||||
<double>-10000.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<double>10000.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
@ -74,14 +67,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDoubleSpinBox" name="doubleSpinBoxBiasY">
|
<widget class="QSpinBox" name="spinBoxBiasY"/>
|
||||||
<property name="minimum">
|
|
||||||
<double>-10000.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<double>10000.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
@ -190,14 +176,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDoubleSpinBox" name="doubleSpinBoxSeams">
|
<widget class="QSpinBox" name="spinBoxSeams"/>
|
||||||
<property name="minimum">
|
|
||||||
<double>-10000.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<double>10.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user