MCPcopy Create free account
hub / github.com/LMMS/lmms / contextMenuEvent

Method contextMenuEvent

src/gui/widgets/AutomatableButton.cpp:84–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82
83
84void AutomatableButton::contextMenuEvent( QContextMenuEvent * _me )
85{
86 // for the case, the user clicked right while pressing left mouse-
87 // button, the context-menu appears while mouse-cursor is still hidden
88 // and it isn't shown again until user does something which causes
89 // an QApplication::restoreOverrideCursor()-call...
90 mouseReleaseEvent( NULL );
91
92 if ( m_group != NULL )
93 {
94 CaptionMenu contextMenu( m_group->model()->displayName() );
95 m_group->addDefaultActions( &contextMenu );
96 contextMenu.exec( QCursor::pos() );
97 }
98 else
99 {
100 CaptionMenu contextMenu( model()->displayName() );
101 addDefaultActions( &contextMenu );
102 contextMenu.exec( QCursor::pos() );
103 }
104
105}
106
107
108

Callers

nothing calls this directly

Calls 5

posFunction · 0.85
addDefaultActionsMethod · 0.80
modelFunction · 0.50
displayNameMethod · 0.45
modelMethod · 0.45

Tested by

no test coverage detected