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));
19 ui->stopButton->setIcon(QIcon::fromTheme("media-playback-stop"));
20 ui->pauseB->setIcon(QIcon::fromTheme("media-playback-pause"));
21 ui->nextB->setIcon(QIcon::fromTheme("media-skip-forward"));
22 ui->backB->setIcon(QIcon::fromTheme("media-skip-backward"));
23 ui->settingsB->setIcon(QIcon::fromTheme("document-properties"));
28 bottomBar::~bottomBar()
32 void bottomBar::setPlaybackProgress(qint64 min,qint64 max)
35 this->playbackProgress->setRect(0,0,((float)min/(float)max)*QApplication::desktop()->screenGeometry().width(),15);
36 //ui->graphicsView->update();
39 void bottomBar::on_nextB_clicked()
43 void bottomBar::on_pauseB_clicked()
48 void bottomBar::on_addButton_clicked()
52 void bottomBar::on_backB_clicked()
57 void bottomBar::changeEvent(QEvent *e)
59 QWidget::changeEvent(e);
61 case QEvent::LanguageChange:
62 ui->retranslateUi(this);