X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=bottombar.cpp;h=a5a5b960b810fb1bf42eda9c484af41be15b8e32;hb=eda4383dc1a3011c4c70801cb7ca1692b613141f;hp=9ae4ea58b6091292cea69b2739ba2e348860c4c9;hpb=59ffc920954b530fd1b867f5edf9d5d910510636;p=groove diff --git a/bottombar.cpp b/bottombar.cpp index 9ae4ea5..a5a5b96 100644 --- a/bottombar.cpp +++ b/bottombar.cpp @@ -1,21 +1,50 @@ #include "bottombar.h" #include "ui_bottombar.h" + bottomBar::bottomBar(QWidget *parent) : QWidget(parent), ui(new Ui::bottomBar) { ui->setupUi(this); + QRect screenGeometry = QApplication::desktop()->screenGeometry(); + main = new QGraphicsScene(0,0,screenGeometry.width(),15); + ui->graphicsView->setScene(main); + ui->graphicsView->setSceneRect(0,0,screenGeometry.width(),15); + ui->graphicsView->setTransformationAnchor(QGraphicsView::NoAnchor); + 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)); } bottomBar::~bottomBar() { delete ui; } +void bottomBar::setPlaybackProgress(qint64 min,qint64 max) +{ + + this->playbackProgress->setRect(0,0,((float)min/(float)max)*QApplication::desktop()->screenGeometry().width(),15); + //ui->graphicsView->update(); +} + +void bottomBar::on_nextB_clicked() +{ + emit this->nextB(); +} +void bottomBar::on_pauseB_clicked() +{ + emit this->pause(); +} + void bottomBar::on_addButton_clicked() { emit this->addB(); } +void bottomBar::on_backB_clicked() +{ + emit this->back(); +} void bottomBar::changeEvent(QEvent *e) {