MCPcopy Create free account
hub / github.com/MITK/MITK / ShowPart

Method ShowPart

Plugins/org.blueberry.ui.qt/src/internal/berryPartStack.cpp:1345–1390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1343}
1344
1345void PartStack::ShowPart(LayoutPart::Pointer part, Object::Pointer cookie)
1346{
1347
1348 if (this->GetPresentation() == 0)
1349 {
1350 return;
1351 }
1352
1353 if (part->IsPlaceHolder())
1354 {
1355 part->SetContainer(ILayoutContainer::Pointer(this));
1356 return;
1357 }
1358
1359 if (part.Cast<PartPane>() == 0)
1360 {
1361 WorkbenchPlugin::Log("Incorrect part " + part->GetID() + "contained in a part stack");
1362 return;
1363 }
1364
1365 PartPane::Pointer pane = part.Cast<PartPane>();
1366
1367 PresentablePart::Pointer presentablePart(new PresentablePart(pane, Tweaklets::Get(GuiWidgetsTweaklet::KEY)->GetParent(this->GetControl())));
1368 presentableParts.push_back(presentablePart);
1369
1370 if (isActive)
1371 {
1372 part->SetContainer(ILayoutContainer::Pointer(this));
1373
1374 // The active part should always be enabled
1375 if (part->GetControl() != nullptr)
1376 Tweaklets::Get(GuiWidgetsTweaklet::KEY)->SetEnabled(part->GetControl(), true);
1377 }
1378
1379 presentationSite->GetPresentation()->AddPart(presentablePart, cookie);
1380
1381 if (requestedCurrent == 0)
1382 {
1383 this->SetSelection(pane);
1384 }
1385
1386 // if (childObscuredByZoom(part))
1387 // {
1388 // presentablePart.enableInputs(false);
1389 // }
1390}
1391
1392void PartStack::UpdateContainerVisibleTab()
1393{

Callers 3

AddMethod · 0.95
CreateControlMethod · 0.95
ReplaceMethod · 0.95

Calls 10

GetPresentationMethod · 0.95
GetControlMethod · 0.95
SetSelectionMethod · 0.95
GetFunction · 0.70
IsPlaceHolderMethod · 0.45
SetContainerMethod · 0.45
GetIDMethod · 0.45
GetParentMethod · 0.45
SetEnabledMethod · 0.45
AddPartMethod · 0.45

Tested by

no test coverage detected