本文整理汇总了C++中berry::iworkbenchpartreference::Pointer::GetId方法的典型用法代码示例。如果您正苦于以下问题:C++ Pointer::GetId方法的具体用法?C++ Pointer::GetId怎么用?C++ Pointer::GetId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类berry::iworkbenchpartreference::Pointer
的用法示例。
在下文中一共展示了Pointer::GetId方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PartClosed
void QmitkFunctionalityCoordinator::PartClosed( berry::IWorkbenchPartReference::Pointer partRef )
{
// check for multiwidget and inform views that it not available any more
if ( partRef->GetId() == QmitkStdMultiWidgetEditor::EDITOR_ID )
{
QmitkStdMultiWidgetEditor::Pointer stdMultiWidgetEditor = partRef->GetPart(false).Cast<QmitkStdMultiWidgetEditor>();
for (std::set<QmitkFunctionality*>::iterator it = m_Functionalities.begin()
; it != m_Functionalities.end(); it++)
{
(*it)->StdMultiWidgetClosed(*(stdMultiWidgetEditor->GetStdMultiWidget()));
(*it)->StdMultiWidgetNotAvailable(); // deprecated call, provided for consistence
}
}
else
{
// check for functionality
QmitkFunctionality::Pointer _QmitkFunctionality = partRef->GetPart(false).Cast<QmitkFunctionality>();
if(_QmitkFunctionality.IsNotNull())
{
// deactivate on close ( the standalone functionality may still be activated )
this->DeactivateStandaloneFunctionality(partRef.GetPointer(), 0);
// and set pointer to 0
if(m_StandaloneFuntionality == partRef.GetPointer())
m_StandaloneFuntionality = 0;
m_Functionalities.erase(_QmitkFunctionality.GetPointer()); // remove as opened functionality
// call PartClosed on the QmitkFunctionality
_QmitkFunctionality->ClosePartProxy();
//m_VisibleStandaloneFunctionalities.erase(_QmitkFunctionality.GetPointer()); // remove if necessary (should be done before in PartHidden()
}
}
}
示例2: PartVisible
void PartVisible(const berry::IWorkbenchPartReference::Pointer& ref) override
{
if (ref->GetId()=="org.mitk.views.imagenavigator")
{
imageNavigatorAction->setChecked(true);
}
}
示例3: PartHidden
void PartHidden(const berry::IWorkbenchPartReference::Pointer& ref) override
{
if (ref->GetId()=="org.mitk.views.viewnavigatorview")
{
viewNavigatorAction->setChecked(false);
}
}
示例4: PerspectiveChanged
void PerspectiveChanged(const berry::IWorkbenchPage::Pointer&,
const berry::IPerspectiveDescriptor::Pointer&,
const berry::IWorkbenchPartReference::Pointer& partRef, const std::string& changeId)
{
if (changeId=="viewHide" && partRef->GetId()=="org.mitk.views.viewnavigatorview")
berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->RemovePerspectiveListener(parentWidget->m_PerspectiveListener.data());
else
parentWidget->UpdateTreeList(nullptr, partRef.GetPointer(), changeId);
}
示例5: PartHidden
void PartHidden(const berry::IWorkbenchPartReference::Pointer& partRef)
{
if (partRef->GetId() == QmitkStdMultiWidgetEditor::EDITOR_ID)
{
QmitkStdMultiWidgetEditor::Pointer stdMultiWidgetEditor = partRef->GetPart(false).Cast<QmitkStdMultiWidgetEditor>();
if (d->m_StdMultiWidget == stdMultiWidgetEditor->GetStdMultiWidget())
{
d->m_StdMultiWidget->RemovePlanesFromDataStorage();
stdMultiWidgetEditor->RequestActivateMenuWidget(false);
}
}
}
示例6: PartVisible
void PartVisible(const berry::IWorkbenchPartReference::Pointer& partRef) override
{
if (partRef->GetId() == QmitkStdMultiWidgetEditor::EDITOR_ID)
{
QmitkStdMultiWidgetEditor::Pointer stdMultiWidgetEditor = partRef->GetPart(false).Cast<QmitkStdMultiWidgetEditor>();
if (d->m_StdMultiWidget == stdMultiWidgetEditor->GetStdMultiWidget())
{
d->m_StdMultiWidget->AddPlanesToDataStorage();
stdMultiWidgetEditor->RequestActivateMenuWidget(true);
}
}
}
示例7: PartOpened
void QmitkFunctionalityCoordinator::PartOpened( berry::IWorkbenchPartReference::Pointer partRef )
{
// check for multiwidget and inform views that it is available now
if ( partRef->GetId() == QmitkStdMultiWidgetEditor::EDITOR_ID )
{
for (std::set<QmitkFunctionality*>::iterator it = m_Functionalities.begin()
; it != m_Functionalities.end(); it++)
{
(*it)->StdMultiWidgetAvailable(*(partRef
->GetPart(false).Cast<QmitkStdMultiWidgetEditor>()->GetStdMultiWidget()));
}
}
else
{
// Check for QmitkFunctionality
QmitkFunctionality::Pointer _QmitkFunctionality = partRef->GetPart(false).Cast<QmitkFunctionality>();
if(_QmitkFunctionality.IsNotNull())
{
m_Functionalities.insert(_QmitkFunctionality.GetPointer()); // save as opened functionality
}
}
}