! \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? */
| 398 | * \todo Is this right, or does this create the context menu? |
| 399 | */ |
| 400 | void 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 |
nothing calls this directly
no test coverage detected