| 89 | } |
| 90 | |
| 91 | bool QmitkSingleNodeSelectionWidget::eventFilter(QObject *obj, QEvent *ev) |
| 92 | { |
| 93 | if (obj == m_Controls->btnSelect) |
| 94 | { |
| 95 | if (ev->type() == QEvent::MouseButtonRelease) |
| 96 | { |
| 97 | auto mouseEv = dynamic_cast<QMouseEvent*>(ev); |
| 98 | if (!mouseEv) |
| 99 | { |
| 100 | return false; |
| 101 | } |
| 102 | |
| 103 | if (mouseEv->button() == Qt::LeftButton) |
| 104 | { |
| 105 | if (this->isEnabled()) |
| 106 | { |
| 107 | this->EditSelection(); |
| 108 | return true; |
| 109 | } |
| 110 | } |
| 111 | else |
| 112 | { |
| 113 | auto selection = this->CompileEmitSelection(); |
| 114 | if (!selection.empty()) |
| 115 | { |
| 116 | QmitkNodeDetailsDialog infoDialog(selection, this); |
| 117 | infoDialog.exec(); |
| 118 | return true; |
| 119 | } |
| 120 | } |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | return false; |
| 125 | } |
| 126 | |
| 127 | void QmitkSingleNodeSelectionWidget::EditSelection() |
| 128 | { |
nothing calls this directly
no test coverage detected