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);
64 mVerticalLayout->addWidget(mToolSelectorWidget);
65 mVerticalLayout->addWidget(mRecordSessionWidget);
67 mVerticalLayout->addWidget(
new LabeledComboBoxWidget(
this, mSelectRecordSession->getSessionSelector()));
70 connect(mObscuredListener.get(), SIGNAL(obscured(
bool)),
this, SLOT(obscuredSlot(
bool)));
75 mToolSelectorWidget->setVisible(on);
80 return mSelectRecordSession->getSessionSelector();
83 void RecordTrackingWidget::acquisitionStarted()
90 if (!mMergeWithExistingSession->getValue())
91 activeRep3D->getTracer()->clear();
92 activeRep3D->getTracer()->setColor(QColor(
"magenta"));
93 activeRep3D->getTracer()->start();
97 void RecordTrackingWidget::acquisitionStopped()
99 QString newUid = mAcquisitionService->getLatestSession()->getUid();
100 mSelectRecordSession->getSessionSelector()->setValue(newUid);
102 mServices->patient()->autoSave();
107 activeRep3D->getTracer()->stop();
109 mRecordingTool.reset();
114 void RecordTrackingWidget::acquisitionCancelled()
119 activeRep3D->getTracer()->stop();
120 activeRep3D->getTracer()->clear();
122 mRecordingTool.reset();
125 void RecordTrackingWidget::onMergeChanged()
127 QString mergeSession =
"";
128 if (mMergeWithExistingSession->getValue())
129 mergeSession = mSelectRecordSession->getSessionSelector()->getValue();
136 return mServices->view()->get3DReps(0, 0)->findFirst<
ToolRep3D>(mRecordingTool);
139 void RecordTrackingWidget::obscuredSlot(
bool obscured)
142 mAcquisitionService->cancelRecord();
161 mSelectRecordSession->setVisible(!obscured);
164 void RecordTrackingWidget::onToolChanged()
166 mSelectRecordSession->setTool(mToolSelector->getTool());
172 ToolPtr retval = mToolSelector->getTool();
174 retval = mServices->tracking()->getActiveTool();
180 return mSelectRecordSession->getRecordedTrackerData_prMt();
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