| 199 | } |
| 200 | |
| 201 | void QmitkRenderWindowMenu::MoveWidgetToCorrectPos() |
| 202 | { |
| 203 | int moveX = floor(static_cast<double>(this->m_Parent->width()) - static_cast<double>(this->width()) - 4.0); |
| 204 | this->move(moveX, 3); |
| 205 | |
| 206 | auto cursorPos = this->mapFromGlobal(QCursor::pos()); |
| 207 | |
| 208 | if (cursorPos.x() < 0 || cursorPos.x() >= this->width() || |
| 209 | cursorPos.y() < 0 || cursorPos.y() >= this->height()) |
| 210 | { |
| 211 | this->HideMenu(); |
| 212 | } |
| 213 | else |
| 214 | { |
| 215 | this->ShowMenu(); |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | void QmitkRenderWindowMenu::ShowMenu() |
| 220 | { |