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

Method ShellClosed

Plugins/org.blueberry.ui.qt/src/internal/berryShellPool.cpp:22–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20const QString ShellPool::CLOSE_LISTENER = "close listener"; //$NON-NLS-1$
21
22void ShellPool::ShellClosed(const ShellEvent::Pointer& e)
23{
24
25 if (e->doit)
26 {
27 Shell::Pointer s = e->GetSource();
28 IShellListener* l = s->GetExtraShellListener();
29
30 if (l != nullptr)
31 {
32 s->SetExtraShellListener(nullptr);
33 l->ShellClosed(e);
34
35 // The shell can 'cancel' the close by setting
36 // the 'doit' to false...if so, do nothing
37 if (e->doit)
38 {
39 availableShells.push_back(s);
40 s->SetVisible(false);
41 }
42 else
43 {
44 // Restore the listener
45 s->SetExtraShellListener(l);
46 }
47 }
48 }
49 e->doit = false;
50}
51
52ShellPool::ShellPool(Shell::Pointer parentShell, int childFlags) :
53 flags(childFlags), parentShell(parentShell)

Callers

nothing calls this directly

Calls 4

GetExtraShellListenerMethod · 0.80
SetExtraShellListenerMethod · 0.80
GetSourceMethod · 0.45
SetVisibleMethod · 0.45

Tested by

no test coverage detected