Player* Server::newPlayer() { Player* newPlayer = new Player(m_world->physicEngine(), nextPhysicObjectId()); connectPlayer(newPlayer); m_world->connectPlayer(newPlayer); ldebug(Channel_Server, tr("A new Player #%1 is in the server.").arg(newPlayer->id())); return newPlayer; }
void PlayerSetupDialog::setupUI() { connect(ui->addPlayerBtn, SIGNAL(clicked()), this, SLOT(newPlayer())); connect(ui->removePlayerBtn, SIGNAL(clicked()), this, SLOT(removePlayer())); connect(ui->newSubviewBtn, SIGNAL(clicked()), this, SLOT(newSubview())); connect(ui->delSubviewBtn, SIGNAL(clicked()), this, SLOT(removeSubview())); connect(ui->testConnectionBtn, SIGNAL(clicked()), this, SLOT(testConnection())); connect(ui->connectBtn, SIGNAL(clicked()), this, SLOT(connectPlayer())); connect(ui->autoconnectBox, SIGNAL(toggled(bool)), this, SLOT(autoconBoxChanged(bool))); connect(ui->playerListview, SIGNAL(activated(const QModelIndex &)), this, SLOT(playerSelected(const QModelIndex &))); connect(ui->playerListview, SIGNAL(clicked(const QModelIndex &)), this, SLOT(playerSelected(const QModelIndex &))); connect(ui->subviewListview, SIGNAL(activated(const QModelIndex &)), this, SLOT(subviewSelected(const QModelIndex &))); connect(ui->subviewListview, SIGNAL(clicked(const QModelIndex &)), this, SLOT(subviewSelected(const QModelIndex &))); connect(ui->aphaMaskBrowseBtn, SIGNAL(clicked()), this, SLOT(alphamaskBrowse())); connect(ui->keyTLx, SIGNAL(valueChanged(int)), this, SLOT(subviewTopLeftXChanged(int))); connect(ui->keyTLy, SIGNAL(valueChanged(int)), this, SLOT(subviewTopLeftYChanged(int))); connect(ui->keyTRx, SIGNAL(valueChanged(int)), this, SLOT(subviewTopRightXChanged(int))); connect(ui->keyTRy, SIGNAL(valueChanged(int)), this, SLOT(subviewTopRightYChanged(int))); connect(ui->keyBLx, SIGNAL(valueChanged(int)), this, SLOT(subviewBottomLeftXChanged(int))); connect(ui->keyBLy, SIGNAL(valueChanged(int)), this, SLOT(subviewBottomLeftYChanged(int))); connect(ui->keyBRx, SIGNAL(valueChanged(int)), this, SLOT(subviewBottomRightXChanged(int))); connect(ui->keyBRy, SIGNAL(valueChanged(int)), this, SLOT(subviewBottomRightYChanged(int))); connect(ui->outputX, SIGNAL(valueChanged(int)), this, SLOT(screenXChanged(int))); connect(ui->outputY, SIGNAL(valueChanged(int)), this, SLOT(screenYChanged(int))); connect(ui->outputWidth, SIGNAL(valueChanged(int)), this, SLOT(screenWChanged(int))); connect(ui->outputHeight, SIGNAL(valueChanged(int)), this, SLOT(screenHChanged(int))); connect(ui->viewportX, SIGNAL(valueChanged(int)), this, SLOT(viewportXChanged(int))); connect(ui->viewportY, SIGNAL(valueChanged(int)), this, SLOT(viewportYChanged(int))); connect(ui->viewportWidth, SIGNAL(valueChanged(int)), this, SLOT(viewportWChanged(int))); connect(ui->viewportHeight, SIGNAL(valueChanged(int)), this, SLOT(viewportHChanged(int))); connect(ui->optIgnoreAR, SIGNAL(toggled(bool)), this, SLOT(ignoreArBoxChanged(bool))); connect(ui->aphaMaskBrowseBtn, SIGNAL(clicked()), this, SLOT(alphamaskBrowse())); connect(ui->alphaMaskFile, SIGNAL(textChanged(QString)), this, SLOT(showAlphaMaskPreview(QString))); connect(ui->brightnessResetBtn, SIGNAL(clicked()), this, SLOT(brightReset())); connect(ui->contrastResetBtn, SIGNAL(clicked()), this, SLOT(contReset())); connect(ui->hueResetBtn, SIGNAL(clicked()), this, SLOT(hueReset())); connect(ui->saturationResetBtn, SIGNAL(clicked()), this, SLOT(satReset())); }
void SMActionVideoNative::go(void) { if (getStatus() != STATUS_PLAY) { _repeated = 0; SMAction::go(); if (!view() || !view()->scene() || !mediaPlayer->isAvailable()) { setStatus(STATUS_ERROR); return; } if (!mediaPlayer->isVideoAvailable()) { setStatus(STATUS_ERROR); connect(mediaPlayer, SIGNAL(videoAvailableChanged(bool)), SLOT(go())); return; } connectPlayer(); view()->scene()->addItem(videoItem); mediaPlayer->play(); } }