Example #1
0
void MainWindow::updatePlayButtons()
{
  SimWorld* world = ui->glWidget->getWorld();
  MarkerData* markerData = world->getMarkerData();

  if (world->isPaused()) {
    ui->playPauseSimButton->setIcon(QIcon(":/icons/data/media-playback-start-3.png"));
    ui->playPauseSimButton->setChecked(false);
  } else {
    ui->playPauseSimButton->setIcon(QIcon(":/icons/data/media-playback-pause-3.png"));
    ui->playPauseSimButton->setChecked(true);
  }
  if (markerData->isPaused()) {
    ui->playPauseDataButton->setIcon(QIcon(":/icons/data/media-playback-start-3.png"));
    ui->playPauseDataButton->setChecked(false);
  } else {
    ui->playPauseDataButton->setIcon(QIcon(":/icons/data/media-playback-pause-3.png"));
    ui->playPauseDataButton->setChecked(true);  }

  if (!(world->isPaused()||markerData->isPaused())) {
    ui->playAllButton->setIcon(QIcon(":/icons/data/media-playback-pause-3.png"));
    ui->playAllButton->setChecked(true);
  } else {
    ui->playAllButton->setIcon(QIcon(":/icons/data/media-playback-start-3.png"));
    ui->playAllButton->setChecked(false);
  }
}
Example #2
0
void MainWindow::playPauseData(bool play)
{
  MarkerData* markerData = ui->glWidget->getWorld()->getMarkerData();
  if (markerData->isPaused() != play) return;
  markerData->setPaused(!play);

  updatePlayButtons();
}