Exemple #1
0
void Player::playPrevMusic(PlaylistPtr playlist, const MusicMeta &info)
{
    Q_ASSERT(playlist == m_playinglist);

    if (m_mode == RepeatSingle) {
        selectPrev(info, RepeatAll);
    } else {
        selectPrev(info, m_mode);
    }
}
TeamSelector::TeamSelector()
  : teams(),
    teamsMap(),
    teamPages(),
    teamViews()
{
  static const size_t NUM_PLAYERS = 8;
  selectActions.reserve(NUM_PLAYERS);
  for(size_t i = 0; i < NUM_PLAYERS; ++i)
  {
    QAction* a = new QAction(this);
    a->setShortcut(QKeySequence(Qt::Key_F1 + i));
    addAction(a);
    connect(a, SIGNAL(triggered()), this, SLOT(selectPlayer()));
    selectActions.push_back(a);
  }

  QAction *aNext = new QAction(this);
  aNext->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_PageDown));
  addAction(aNext);
  connect(aNext, SIGNAL(triggered()), this, SLOT(selectNext()));

  QAction *aPrev = new QAction(this);
  aPrev->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_PageUp));
  addAction(aPrev);
  connect(aPrev, SIGNAL(triggered()), this, SLOT(selectPrev()));
}
Exemple #3
0
void AccDecDlg::onDelete( wxCommandEvent& event )
{
    TraceOp.trc( "accdecdlg", TRCLEVEL_INFO, __LINE__, 9999, "Delete" );
    if( m_Props != NULL ) {
        int action = wxMessageDialog( this, wxGetApp().getMsg("removewarning"), _T("Rocrail"), wxYES_NO | wxICON_EXCLAMATION ).ShowModal();
        if( action == wxID_NO )
            return;

        wxGetApp().pushUndoItem( (iONode)NodeOp.base.clone( m_Props ) );

        /* Notify RocRail. */
        iONode cmd = NodeOp.inst( wModelCmd.name(), NULL, ELEMENT_NODE );
        wModelCmd.setcmd( cmd, wModelCmd.remove );
        NodeOp.addChild( cmd, (iONode)m_Props->base.clone( m_Props ) );
        wxGetApp().sendToRocrail( cmd );
        cmd->base.del(cmd);

        iONode model = wxGetApp().getModel();
        if( model != NULL ) {
            iONode declist = wPlan.getdeclist( model );
            if( declist != NULL ) {
                NodeOp.removeChild( declist, m_Props );
                m_Props = selectPrev();
            }
        }

        initIndex();
    }
}
Exemple #4
0
void Menu::update() {
	if(_inputs->down->justPressed()) {
		selectNext();
	} else if(_inputs->up->justPressed()) {
		selectPrev();
	} else if(_inputs->ok->justPressed()) {
		validate();
	} else if(_inputs->cancel->justPressed()) {
		cancel();
	}
}