26 BaseWidget(parent,
"tool_manual_calibration_widget",
"Tool Manual Calibrate"),
30 QVBoxLayout* mToptopLayout =
new QVBoxLayout(
this);
33 this->setToolTip(
"Edit tool calibration matrix sMt");
37 mToptopLayout->addWidget(
new QLabel(
"<font color=red>Caution: sMt is changed directly by this control.</font>"));
38 mGroup =
new QGroupBox(
this);
39 mGroup->setTitle(
"Calibration matrix sMt");
40 mToptopLayout->addWidget(mGroup);
41 QVBoxLayout* groupLayout =
new QVBoxLayout;
42 mGroup->setLayout(groupLayout);
43 groupLayout->setMargin(0);
45 groupLayout->addWidget(mMatrixWidget);
46 connect(mMatrixWidget, SIGNAL(changed()),
this, SLOT(matrixWidgetChanged()));
47 connect(mTool.get(), SIGNAL(changed()),
this, SLOT(toolCalibrationChanged()));
49 this->toolCalibrationChanged();
52 mToptopLayout->addStretch();
57 void ToolManualCalibrationWidget::toolCalibrationChanged()
64 mMatrixWidget->blockSignals(
true);
65 mMatrixWidget->
setMatrix(tool->getCalibration_sMt());
66 mMatrixWidget->blockSignals(
false);
69 void ToolManualCalibrationWidget::matrixWidgetChanged()
77 tool->setCalibration_sMt(M);
80 ToolPtr ToolManualCalibrationWidget::getTool()
82 ToolPtr tool = mTool->getTool();
85 ToolPtr baseTool = tool->getBaseTool();