From d39dc838a0311aa533b67fc9b57ee68e06086634 Mon Sep 17 00:00:00 2001
From: Jake <j@kedrahos.com>
Date: Tue, 11 Apr 2017 17:24:39 -0500
Subject: [PATCH] Made idiot lights work

---
 groundStation/gui/MicroCART/mainwindow.cpp | 11 ++++++++---
 groundStation/gui/MicroCART/mainwindow.ui  |  7 +++++++
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/groundStation/gui/MicroCART/mainwindow.cpp b/groundStation/gui/MicroCART/mainwindow.cpp
index d75a5a0d1..8eed5261f 100644
--- a/groundStation/gui/MicroCART/mainwindow.cpp
+++ b/groundStation/gui/MicroCART/mainwindow.cpp
@@ -25,6 +25,9 @@ MainWindow::MainWindow(QWidget *parent) :
     /* Set up environment variables */
     findChild<QLineEdit *>("socketPath")->setText(QProcessEnvironment::systemEnvironment().value("UCART_SOCKET"));
 
+    /* Idiot lights */
+    findChild<QLabel *>("noGraphWarning1")->setStyleSheet("QLabel {color : red; }");
+
     /* Create a thread for workers */
     QThread* workerThread = new QThread(this);
 
@@ -155,10 +158,12 @@ void MainWindow::on_chooseBackend_clicked()
 void MainWindow::newNodes(QStringList blocks)
 {
     QComboBox * select = findChild<QComboBox *>("nodeSelect");
-    select->clear(); /* Hopefully this clears the list */
+    select->clear();
     select->addItems(blocks);
-    this->findChild<QLabel *>("noGraphWarning1")->setEnabled(true);
-    this->findChild<QLabel *>("noGraphWarning2")->setEnabled(true);
+
+    this->findChild<QLabel *>("noGraphWarning1")->setVisible(false);
+    this->findChild<QLabel *>("noGraphWarning2")->setVisible(false);
+    this->findChild<QWidget *>("noGraphWarningLine")->setVisible(false);
 }
 
 
diff --git a/groundStation/gui/MicroCART/mainwindow.ui b/groundStation/gui/MicroCART/mainwindow.ui
index 6d5468118..2931a125f 100644
--- a/groundStation/gui/MicroCART/mainwindow.ui
+++ b/groundStation/gui/MicroCART/mainwindow.ui
@@ -329,6 +329,13 @@
           </property>
          </widget>
         </item>
+        <item>
+         <widget class="Line" name="noGraphWarningLine">
+          <property name="orientation">
+           <enum>Qt::Horizontal</enum>
+          </property>
+         </widget>
+        </item>
         <item>
          <layout class="QHBoxLayout" name="horizontalLayout_3">
           <item>
-- 
GitLab