2 #include "ui_bottombar.h"
5 bottomBar::bottomBar(QWidget *parent) :
10 QRect screenGeometry = QApplication::desktop()->screenGeometry();
11 main = new QGraphicsScene(0,0,screenGeometry.width(),15);
12 ui->graphicsView->setScene(main);
13 ui->graphicsView->setSceneRect(0,0,screenGeometry.width(),15);
14 ui->graphicsView->setTransformationAnchor(QGraphicsView::NoAnchor);
15 main->setBackgroundBrush(this->palette().window());
16 main->setSceneRect(0,0,screenGeometry.width(),15);
17 this->playbackProgress = main->addRect(0,0,screenGeometry.width()/2,15,QPen(Qt::white),QBrush(Qt::white));
20 bottomBar::~bottomBar()
24 void bottomBar::setPlaybackProgress(qint64 min,qint64 max)
27 this->playbackProgress->setRect(0,0,((float)min/(float)max)*QApplication::desktop()->screenGeometry().width(),15);
28 //ui->graphicsView->update();
31 void bottomBar::on_nextB_clicked()
35 void bottomBar::on_pauseB_clicked()
40 void bottomBar::on_addButton_clicked()
44 void bottomBar::on_backB_clicked()
49 void bottomBar::changeEvent(QEvent *e)
51 QWidget::changeEvent(e);
53 case QEvent::LanguageChange:
54 ui->retranslateUi(this);