summaryrefslogtreecommitdiffstats
path: root/vrplayer/mainwindow.cpp
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2013-07-19 17:38:36 -0700
committerJay Sorg <jay.sorg@gmail.com>2013-07-19 17:38:36 -0700
commitdef3ba8d6a2a216028e0da963e31079907a3dd24 (patch)
treec433213dfa912544390fc08057471786c5e3756e /vrplayer/mainwindow.cpp
parentc41bced4dfb1ddca86f0e7026e04dec6129ad038 (diff)
downloadxrdp-proprietary-def3ba8d6a2a216028e0da963e31079907a3dd24.tar.gz
xrdp-proprietary-def3ba8d6a2a216028e0da963e31079907a3dd24.zip
vrplayer: added volume, fix some useability issues
Diffstat (limited to 'vrplayer/mainwindow.cpp')
-rw-r--r--vrplayer/mainwindow.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/vrplayer/mainwindow.cpp b/vrplayer/mainwindow.cpp
index 4c8ea2b1..1782f710 100644
--- a/vrplayer/mainwindow.cpp
+++ b/vrplayer/mainwindow.cpp
@@ -132,8 +132,22 @@ void MainWindow::moveEvent(QMoveEvent *)
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()
{
+ this->setWindowTitle("vrplayer");
+
/* setup area to display video */
lblVideo = new QLabel();
lblVideo->setMinimumWidth(320);
@@ -198,10 +212,26 @@ void MainWindow::setupUI()
connect(btnRewind, SIGNAL(clicked(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 */
hboxLayoutBottom = new QHBoxLayout;
hboxLayoutBottom->addWidget(btnPlay);
hboxLayoutBottom->addWidget(btnStop);
+ hboxLayoutBottom->addWidget(volSlider);
+
//hboxLayoutBottom->addWidget(btnRewind);
hboxLayoutBottom->addStretch();
@@ -482,14 +512,21 @@ void MainWindow::onMoveCompleted()
interface->setVcrOp(VCR_PLAY);
vcrFlag = VCR_PLAY;
+ moveResizeTimer->stop();
}
void MainWindow::on_actionAbout_triggered()
{
+#if 0
QMessageBox msgBox;
msgBox.setText("VRPlayer version 1.2");
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setDefaultButton(QMessageBox::Ok);
msgBox.exec();
+#else
+ DlgAbout *dlgabt = new DlgAbout(this);
+ dlgabt->exec();
+
+#endif
}