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

Method closeEvent

Modules/QtWidgetsExt/src/QmitkColorPropertyEditor.cpp:113–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113void QmitkPopupColorChooser::closeEvent(QCloseEvent *e)
114{
115 e->accept();
116
117 releaseKeyboard();
118 releaseMouse();
119
120 if (!m_popupParent)
121 return;
122
123 // remember that we (as a popup) might receive the mouse release
124 // event instead of the popupParent. This is due to the fact that
125 // the popupParent popped us up in its mousePressEvent handler. To
126 // avoid the button remaining in pressed state we simply send a
127 // faked mouse button release event to it.
128 // Maleike: parent should not pop us on MouseRelease!
129 QMouseEvent me(QEvent::MouseButtonRelease, QPoint(0, 0), QPoint(0, 0), Qt::LeftButton, Qt::NoButton, Qt::NoModifier);
130 QApplication::sendEvent(m_popupParent, &me);
131}
132
133void QmitkPopupColorChooser::popup(QWidget *parent, const QPoint &point, const mitk::Color *color)
134{

Callers

nothing calls this directly

Calls 2

QPointClass · 0.85
acceptMethod · 0.45

Tested by

no test coverage detected