Exemplo n.º 1
0
int TvrUiWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QMainWindow::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: on_actionVolume_triggered(); break;
        case 1: on_actionNew_triggered(); break;
        case 2: on_actionSave_triggered(); break;
        case 3: on_actionSaveAs_triggered(); break;
        case 4: on_actionAbout_triggered(); break;
        case 5: on_actionOpen_triggered(); break;
        case 6: on_actionExit_triggered(); break;
        case 7: on_actionRecord_triggered(); break;
        case 8: on_actionStop_triggered(); break;
        case 9: on_actionPlay_triggered(); break;
        case 10: on_actionPaused_triggered(); break;
        case 11: updateProgressBar(); break;
        default: ;
        }
        _id -= 12;
    }
    return _id;
}
Exemplo n.º 2
0
void MainWindow::on_actionOpen_triggered()
{
    QString filename = QFileDialog::getOpenFileName(this,"Open a File","E:\\","Video File(*.*)");
    on_actionStop_triggered();
    player->setMedia(QUrl::fromLocalFile(filename));
    on_actionPlay_triggered();

}
Exemplo n.º 3
0
void Player::on_actionOpen_triggered()
{
    QString filename = QFileDialog::getOpenFileName(this,"Otworz Plik","","Video File (*.avi;*.mpg;*.mp4)");
    //zatrzymanie filmu
    on_actionStop_triggered();

    play->setMedia(QUrl::fromLocalFile(filename));
    //po uruchomieniu automatycznie zaczyna odtwarzać film
    on_actionPlay_triggered();
}
Exemplo n.º 4
0
void qc::on_actionClose_triggered(){
  QMessageBox messageBox;
  messageBox.setWindowTitle(tr("Closing DS340 driver"));
  messageBox.setText(tr("Quit?"));
  messageBox.setStandardButtons(QMessageBox::Yes|QMessageBox::No);
  messageBox.setDefaultButton(QMessageBox::Yes);
  if(messageBox.exec()==QMessageBox::Yes){
    on_actionStop_triggered();
    on_actionDisconnect_triggered();
    qApp->quit();
  }
}
Exemplo n.º 5
0
void MainWindow::on_actionExit_triggered()
{
    if(m_pServerProcess)
    {
        if(m_pServerProcess->state() == QProcess::Running)
        {
            on_actionStop_triggered();
            m_pServerProcess->waitForFinished();
        }

        if(m_pServerProcess->state() == QProcess::NotRunning)
        {
            closeApplication();
        }
    }
    else
    {
        closeApplication();
    }
}
Exemplo n.º 6
0
void MainWindow::on_stopButton_clicked() {
    on_actionStop_triggered();
}