added second part of minimum sector times
This commit is contained in:
@@ -35,6 +35,14 @@ WindowRace::WindowRace(DataBase *db, QWidget *parent) :
|
||||
res = db->getData(statement, 1);
|
||||
this->minimumTime = res[0][0].toInt();
|
||||
|
||||
// fill minSecTimes vector
|
||||
statement = "select minsec1, minsec2, minsec3 from renndauer order by id DESC limit 1";
|
||||
res = db->getData(statement, 3);
|
||||
this->minSecTime.append(res[0][0].toInt());
|
||||
this->minSecTime.append(res[0][1].toInt());
|
||||
this->minSecTime.append(res[0][2].toInt());
|
||||
|
||||
|
||||
firstTimeDea = true;
|
||||
firstTimeShell = true;
|
||||
started = false;
|
||||
@@ -169,11 +177,11 @@ void WindowRace::prepareNextRace(){
|
||||
this->VecDea.clear();
|
||||
|
||||
// clear tableview shell
|
||||
timeModelShell = new TimeModel(VecShell);
|
||||
timeModelShell = new TimeModel(VecShell, minSecTime);
|
||||
ui->lWShellTime->setModel(timeModelShell);
|
||||
|
||||
// clear tableview dea
|
||||
timeModelDea = new TimeModel(VecDea);
|
||||
timeModelDea = new TimeModel(VecDea, minSecTime);
|
||||
ui->lWDeaTime->setModel(timeModelDea);
|
||||
|
||||
this->finished = false;
|
||||
@@ -348,7 +356,7 @@ void WindowRace::shellSlot(int time, int sector){
|
||||
test.append(1);
|
||||
test.append(2);
|
||||
test.append(3);
|
||||
this->timeModelShell = new TimeModel(VecShell, test, this);
|
||||
this->timeModelShell = new TimeModel(VecShell, minSecTime, test, this);
|
||||
// this->ui->lWShellTime->setModel(this->timeModelShell);
|
||||
ui->lWShellTime->setModel(this->timeModelShell);
|
||||
break;
|
||||
@@ -363,7 +371,7 @@ void WindowRace::shellSlot(int time, int sector){
|
||||
test.append(1);
|
||||
test.append(2);
|
||||
test.append(3);
|
||||
this->timeModelShell = new TimeModel(VecShell, test, this);
|
||||
this->timeModelShell = new TimeModel(VecShell, minSecTime, test, this);
|
||||
// timeModelShell = new TimeModel(VecShell, this);
|
||||
this->ui->lWShellTime->setModel(timeModelShell);
|
||||
}
|
||||
@@ -384,7 +392,7 @@ void WindowRace::shellSlot(int time, int sector){
|
||||
test.append(1);
|
||||
test.append(2);
|
||||
test.append(3);
|
||||
this->timeModelShell = new TimeModel(VecShell, test, this);
|
||||
this->timeModelShell = new TimeModel(VecShell, minSecTime, test, this);
|
||||
// timeModelShell = new TimeModel(VecShell, this);
|
||||
this->ui->lWShellTime->setModel(timeModelShell);
|
||||
int zeit = QVectorHelper::getMin(VecShell);
|
||||
@@ -424,7 +432,7 @@ void WindowRace::deaSlot(int time, int sector){
|
||||
VecDea.push_back(QVector<int>());
|
||||
VecDea.last().push_back(time);
|
||||
cout << "Dea Sektor 1" << endl;
|
||||
timeModelDea = new TimeModel(VecDea, this);
|
||||
timeModelDea = new TimeModel(VecDea, minSecTime, this);
|
||||
this->ui->lWDeaTime->setModel(timeModelDea);
|
||||
|
||||
break;
|
||||
@@ -433,7 +441,7 @@ void WindowRace::deaSlot(int time, int sector){
|
||||
if(VecDea.last().size() == 1){
|
||||
cout << time << sector << endl;
|
||||
VecDea[VecDea.size()-1].push_back(time);
|
||||
timeModelDea = new TimeModel(VecDea, this);
|
||||
timeModelDea = new TimeModel(VecDea, minSecTime, this);
|
||||
this->ui->lWDeaTime->setModel(timeModelDea);
|
||||
}
|
||||
else{
|
||||
@@ -453,7 +461,7 @@ void WindowRace::deaSlot(int time, int sector){
|
||||
|
||||
|
||||
|
||||
timeModelDea = new TimeModel(VecDea, this);
|
||||
timeModelDea = new TimeModel(VecDea, minSecTime, this);
|
||||
this->ui->lWDeaTime->setModel(timeModelDea);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user