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

Method contextMenuEvent

src/gui/PianoView.cpp:400–412  ·  view source on GitHub ↗

! \brief Handle a context menu selection on the piano display view * * \param _me the ContextMenuEvent to handle. * \todo Is this right, or does this create the context menu? */

Source from the content-addressed store, hash-verified

398 * \todo Is this right, or does this create the context menu?
399 */
400void PianoView::contextMenuEvent( QContextMenuEvent * _me )
401{
402 if( _me->pos().y() > PIANO_BASE || m_piano == NULL )
403 {
404 QWidget::contextMenuEvent( _me );
405 return;
406 }
407
408 CaptionMenu contextMenu( tr( "Base note" ) );
409 AutomatableModelView amv( m_piano->instrumentTrack()->baseNoteModel(), &contextMenu );
410 amv.addDefaultActions( &contextMenu );
411 contextMenu.exec( QCursor::pos() );
412}
413
414
415

Callers

nothing calls this directly

Calls 3

posFunction · 0.85
instrumentTrackMethod · 0.80
addDefaultActionsMethod · 0.80

Tested by

no test coverage detected