From 417ba5d2313161ae366b8cc1b4f6ca316b154754 Mon Sep 17 00:00:00 2001 From: Johannes Paehr Date: Tue, 23 Dec 2014 20:47:46 +0100 Subject: [PATCH] code cleanup + change color of timebar --- windowrace.cpp | 8 ++++++-- windowrace.ui | 3 +-- windowrennliste.cpp | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/windowrace.cpp b/windowrace.cpp index 44352d6..9f4da10 100644 --- a/windowrace.cpp +++ b/windowrace.cpp @@ -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){ diff --git a/windowrace.ui b/windowrace.ui index 66d1588..813d0a6 100644 --- a/windowrace.ui +++ b/windowrace.ui @@ -18,8 +18,7 @@ - - + 24 diff --git a/windowrennliste.cpp b/windowrennliste.cpp index f8d9c98..68232a7 100644 --- a/windowrennliste.cpp +++ b/windowrennliste.cpp @@ -92,7 +92,7 @@ vector WindowRennliste::getDriverAndCarId(){ void WindowRennliste::setBesttime(int shell, int dea){ this->ui->tWRennliste->item(this->selectedRow, 2)->setText(QString::number(shell/1000.0)); this->ui->tWRennliste->item(this->selectedRow, 5)->setText(QString::number(dea/1000.0)); - std::cout << this->selectedRow << std::endl; + //std::cout << this->selectedRow << std::endl; } void WindowRennliste::listClick(const QModelIndex & index){