44 mAcquisitionService(acquisitionService)
46 QVBoxLayout* mVerticalLayout =
new QVBoxLayout(
this);
50 mSelectRecordSession.reset(
new SelectRecordSession(mOptions, acquisitionService, services));
51 connect(mSelectRecordSession->getSessionSelector().get(), &
StringProperty::changed,
this, &RecordTrackingWidget::onMergeChanged);
54 "Merge new recording with selected recorded session",
56 connect(mMergeWithExistingSession.get(), &
BoolProperty::changed,
this, &RecordTrackingWidget::onMergeChanged);
59 mRecordSessionWidget =
new RecordSessionWidget(mAcquisitionService,
this, context, category);
61 mVerticalLayout->setMargin(0);
65 mVerticalLayout->addWidget(mToolSelectorWidget);
66 mVerticalLayout->addWidget(mRecordSessionWidget);
67 mVerticalLayout->addWidget(mMergeWithExistingSessionWidget);
68 mVerticalLayout->addWidget(
new LabeledComboBoxWidget(
this, mSelectRecordSession->getSessionSelector()));
71 connect(mObscuredListener.get(), SIGNAL(obscured(
bool)),
this, SLOT(obscuredSlot(
bool)));
76 mToolSelectorWidget->setVisible(on);
81 return mSelectRecordSession->getSessionSelector();
84 void RecordTrackingWidget::acquisitionStarted()
91 if (!mMergeWithExistingSession->getValue())
92 activeRep3D->getTracer()->clear();
93 activeRep3D->getTracer()->setColor(QColor(
"magenta"));
94 activeRep3D->getTracer()->start();
98 void RecordTrackingWidget::acquisitionStopped()
100 QString newUid = mAcquisitionService->getLatestSession()->getUid();
101 mSelectRecordSession->getSessionSelector()->setValue(newUid);
103 mServices->patient()->autoSave();
108 activeRep3D->getTracer()->stop();
110 mRecordingTool.reset();
115 void RecordTrackingWidget::acquisitionCancelled()
120 activeRep3D->getTracer()->stop();
121 activeRep3D->getTracer()->clear();
123 mRecordingTool.reset();
126 void RecordTrackingWidget::onMergeChanged()
128 QString mergeSession =
"";
129 if (mMergeWithExistingSession->getValue())
130 mergeSession = mSelectRecordSession->getSessionSelector()->getValue();
137 return mServices->view()->get3DReps(0, 0)->findFirst<
ToolRep3D>(mRecordingTool);
140 void RecordTrackingWidget::obscuredSlot(
bool obscured)
143 mAcquisitionService->cancelRecord();
162 mSelectRecordSession->setVisible(!obscured);
165 void RecordTrackingWidget::onToolChanged()
167 mSelectRecordSession->setTool(mToolSelector->getTool());
173 ToolPtr retval = mToolSelector->getTool();
175 retval = mServices->tracking()->getActiveTool();
181 return mSelectRecordSession->getRecordedTrackerData_prMt();
186 if(!mMergeWithExistingSessionWidget->isHidden())
187 mMergeWithExistingSessionWidget->hide();
static BoolPropertyPtr initialize(const QString &uid, QString name, QString help, bool value, QDomNode root=QDomNode())
void acquisitionStopped()
boost::shared_ptr< class AcquisitionService > AcquisitionServicePtr
boost::shared_ptr< class VisServices > VisServicesPtr
void activeToolChanged(const QString &uId)
boost::shared_ptr< class StringProperty > StringPropertyPtr
void changed()
emit when the underlying data value is changed: The user interface will be updated.
boost::shared_ptr< class ToolRep3D > ToolRep3DPtr
Helper class for xml files used to store ssc/cx data.
std::map< double, Transform3D > TimedTransformMap
Namespace for all CustusX production code.
boost::shared_ptr< class Tool > ToolPtr