2 #include "ui_bottombar.h"
4 bottomBar::bottomBar(QWidget *parent) :
9 QRect screenGeometry = QApplication::desktop()->screenGeometry();
10 main = new QGraphicsScene(0,0,screenGeometry.width(),15);
11 ui->graphicsView->setScene(main);
12 ui->graphicsView->setSceneRect(0,0,screenGeometry.width(),15);
13 ui->graphicsView->setTransformationAnchor(QGraphicsView::NoAnchor);
14 main->setBackgroundBrush(this->palette().window());
15 main->setSceneRect(0,0,screenGeometry.width(),15);
16 this->playbackProgress = main->addRect(0,0,screenGeometry.width()/2,15,QPen(Qt::white),QBrush(Qt::white));
19 bottomBar::~bottomBar()
23 void bottomBar::setPlaybackProgress(int min, int max)
25 this->playbackProgress->setRect(0,0,(min/max)*main->width(),15);
26 ui->graphicsView->update();
29 void bottomBar::on_nextB_clicked()
33 void bottomBar::on_pauseB_clicked()
38 void bottomBar::on_addButton_clicked()
42 void bottomBar::on_backB_clicked()
47 void bottomBar::changeEvent(QEvent *e)
49 QWidget::changeEvent(e);
51 case QEvent::LanguageChange:
52 ui->retranslateUi(this);