35 #include <QTreeWidget>
36 #include <QTreeWidgetItem>
37 #include <QStringList>
38 #include <QVBoxLayout>
61 ToolPropertiesWidget::ToolPropertiesWidget(QWidget* parent) :
62 BaseWidget(parent,
"ToolPropertiesWidget",
"Tool Properties")
65 mToptopLayout =
new QVBoxLayout(
this);
70 QHBoxLayout* generalLayout =
new QHBoxLayout;
71 mReferenceStatusLabel =
new QLabel(
"Reference frame <undefined>",
this);
72 generalLayout->addWidget(mReferenceStatusLabel);
73 mTrackingSystemStatusLabel =
new QLabel(
"Tracking <undefined>",
this);
74 generalLayout->addWidget(mTrackingSystemStatusLabel);
76 mToptopLayout->addLayout(generalLayout);
78 QGroupBox* activeGroup =
new QGroupBox(
this);
79 activeGroup->setTitle(
"Active Tool");
80 mToptopLayout->addWidget(activeGroup);
81 QVBoxLayout* activeGroupLayout =
new QVBoxLayout;
82 activeGroup->setLayout(activeGroupLayout);
84 QHBoxLayout* activeToolLayout =
new QHBoxLayout;
85 activeToolLayout->addWidget(
new QLabel(
"Name:",
this));
86 mToolNameLabel =
new QLabel(
this);
87 activeToolLayout->addWidget(mToolNameLabel);
88 mActiveToolVisibleLabel =
new QLabel(
"Visible: NA");
89 activeToolLayout->addWidget(mActiveToolVisibleLabel);
90 activeGroupLayout->addLayout(activeToolLayout);
92 QGroupBox* manualGroup =
new QGroupBox(
this);
93 manualGroup->setTitle(
"Manual Tool");
94 mToptopLayout->addWidget(manualGroup);
95 QVBoxLayout* manualGroupLayout =
new QVBoxLayout;
96 mManualGroup = manualGroup;
97 manualGroup->setLayout(manualGroupLayout);
98 manualGroupLayout->setMargin(0);
100 manualGroupLayout->addWidget(mManualToolWidget);
107 "Select coordinate system to store position in.");
112 manualGroupLayout->addWidget(
new SpaceEditWidget(
this, mSpaceSelector));
116 mToptopLayout->addWidget(mUSSectorConfigBox);
117 mUSSectorConfigBox->hide();
119 QGridLayout* gridLayout =
new QGridLayout;
120 activeGroupLayout->addLayout(gridLayout);
124 mToptopLayout->addStretch();
147 "<h3>Tool Properties</h3>"
157 mManualGroup->setVisible(
trackingService()->getManualTool()->getVisible());
158 mManualToolWidget->blockSignals(
true);
166 mManualToolWidget->blockSignals(
false);
186 mSpaceSelector->setValue(space);
187 mSpaceSelector->setHelp(QString(
"The space q to display tool position in,\n"
196 disconnect(mActiveTool.get(), SIGNAL(toolVisible(
bool)),
this, SLOT(
updateSlot()));
202 mUSSectorConfigBox->show();
203 mToptopLayout->update();
207 mUSSectorConfigBox->hide();
208 mToptopLayout->update();
212 connect(mActiveTool.get(), SIGNAL(toolVisible(
bool)),
this, SLOT(
updateSlot()));
218 disconnect(mReferenceTool.get(), SIGNAL(toolVisible(
bool)),
this, SLOT(
updateSlot()));
223 connect(mReferenceTool.get(), SIGNAL(toolVisible(
bool)),
this, SLOT(
updateSlot()));
230 mToolNameLabel->setText(
qstring_cast(mActiveTool->getName()));
231 QString text = mActiveTool->getVisible() ?
"Visible" :
"Not Visible";
232 mActiveToolVisibleLabel->setText(text);
236 mToolNameLabel->setText(
"none");
237 mActiveToolVisibleLabel->setText(
"");
242 QString text = mReferenceTool->getVisible() ?
"visible" :
"not visible";
243 mReferenceStatusLabel->setText(
"Reference " + text);
247 mReferenceStatusLabel->setText(
"Reference is the tracker");
250 QString status =
"Unconfigured";
252 status =
"Configured";
254 status =
"Initialized";
257 mTrackingSystemStatusLabel->setText(
"Tracking status: " + status);
262 QWidget::showEvent(event);
267 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()