code cleanup + change color of timebar

This commit is contained in:
2014-12-23 20:47:46 +01:00
parent 04d607e364
commit 417ba5d231
3 changed files with 8 additions and 5 deletions

View File

@@ -116,6 +116,7 @@ WindowRace::WindowRace(DataBase *db, QWidget *parent) :
this->ui->pbTime->setMinimum(0);
this->ui->pbTime->setTextVisible(false);
this->ui->pbTime->setStyleSheet("QProgressBar::chunk { color: #05B8CC;}");
this->ui->pbTime->setValue(0);
}
void WindowRace::prepareNextRace(){
@@ -148,6 +149,9 @@ void WindowRace::prepareNextRace(){
this->ui->pbTime->setStyleSheet("QProgressBar::chunk { color: #05B8CC;}");
this->ui->pbTime->setValue(0);
//countdown
this->ui->lCountdown->setStyleSheet("QLabel { color: black; }");
//Ampel Setup
ui->WAmpel15->hide();
ui->WAmpel25->hide();
@@ -247,8 +251,8 @@ void WindowRace::countdownUpdate(){
if(!paused){
countdownValue -= 1;
if(countdownValue <= 15){
ui->lCountdown->setStyleSheet("QLabel { color: red; }");
this->ui->pbTime->setStyleSheet( "QProgressBar::chunk { background-color: yellow; }");
this->ui->lCountdown->setStyleSheet("QLabel { color: red; }");
this->ui->pbTime->setStyleSheet( "QProgressBar::chunk { background-color: orange; }");
//this->ui->pbTime->
}
if(countdownValue <= -1){