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){

View File

@@ -18,8 +18,7 @@
<item>
<widget class="QProgressBar" name="pbTime">
<property name="styleSheet">
<string notr="true">
</string>
<string notr="true"/>
</property>
<property name="value">
<number>24</number>

View File

@@ -92,7 +92,7 @@ vector<QString> 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){