kopia lustrzana https://gitlab.com/eliggett/wfview
Don't try to connect to radio we are already connected to
rodzic
647b51449b
commit
22692a6897
|
@ -42,21 +42,29 @@ void selectRadio::setInUse(quint8 radio, quint8 busy, QString user, QString ip)
|
|||
ui->table->setItem(radio, 3, new QTableWidgetItem(user));
|
||||
ui->table->setItem(radio, 4, new QTableWidgetItem(ip));
|
||||
for (int f = 0; f < 5; f++) {
|
||||
if (busy == 1)
|
||||
if (busy == 1)
|
||||
{
|
||||
ui->table->item(radio, f)->setBackground(Qt::darkGreen);
|
||||
else if (busy == 2)
|
||||
}
|
||||
else if (busy == 2)
|
||||
{
|
||||
ui->table->item(radio, f)->setBackground(Qt::red);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->table->item(radio, f)->setBackground(Qt::black);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void selectRadio::on_table_cellClicked(int row, int col) {
|
||||
qInfo() << "Clicked on " << row << "," << col;
|
||||
ui->table->selectRow(row);
|
||||
emit selectedRadio(row);
|
||||
this->setVisible(false);
|
||||
if (ui->table->item(row, col)->backgroundColor() != Qt::darkGreen) {
|
||||
ui->table->selectRow(row);
|
||||
emit selectedRadio(row);
|
||||
this->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue