35 #include <QHBoxLayout>
48 mInternalUpdate =
false;
60 QWidget* widget =
new QWidget;
61 QVBoxLayout* topLayout =
new QVBoxLayout(widget);
62 QHBoxLayout* hLayout =
new QHBoxLayout;
63 hLayout->setMargin(0);
64 topLayout->setMargin(0);
65 topLayout->addLayout(hLayout);
69 "Select coordinate system to store position in.");
76 connect(mFrameWidget, SIGNAL(changed()),
this, SLOT(frameWidgetChangedSlot()));
77 topLayout->addWidget(mFrameWidget);
79 QPushButton* sampleButton =
new QPushButton(
"Sample");
80 sampleButton->setToolTip(
"Set the position equal to the current tool tip position.");
81 hLayout->addWidget(sampleButton);
83 connect(mSpaceSelector.get(), SIGNAL(valueWasSet()),
this, SLOT(spaceSelected()));
84 connect(sampleButton, SIGNAL(clicked()),
this, SLOT(moveToToolPosition()));
110 return mData->getSpace().toString();
114 void FrameMetricWrapper::moveToToolPosition()
118 mData->setFrame(qMt);
121 void FrameMetricWrapper::spaceSelected()
125 CoordinateSystem space = mSpaceSelector->getValue();
127 mData->setSpace(space);
134 void FrameMetricWrapper::frameWidgetChangedSlot()
139 mData->setFrame(matrix);
144 mInternalUpdate =
true;
145 mSpaceSelector->setValue(mData->getSpace());
146 mFrameWidget->
setMatrix(mData->getFrame());
147 mInternalUpdate =
false;
boost::shared_ptr< class FrameMetric > FrameMetricPtr
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
boost::shared_ptr< DataMetric > DataMetricPtr
void addColorWidget(QVBoxLayout *layout)
static SpacePropertyPtr initialize(const QString &uid, QString name, QString help, Space value=Space(), std::vector< Space > range=std::vector< Space >(), QDomNode root=QDomNode())
QString prettyFormat(Vector3D val, int decimals, int fieldWidth)
FrameMetricWrapper(ViewServicePtr viewService, PatientModelServicePtr patientModelService, cx::FrameMetricPtr data)
virtual QString getType() const
virtual DataMetricPtr getData() const
virtual QString getArguments() const
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
virtual QWidget * createWidget()
cxLogicManager_EXPORT SpaceProviderPtr spaceProvider()
virtual QString getValue() const
cxLogicManager_EXPORT ViewServicePtr viewService()
virtual ~FrameMetricWrapper()