const ToolTabsContainerWidget::ToolPtr ToolTabsContainerWidget::FindActiveTool() const
{
    const int activeTab = currentIndex();
    if ( ( activeTab >= 0 ) && ( activeTab < (int)m_tools.size() ) )
    {
        return m_tools.at( activeTab );
    }
    return ToolPtr();
}
Beispiel #2
0
ToolPtr PatientModelImplService::getProbeTool(QString videoSourceUid)
{
	for (std::map<QString, ToolPtr>::const_iterator iter = mProbeTools.begin(); iter != mProbeTools.end(); ++iter)
	{
		ToolPtr tool = iter->second;
		ProbePtr probe = tool->getProbe();
		if(probe && probe->getAvailableVideoSources().contains(videoSourceUid))
			return tool;
	}
	reportWarning("Found no probe for stream" + videoSourceUid);
	return ToolPtr();
}
Beispiel #3
0
void ClipperWidget::onToolChanged()
{
	if(!mClipper)
		return;
	ToolPtr tool = mToolSelector->getTool();
	if(!tool)
	{
		mClipper->useActiveTool(true);
		tool = mServices->tracking()->getActiveTool();
	}
	else
		mClipper->useActiveTool(false);
	if(mAttachedToTool->isChecked())
		mClipper->setTool(tool);
	else
		mClipper->setTool(ToolPtr());
}
Beispiel #4
0
TrackedStreamPtr TrackedStream::create(const QString &uid, const QString &name)
{
	return TrackedStreamPtr(new TrackedStream(uid, name, ToolPtr(), VideoSourcePtr()));
}