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

Method contextMenuEvent

Modules/QtWidgets/src/QmitkSliderLevelWindowWidget.cpp:507–522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

505}
506
507void QmitkSliderLevelWindowWidget::contextMenuEvent(QContextMenuEvent *)
508{
509 m_Contextmenu->SetLevelWindowManager(m_Manager.GetPointer());
510 auto contextMenu = new QMenu(this);
511 Q_CHECK_PTR(contextMenu);
512 if (m_ScaleVisible)
513 contextMenu->addAction(tr("Hide Scale"), this, SLOT(HideScale()));
514 else
515 contextMenu->addAction(tr("Show Scale"), this, SLOT(ShowScale()));
516 contextMenu->addSeparator();
517 m_Contextmenu->GetContextMenu(contextMenu);
518
519 // Fix: Bug #13327 we need to reset the m_MouseDown value
520 // otherwise the cursor is not correctly restored afterwards
521 m_MouseDown = false;
522}
523
524void QmitkSliderLevelWindowWidget::HideScale()
525{

Callers

nothing calls this directly

Calls 3

GetPointerMethod · 0.80
GetContextMenuMethod · 0.80
SetLevelWindowManagerMethod · 0.45

Tested by

no test coverage detected