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

Method MoveWidgetToCorrectPos

Modules/QtWidgets/src/QmitkRenderWindowMenu.cpp:201–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199}
200
201void 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
219void QmitkRenderWindowMenu::ShowMenu()
220{

Callers 1

eventMethod · 0.80

Calls 2

HideMenuMethod · 0.95
ShowMenuMethod · 0.95

Tested by

no test coverage detected