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