本文整理汇总了C++中ToolPtr::getUid方法的典型用法代码示例。如果您正苦于以下问题:C++ ToolPtr::getUid方法的具体用法?C++ ToolPtr::getUid怎么用?C++ ToolPtr::getUid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ToolPtr
的用法示例。
在下文中一共展示了ToolPtr::getUid方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mBase
PlaybackTool::PlaybackTool(ToolPtr base, PlaybackTimePtr time) :
ToolImpl(base->getUid(), "playback "+base->getName()), mBase(base),
mTime(time),
mVisible(false)
{
connect(mTime.get(), SIGNAL(changed()), this, SLOT(timeChangedSlot()));
connect(mBase.get(), SIGNAL(toolProbeSector()), this, SIGNAL(toolProbeSector()));
connect(mBase.get(), SIGNAL(tooltipOffset(double)), this, SIGNAL(tooltipOffset(double)));
}
示例2: RepContainer
void ViewWrapper3D::toolsAvailableSlot()
{
std::vector<ToolRep3DPtr> reps = RepContainer::findReps<ToolRep3D>(mView->getReps());
TrackingService::ToolMap tools = mServices->tracking()->getTools();
TrackingService::ToolMap::iterator iter;
for (iter = tools.begin(); iter != tools.end(); ++iter)
{
ToolPtr tool = iter->second;
if (tool->hasType(Tool::TOOL_REFERENCE))
continue;
ToolRep3DPtr toolRep = RepContainer(mView->getReps()).findFirst<ToolRep3D>(tool);
std::vector<ToolRep3DPtr>::iterator oldRep = std::find(reps.begin(), reps.end(), toolRep);
if (oldRep!=reps.end())
reps.erase(oldRep);
if (tool->hasType(Tool::TOOL_MANUAL) && !settings()->value("showManualTool").toBool())
{
if (toolRep)
mView->removeRep(toolRep);
continue;
}
// mManualTool->setVisible(settings()->value("showManualTool").toBool());
if (!toolRep)
{
toolRep = ToolRep3D::New(mServices->spaceProvider(), tool->getUid() + "_rep3d_" + this->mView->getUid());
if (settings()->value("showToolPath").toBool())
toolRep->getTracer()->start();
}
toolRep->setSphereRadius(settings()->value("View3D/sphereRadius").toDouble()); // use fraction of set size
toolRep->setSphereRadiusInNormalizedViewport(true);
toolRep->setTool(tool);
toolRep->setOffsetPointVisibleAtZeroOffset(true);
mView->addRep(toolRep);
}
// remove reps for tools no longer present
for (unsigned i=0; i<reps.size(); ++i)
{
mView->removeRep(reps[i]);
}
}
示例3: getParent
TreeNodePtr ToolTreeNode::getParent() const
{
if (this->repo()->getMode()=="flat")
return this->repo()->getNodeForGroup("tool");
if (mTool->getUid() == this->getServices()->tracking()->getManualTool()->getUid())
return this->repo()->getNode(CoordinateSystem(csPATIENTREF).toString());
if (mTool->hasType(Tool::TOOL_REFERENCE))
return this->repo()->getNode(CoordinateSystem(csPATIENTREF).toString());
ToolPtr ref = this->getServices()->tracking()->getReferenceTool();
if (ref)
return this->repo()->getNode(ref->getUid());
return this->repo()->getNode(CoordinateSystem(csPATIENTREF).toString());
}
示例4: insertToolNode
void TreeRepository::insertToolNode(ToolPtr tool)
{
if (this->getNode(tool->getUid()))
return;
this->appendNode(new ToolTreeNode(mSelf, tool));
}
示例5: AxisConnector
void ViewWrapper3D::showAxesActionSlot(bool checked)
{
if (mShowAxes == checked)
return;
mShowAxes = checked;
// clear all
for (unsigned i=0; i<mAxis.size(); ++i)
mView->removeRep(mAxis[i]->mRep);
mAxis.clear();
// show all
if (mShowAxes)
{
AxisConnectorPtr axis;
// reference space
axis.reset(new AxisConnector(CoordinateSystem(csREF), mServices->spaceProvider()));
axis->mRep->setAxisLength(0.12);
axis->mRep->setShowAxesLabels(true);
axis->mRep->setCaption("ref", Vector3D(1, 0, 0));
axis->mRep->setFontSize(0.03);
mAxis.push_back(axis);
// data spaces
std::vector<DataPtr> data = mGroupData->getData();
for (unsigned i = 0; i < data.size(); ++i)
{
axis.reset(new AxisConnector(CoordinateSystem(csDATA, data[i]->getUid()), mServices->spaceProvider()));
axis->mRep->setAxisLength(0.08);
axis->mRep->setShowAxesLabels(false);
axis->mRep->setCaption(data[i]->getName(), Vector3D(1, 0, 0));
axis->mRep->setFontSize(0.03);
mAxis.push_back(axis);
}
// tool spaces
TrackingService::ToolMap tools = mServices->tracking()->getTools();
TrackingService::ToolMap::iterator iter;
for (iter = tools.begin(); iter != tools.end(); ++iter)
{
ToolPtr tool = iter->second;
axis.reset(new AxisConnector(CoordinateSystem(csTOOL, tool->getUid()), mServices->spaceProvider()));
axis->mRep->setAxisLength(0.08);
axis->mRep->setShowAxesLabels(false);
axis->mRep->setCaption("t", Vector3D(0.7, 1, 0.7));
axis->mRep->setFontSize(0.03);
axis->connectTo(tool);
SpaceListenerPtr mToolListener = axis->mListener;
mAxis.push_back(axis);
axis.reset(new AxisConnector(CoordinateSystem(csSENSOR, tool->getUid()), mServices->spaceProvider()));
axis->mRep->setAxisLength(0.05);
axis->mRep->setShowAxesLabels(false);
axis->mRep->setCaption("s", Vector3D(1, 1, 0));
axis->mRep->setFontSize(0.03);
axis->connectTo(tool);
axis->mergeWith(mToolListener);
mAxis.push_back(axis);
}
for (unsigned i=0; i<mAxis.size(); ++i)
mView->addRep(mAxis[i]->mRep);
}
}