Пример #1
0
void InterlinearLineLabel::contextMenuEvent ( QContextMenuEvent * event )
{
    QMenu menu(this);

    menu.addAction(tr("Approve all"), this, SLOT(approveAll()) );
    menu.addAction(tr("Edit baseline text"), this, SLOT(editBaselineText()) );
    menu.addAction(tr("Copy baseline text"), this, SLOT(copyBaselineTextToClipboard()));

    // this seems like the most intuitive thing to me, from a user interface standpoint
    QAction *playSound = menu.addAction(tr("Play sound"), this, SLOT(playSound()) );
    playSound->setEnabled( mPhrase->interval()->isValid() );

    menu.addAction(tr("New paragraph here"), this, SLOT(newParagraphAt()) );

    menu.addAction(tr("Merge with previous line"), this, SLOT(mergePhraseWithPrevious()) );

    menu.addAction(tr("Delete this line"), this, SLOT(removePhrase()) );

    menu.exec(event->globalPos());
}
Пример #2
0
void Game::rejectAllPlayers()
{
	approveAll();
	for (int i = 0; i < (int)teamApproveAll.size(); i++)
		teamApproveAll[i] = false;
}