PatientLandMarksWidget::PatientLandMarksWidget(RegServicesPtr services, QWidget* parent, QString objectName, QString windowTitle) : LandmarkRegistrationWidget(services, parent, objectName, windowTitle), mToolSampleButton(new QPushButton("Sample Tool", this)) { mLandmarkListener->useI2IRegistration(false); connect(services->patient().get(), &PatientModelService::rMprChanged, this, &PatientLandMarksWidget::setModified); //buttons mToolSampleButton->setDisabled(true); connect(mToolSampleButton, SIGNAL(clicked()), this, SLOT(toolSampleButtonClickedSlot())); mRemoveLandmarkButton = new QPushButton("Clear", this); mRemoveLandmarkButton->setToolTip("Clear selected landmark"); connect(mRemoveLandmarkButton, &QPushButton::clicked, this, &PatientLandMarksWidget::removeLandmarkButtonClickedSlot); //toolmanager mActiveToolProxy = ActiveToolProxy::New(services->tracking()); connect(mActiveToolProxy.get(), SIGNAL(toolVisible(bool)), this, SLOT(updateToolSampleButton())); connect(mActiveToolProxy.get(), SIGNAL(activeToolChanged(const QString&)), this, SLOT(updateToolSampleButton())); connect(settings(), &Settings::valueChangedFor, this, &PatientLandMarksWidget::globalConfigurationFileChangedSlot); //layout mVerticalLayout->addWidget(mLandmarkTableWidget); mVerticalLayout->addWidget(mToolSampleButton); mVerticalLayout->addWidget(mAvarageAccuracyLabel); mVerticalLayout->addWidget(mRemoveLandmarkButton); this->updateToolSampleButton(); }
FastOrientationRegistrationWidget::FastOrientationRegistrationWidget(RegServicesPtr services, QWidget* parent) : RegistrationBaseWidget(services, parent, "org_custusx_registration_method_fast_landmark_image_to_patient_orientation_widget", "Fast Orientation Registration"), mSetOrientationButton(new QPushButton("Define Orientation")), mInvertButton(new QCheckBox("Back face")) { QVBoxLayout* layout = new QVBoxLayout(this); layout->addWidget(mInvertButton); layout->addWidget(mSetOrientationButton); layout->addStretch(); mSetOrientationButton->setToolTip("Orient the data to the patient using a tracked tool."); connect(settings(), &Settings::valueChangedFor, this, &FastOrientationRegistrationWidget::globalConfigurationFileChangedSlot); mActiveToolProxy = ActiveToolProxy::New(services->tracking()); connect(mActiveToolProxy.get(), SIGNAL(toolVisible(bool)), this, SLOT(enableToolSampleButtonSlot())); connect(mActiveToolProxy.get(), SIGNAL(activeToolChanged(const QString&)), this, SLOT(enableToolSampleButtonSlot())); this->enableToolSampleButtonSlot(); }