Update to reflect api changes and small patch for alternate audio
[groove] / bottombar.cpp
index 8a12aa0..7e7914e 100644 (file)
@@ -1,6 +1,7 @@
 #include "bottombar.h"
 #include "ui_bottombar.h"
 
+
 bottomBar::bottomBar(QWidget *parent) :
     QWidget(parent),
     ui(new Ui::bottomBar)
@@ -14,16 +15,25 @@ bottomBar::bottomBar(QWidget *parent) :
     main->setBackgroundBrush(this->palette().window());
     main->setSceneRect(0,0,screenGeometry.width(),15);
     this->playbackProgress = main->addRect(0,0,screenGeometry.width()/2,15,QPen(Qt::white),QBrush(Qt::white));
+#ifndef Q_WS_MAEMO_5
+    ui->stopButton->setIcon(QIcon::fromTheme("media-playback-stop"));
+    ui->pauseB->setIcon(QIcon::fromTheme("media-playback-pause"));
+    ui->nextB->setIcon(QIcon::fromTheme("media-skip-forward"));
+    ui->backB->setIcon(QIcon::fromTheme("media-skip-backward"));
+    ui->settingsB->setIcon(QIcon::fromTheme("document-properties"));
+
+#endif
 }
 
 bottomBar::~bottomBar()
 {
     delete ui;
 }
-void bottomBar::setPlaybackProgress(int min, int max)
+void bottomBar::setPlaybackProgress(qint64 min,qint64 max)
 {
-    this->playbackProgress->setRect(0,0,(min/max)*main->width(),15);
-    ui->graphicsView->update();
+
+    this->playbackProgress->setRect(0,0,((float)min/(float)max)*QApplication::desktop()->screenGeometry().width(),15);
+    //ui->graphicsView->update();
 }
 
 void bottomBar::on_nextB_clicked()