15 #include <QPushButton>
17 #include <QVBoxLayout>
29 mPatientOrientationButton(new QPushButton(
"Patient Orientation")),
30 mInvertButton(new QCheckBox(
"Back face"))
32 QVBoxLayout* layout =
new QVBoxLayout(
this);
34 layout->addWidget(mInvertButton);
35 layout->addWidget(mPatientOrientationButton);
38 this->setToolTip(
"Set patient orientation using the navigation tool");
39 mPatientOrientationButton->setToolTip(this->toolTip());
40 connect(mPatientOrientationButton, SIGNAL(clicked()),
this, SLOT(setPatientOrientationSlot()));
45 connect(mActiveToolProxy.get(), SIGNAL(toolVisible(
bool)),
this, SLOT(enableToolSampleButtonSlot()));
46 connect(mActiveToolProxy.get(), SIGNAL(activeToolChanged(
const QString&)),
this, SLOT(enableToolSampleButtonSlot()));
47 this->enableToolSampleButtonSlot();
53 void PatientOrientationWidget::globalConfigurationFileChangedSlot(QString key)
55 if (key ==
"giveManualToolPhysicalProperties")
56 this->enableToolSampleButtonSlot();
59 Transform3D PatientOrientationWidget::get_tMtm()
const
63 if (mInvertButton->isChecked())
75 void PatientOrientationWidget::setPatientOrientationSlot()
78 mServices->registration()->applyPatientOrientation(this->get_tMtm(), prMt);
81 void PatientOrientationWidget::enableToolSampleButtonSlot()
84 bool enabled = tool &&
88 mPatientOrientationButton->setEnabled(enabled);