| 43 | } |
| 44 | |
| 45 | bool QmitkCallbackFromGUIThread::event(QEvent *e) |
| 46 | { |
| 47 | QmitkCallbackEvent *event(dynamic_cast<QmitkCallbackEvent *>(e)); |
| 48 | |
| 49 | if (!event) |
| 50 | return false; |
| 51 | |
| 52 | itk::Command *cmd(event->command()); |
| 53 | |
| 54 | if (cmd) |
| 55 | { |
| 56 | if (event->itkevent()) |
| 57 | { |
| 58 | cmd->Execute((const itk::Object *)nullptr, // no itk::Object here |
| 59 | *(event->itkevent())); |
| 60 | } |
| 61 | else |
| 62 | { |
| 63 | const itk::NoEvent dummyEvent; |
| 64 | cmd->Execute((const itk::Object *)nullptr, // no itk::Object here |
| 65 | dummyEvent); |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | return true; |
| 70 | } |