fixed calculation of points

parent 778e7aa7
......@@ -550,13 +550,19 @@ void MainWindow::on_tableWidget_cellChanged(int row, int column)
workedUhf->clear();
QTableWidget *tb = ui->tableWidget;
for (int i = 0; i < tb->rowCount(); ++i) {
QTableWidgetItem *cell8 = tb->item(i, column);
QTableWidgetItem *cell1 = tb->item(i, 1);
QString call = cell8->text();
QString band = cell1->text();
if(call != "" && band == "144" && !workedVhf->contains(call))
QTableWidgetItem *cell8 = tb->item(i, column);
QString call = cell8->text();
QTableWidgetItem *cell13 = tb->item(i, 13);
bool deleted = false;
if(cell13)
deleted = tb->item(i, 13)->checkState();
if(!deleted && call != "" && band == "144" && !workedVhf->contains(call))
*workedVhf << call;
if(call != "" && band == "432" && !workedUhf->contains(call))
if(!deleted && call != "" && band == "432" && !workedUhf->contains(call))
*workedUhf << call;
}
......@@ -579,13 +585,19 @@ void MainWindow::on_tableWidget_cellChanged(int row, int column)
multVhf->clear();
multUhf->clear();
for (int i = 0; i < tb->rowCount(); ++i) {
QTableWidgetItem *cell10 = tb->item(i, column);
QTableWidgetItem *cell1 = tb->item(i, 1);
QString exc = cell10->text();
QString band = cell1->text();
if(exc != "" && band == "144" && !multVhf->contains(exc))
QTableWidgetItem *cell10 = tb->item(i, column);
QString exc = cell10->text();
QTableWidgetItem *cell13 = tb->item(i, 13);
bool deleted = false;
if(cell13)
deleted = tb->item(i, 13)->checkState();
if(!deleted && exc != "" && band == "144" && !multVhf->contains(exc))
*multVhf << exc;
if(exc != "" && band == "432" && !multUhf->contains(exc))
if(!deleted && exc != "" && band == "432" && !multUhf->contains(exc))
*multUhf << exc;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment