|
|
@ -132,8 +132,22 @@ void MainWindow::moveEvent(QMoveEvent *)
|
|
|
|
moveResizeTimer->start(1000);
|
|
|
|
moveResizeTimer->start(1000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::onVolSliderValueChanged(int value)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
int volume;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
volume = (value * 0xffff) / 100;
|
|
|
|
|
|
|
|
if (interface != 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
interface->setVolume(volume);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
qDebug() << "vol = " << volume;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::setupUI()
|
|
|
|
void MainWindow::setupUI()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
this->setWindowTitle("vrplayer");
|
|
|
|
|
|
|
|
|
|
|
|
/* setup area to display video */
|
|
|
|
/* setup area to display video */
|
|
|
|
lblVideo = new QLabel();
|
|
|
|
lblVideo = new QLabel();
|
|
|
|
lblVideo->setMinimumWidth(320);
|
|
|
|
lblVideo->setMinimumWidth(320);
|
|
|
@ -198,10 +212,26 @@ void MainWindow::setupUI()
|
|
|
|
connect(btnRewind, SIGNAL(clicked(bool)),
|
|
|
|
connect(btnRewind, SIGNAL(clicked(bool)),
|
|
|
|
this, SLOT(onBtnRewindClicked(bool)));
|
|
|
|
this, SLOT(onBtnRewindClicked(bool)));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* setup volume control slider */
|
|
|
|
|
|
|
|
volSlider = new QSlider();
|
|
|
|
|
|
|
|
volSlider->setOrientation(Qt::Horizontal);
|
|
|
|
|
|
|
|
volSlider->setMinimumWidth(100);
|
|
|
|
|
|
|
|
volSlider->setMaximumWidth(100);
|
|
|
|
|
|
|
|
volSlider->setMinimum(0);
|
|
|
|
|
|
|
|
volSlider->setMaximum(100);
|
|
|
|
|
|
|
|
volSlider->setValue(20);
|
|
|
|
|
|
|
|
volSlider->setTickPosition(QSlider::TicksAbove);
|
|
|
|
|
|
|
|
volSlider->setTickInterval(10);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
connect(volSlider, SIGNAL(valueChanged(int)),
|
|
|
|
|
|
|
|
this, SLOT(onVolSliderValueChanged(int)));
|
|
|
|
|
|
|
|
|
|
|
|
/* add buttons to bottom panel */
|
|
|
|
/* add buttons to bottom panel */
|
|
|
|
hboxLayoutBottom = new QHBoxLayout;
|
|
|
|
hboxLayoutBottom = new QHBoxLayout;
|
|
|
|
hboxLayoutBottom->addWidget(btnPlay);
|
|
|
|
hboxLayoutBottom->addWidget(btnPlay);
|
|
|
|
hboxLayoutBottom->addWidget(btnStop);
|
|
|
|
hboxLayoutBottom->addWidget(btnStop);
|
|
|
|
|
|
|
|
hboxLayoutBottom->addWidget(volSlider);
|
|
|
|
|
|
|
|
|
|
|
|
//hboxLayoutBottom->addWidget(btnRewind);
|
|
|
|
//hboxLayoutBottom->addWidget(btnRewind);
|
|
|
|
hboxLayoutBottom->addStretch();
|
|
|
|
hboxLayoutBottom->addStretch();
|
|
|
|
|
|
|
|
|
|
|
@ -482,14 +512,21 @@ void MainWindow::onMoveCompleted()
|
|
|
|
|
|
|
|
|
|
|
|
interface->setVcrOp(VCR_PLAY);
|
|
|
|
interface->setVcrOp(VCR_PLAY);
|
|
|
|
vcrFlag = VCR_PLAY;
|
|
|
|
vcrFlag = VCR_PLAY;
|
|
|
|
|
|
|
|
moveResizeTimer->stop();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::on_actionAbout_triggered()
|
|
|
|
void MainWindow::on_actionAbout_triggered()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
QMessageBox msgBox;
|
|
|
|
QMessageBox msgBox;
|
|
|
|
|
|
|
|
|
|
|
|
msgBox.setText("VRPlayer version 1.2");
|
|
|
|
msgBox.setText("VRPlayer version 1.2");
|
|
|
|
msgBox.setStandardButtons(QMessageBox::Ok);
|
|
|
|
msgBox.setStandardButtons(QMessageBox::Ok);
|
|
|
|
msgBox.setDefaultButton(QMessageBox::Ok);
|
|
|
|
msgBox.setDefaultButton(QMessageBox::Ok);
|
|
|
|
msgBox.exec();
|
|
|
|
msgBox.exec();
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
DlgAbout *dlgabt = new DlgAbout(this);
|
|
|
|
|
|
|
|
dlgabt->exec();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|