35 #include <QTreeWidget>
36 #include <QTreeWidgetItem>
37 #include <QStringList>
38 #include <QVBoxLayout>
61 ToolPropertiesWidget::ToolPropertiesWidget(QWidget* parent) :
62 BaseWidget(parent,
"ToolPropertiesWidget",
"Tool Properties")
64 this->setToolTip(
"Tool properties");
66 mToptopLayout =
new QVBoxLayout(
this);
71 QHBoxLayout* generalLayout =
new QHBoxLayout;
72 mReferenceStatusLabel =
new QLabel(
"Reference frame <undefined>",
this);
73 generalLayout->addWidget(mReferenceStatusLabel);
74 mTrackingSystemStatusLabel =
new QLabel(
"Tracking <undefined>",
this);
75 generalLayout->addWidget(mTrackingSystemStatusLabel);
77 mToptopLayout->addLayout(generalLayout);
79 QGroupBox* activeGroup =
new QGroupBox(
this);
80 activeGroup->setTitle(
"Active Tool");
81 mToptopLayout->addWidget(activeGroup);
82 QVBoxLayout* activeGroupLayout =
new QVBoxLayout;
83 activeGroup->setLayout(activeGroupLayout);
85 QHBoxLayout* activeToolLayout =
new QHBoxLayout;
86 activeToolLayout->addWidget(
new QLabel(
"Name:",
this));
87 mToolNameLabel =
new QLabel(
this);
88 activeToolLayout->addWidget(mToolNameLabel);
89 mActiveToolVisibleLabel =
new QLabel(
"Visible: NA");
90 activeToolLayout->addWidget(mActiveToolVisibleLabel);
91 activeGroupLayout->addLayout(activeToolLayout);
93 QGroupBox* manualGroup =
new QGroupBox(
this);
94 manualGroup->setTitle(
"Manual Tool");
95 mToptopLayout->addWidget(manualGroup);
96 QVBoxLayout* manualGroupLayout =
new QVBoxLayout;
97 mManualGroup = manualGroup;
98 manualGroup->setLayout(manualGroupLayout);
99 manualGroupLayout->setMargin(0);
101 manualGroupLayout->addWidget(mManualToolWidget);
108 "Select coordinate system to store position in.");
113 manualGroupLayout->addWidget(
new SpaceEditWidget(
this, mSpaceSelector));
117 mToptopLayout->addWidget(mUSSectorConfigBox);
118 mUSSectorConfigBox->hide();
120 QGridLayout* gridLayout =
new QGridLayout;
121 activeGroupLayout->addLayout(gridLayout);
125 mToptopLayout->addStretch();
149 mManualGroup->setVisible(
trackingService()->getManualTool()->getVisible());
150 mManualToolWidget->blockSignals(
true);
158 mManualToolWidget->blockSignals(
false);
178 mSpaceSelector->setValue(space);
179 mSpaceSelector->setHelp(QString(
"The space q to display tool position in,\n"
188 disconnect(mActiveTool.get(), SIGNAL(toolVisible(
bool)),
this, SLOT(
updateSlot()));
194 mUSSectorConfigBox->show();
195 mToptopLayout->update();
199 mUSSectorConfigBox->hide();
200 mToptopLayout->update();
204 connect(mActiveTool.get(), SIGNAL(toolVisible(
bool)),
this, SLOT(
updateSlot()));
210 disconnect(mReferenceTool.get(), SIGNAL(toolVisible(
bool)),
this, SLOT(
updateSlot()));
215 connect(mReferenceTool.get(), SIGNAL(toolVisible(
bool)),
this, SLOT(
updateSlot()));
222 mToolNameLabel->setText(
qstring_cast(mActiveTool->getName()));
223 QString text = mActiveTool->getVisible() ?
"Visible" :
"Not Visible";
224 mActiveToolVisibleLabel->setText(text);
228 mToolNameLabel->setText(
"none");
229 mActiveToolVisibleLabel->setText(
"");
234 QString text = mReferenceTool->getVisible() ?
"visible" :
"not visible";
235 mReferenceStatusLabel->setText(
"Reference " + text);
239 mReferenceStatusLabel->setText(
"Reference is the tracker");
242 QString status =
"Unconfigured";
244 status =
"Configured";
246 status =
"Initialized";
249 mTrackingSystemStatusLabel->setText(
"Tracking status: " + status);
254 QWidget::showEvent(event);
259 QWidget::closeEvent(event);
QString qstring_cast(const T &val)
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
boost::shared_ptr< class TrackingService > TrackingServicePtr
static SpacePropertyPtr initialize(const QString &uid, QString name, QString help, Space value=Space(), std::vector< Space > range=std::vector< Space >(), QDomNode root=QDomNode())
static StringPropertyActiveProbeConfigurationPtr New(TrackingServicePtr trackingService)
Identification of a Coordinate system.
boost::shared_ptr< class DoublePropertyBase > DoublePropertyBasePtr
cxLogicManager_EXPORT SpaceProviderPtr spaceProvider()
cxLogicManager_EXPORT TrackingServicePtr trackingService()