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

Method CanMoveFolder

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

Source from the content-addressed store, hash-verified

241}
242
243bool PartStack::CanMoveFolder()
244{
245 if (appearance == PresentationFactoryUtil::ROLE_EDITOR)
246 return true;
247
248 Perspective::Pointer perspective = this->GetPage()->GetActivePerspective();
249
250 if (perspective == 0)
251 {
252 // Shouldn't happen -- can't have a ViewStack without a
253 // perspective
254 return false;
255 }
256
257 // We need to search if one of the presentations is not moveable
258 // if that's the case the whole folder should not be moveable
259 IStackPresentationSite::Pointer presenationSite;
260
261 if ((presenationSite = this->GetPresentationSite()) != 0)
262 {
263 QList<IPresentablePart::Pointer> parts = presenationSite->GetPartList();
264 for (QList<IPresentablePart::Pointer>::iterator iter = parts.begin(); iter
265 != parts.end(); ++iter)
266 {
267 if (!presenationSite->IsPartMoveable(*iter))
268 {
269 return false;
270 }
271 }
272 }
273
274 return !perspective->IsFixedLayout();
275}
276
277void PartStack::DerefPart(LayoutPart::Pointer toDeref)
278{

Callers 2

PaneDragStartMethod · 0.95
IsStackMoveableMethod · 0.80

Calls 8

GetPageMethod · 0.95
GetPresentationSiteMethod · 0.95
GetActivePerspectiveMethod · 0.80
IsPartMoveableMethod · 0.80
GetPartListMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
IsFixedLayoutMethod · 0.45

Tested by

no test coverage detected