code cleanup + change color of timebar
This commit is contained in:
@@ -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){
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user