18 #include "ui_QmitkNavigationDataPlayerControlWidget.h"
24 m_UpdateTimer(new QTimer(this)),
29 connect(m_UpdateTimer, SIGNAL(timeout()),
this, SLOT(
OnUpdate()));
41 ui->samplePositionHorizontalSlider->setMaximum(player->GetNumberOfSnapshots()-1);
46 m_UpdateTimer->stop();
47 m_Player->StopPlaying();
49 ui->playPushButton->setChecked(
false);
51 this->ResetPlayerDisplay();
56 switch ( m_Player->GetCurrentPlayerState() )
60 m_Player->StartPlaying();
61 if ( ! m_UpdateTimer->isActive() ) { m_UpdateTimer->start(10); }
62 if ( ! ui->playPushButton->isChecked() ) { ui->playPushButton->setChecked(
true); }
88 int msc =
static_cast<int>(m_Player->GetTimeStampSinceStart());
92 msc = (msc - ms) / 1000;
94 int min = (msc-s) / 60;
97 ui->msecLCDNumber->display(ms);
98 ui->secLCDNumber->display(s);
99 ui->minLCDNumber->display(min);
101 ui->samplePositionHorizontalSlider->setValue(static_cast<int>(m_Player->GetCurrentSnapshotNumber()));
107 m_UpdateTimer->stop();
108 ui->playPushButton->setChecked(
false);
114 void QmitkNavigationDataPlayerControlWidget::ResetPlayerDisplay()
117 ui->msecLCDNumber->display(0);
118 ui->secLCDNumber->display(0);
119 ui->minLCDNumber->display(0);
121 ui->samplePositionHorizontalSlider->setValue(0);
itk::SmartPointer< Self > Pointer