Corretta logica colorazione etichette stato nodi ROS
This commit is contained in:
@@ -95,13 +95,13 @@ void RoboGlue_GUI::on_commonStatusChange() {
|
||||
this->ui->lbl_follower->setText(QString().fromStdString(this->m->comSettings.nodeNames.find("follower")->second+": "+std::to_string(static_cast<uint>(m->commonStatus.followerTime))));
|
||||
this->ui->lbl_recorder->setText(QString().fromStdString(this->m->comSettings.nodeNames.find("recorder")->second+": "+std::to_string(static_cast<uint>(m->commonStatus.recorderTime))));
|
||||
this->ui->lbl_broadcaster->setText(QString().fromStdString(this->m->comSettings.nodeNames.find("broadcaster")->second+": "+std::to_string(static_cast<uint>(m->commonStatus.broadcasterTime))));
|
||||
if (m->commonStatus.relayRunning) this->ui->lbl_relay->setStyleSheet("QLabel { background-color : red; color : white; }");
|
||||
if (!m->commonStatus.relayRunning) this->ui->lbl_relay->setStyleSheet("QLabel { background-color : red; color : white; }");
|
||||
else this->ui->lbl_relay->setStyleSheet("QLabel { background-color : green; color : white; }");
|
||||
if (m->commonStatus.recorderRunning) this->ui->lbl_recorder->setStyleSheet("QLabel { background-color : red; color : white; }");
|
||||
if (!m->commonStatus.recorderRunning) this->ui->lbl_recorder->setStyleSheet("QLabel { background-color : red; color : white; }");
|
||||
else this->ui->lbl_recorder->setStyleSheet("QLabel { background-color : green; color : white; }");
|
||||
if (m->commonStatus.followerRunning) this->ui->lbl_follower->setStyleSheet("QLabel { background-color : red; color : white; }");
|
||||
if (!m->commonStatus.followerRunning) this->ui->lbl_follower->setStyleSheet("QLabel { background-color : red; color : white; }");
|
||||
else this->ui->lbl_follower->setStyleSheet("QLabel { background-color : green; color : white; }");
|
||||
if (m->commonStatus.broadcasterRunning) this->ui->lbl_broadcaster->setStyleSheet("QLabel { background-color : red; color : white; }");
|
||||
if (!m->commonStatus.broadcasterRunning) this->ui->lbl_broadcaster->setStyleSheet("QLabel { background-color : red; color : white; }");
|
||||
else this->ui->lbl_broadcaster->setStyleSheet("QLabel { background-color : green; color : white; }");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user