From 311d5e9c942a98c58ede8af94d45979a6c21541e Mon Sep 17 00:00:00 2001
From: Jake Drahos <j@kedrahos.com>
Date: Sun, 26 Mar 2017 16:40:38 -0500
Subject: [PATCH] Began adding control graph tab

---
 groundStation/gui/MicroCART/MicroCART.pro     |   6 +-
 .../gui/MicroCART/MicroCART.pro.user          |   2 +-
 groundStation/gui/MicroCART/controlworker.cpp |   6 +
 groundStation/gui/MicroCART/controlworker.h   |  23 +++
 groundStation/gui/MicroCART/mainwindow.ui     | 164 ++++++++++++++++--
 5 files changed, 188 insertions(+), 13 deletions(-)
 create mode 100644 groundStation/gui/MicroCART/controlworker.cpp
 create mode 100644 groundStation/gui/MicroCART/controlworker.h

diff --git a/groundStation/gui/MicroCART/MicroCART.pro b/groundStation/gui/MicroCART/MicroCART.pro
index ba492f24e..54734fd0f 100644
--- a/groundStation/gui/MicroCART/MicroCART.pro
+++ b/groundStation/gui/MicroCART/MicroCART.pro
@@ -17,10 +17,12 @@ INCLUDEPATH += ../../src/frontend/
 SOURCES += main.cpp\
         mainwindow.cpp \
     wrappers.c \
-    trackerworker.cpp
+    trackerworker.cpp \
+    controlworker.cpp
 
 HEADERS  += mainwindow.h \
     wrappers.h \
-    trackerworker.h
+    trackerworker.h \
+    controlworker.h
 
 FORMS    += mainwindow.ui
diff --git a/groundStation/gui/MicroCART/MicroCART.pro.user b/groundStation/gui/MicroCART/MicroCART.pro.user
index 64f95e242..03f704131 100644
--- a/groundStation/gui/MicroCART/MicroCART.pro.user
+++ b/groundStation/gui/MicroCART/MicroCART.pro.user
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE QtCreatorProject>
-<!-- Written by QtCreator 3.2.2, 2017-03-06T11:03:28. -->
+<!-- Written by QtCreator 3.2.2, 2017-03-24T14:09:55. -->
 <qtcreator>
  <data>
   <variable>EnvironmentId</variable>
diff --git a/groundStation/gui/MicroCART/controlworker.cpp b/groundStation/gui/MicroCART/controlworker.cpp
new file mode 100644
index 000000000..5c526c77f
--- /dev/null
+++ b/groundStation/gui/MicroCART/controlworker.cpp
@@ -0,0 +1,6 @@
+#include "controlworker.h"
+
+controlworker::controlworker(QObject *parent) :
+    QObject(parent)
+{
+}
diff --git a/groundStation/gui/MicroCART/controlworker.h b/groundStation/gui/MicroCART/controlworker.h
new file mode 100644
index 000000000..4635a1fe7
--- /dev/null
+++ b/groundStation/gui/MicroCART/controlworker.h
@@ -0,0 +1,23 @@
+#ifndef CONTROLWORKER_H
+#define CONTROLWORKER_H
+
+#include <QObject>
+#include "frontend_common.h"
+
+class controlworker : public QObject
+{
+    Q_OBJECT
+public:
+    explicit controlworker(QObject *parent = 0);
+
+signals:
+
+public slots:
+
+
+private:
+    struct backend_conn * conn;
+
+};
+
+#endif // CONTROLWORKER_H
diff --git a/groundStation/gui/MicroCART/mainwindow.ui b/groundStation/gui/MicroCART/mainwindow.ui
index 5fc49d1e9..6aa4020cc 100644
--- a/groundStation/gui/MicroCART/mainwindow.ui
+++ b/groundStation/gui/MicroCART/mainwindow.ui
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>652</width>
-    <height>454</height>
+    <width>798</width>
+    <height>581</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -17,10 +17,10 @@
    <widget class="QTabWidget" name="tabWidget">
     <property name="geometry">
      <rect>
-      <x>10</x>
+      <x>0</x>
       <y>10</y>
-      <width>461</width>
-      <height>341</height>
+      <width>801</width>
+      <height>471</height>
      </rect>
     </property>
     <property name="sizePolicy">
@@ -30,7 +30,7 @@
      </sizepolicy>
     </property>
     <property name="currentIndex">
-     <number>0</number>
+     <number>2</number>
     </property>
     <widget class="QWidget" name="backend">
      <attribute name="title">
@@ -41,8 +41,8 @@
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>451</width>
-        <height>296</height>
+        <width>761</width>
+        <height>341</height>
        </rect>
       </property>
       <layout class="QVBoxLayout" name="verticalLayout">
@@ -50,6 +50,9 @@
         <layout class="QHBoxLayout" name="horizontalLayout">
          <item>
           <widget class="QPushButton" name="pbStart">
+           <property name="enabled">
+            <bool>false</bool>
+           </property>
            <property name="text">
             <string>Start</string>
            </property>
@@ -65,6 +68,19 @@
            </property>
           </widget>
          </item>
+         <item>
+          <spacer name="horizontalSpacer">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>40</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
          <item>
           <widget class="QPushButton" name="pbStop">
            <property name="enabled">
@@ -228,12 +244,140 @@
       </layout>
      </widget>
     </widget>
+    <widget class="QWidget" name="controlGraph">
+     <attribute name="title">
+      <string>Controller Graph</string>
+     </attribute>
+     <widget class="QWidget" name="verticalLayoutWidget_2">
+      <property name="geometry">
+       <rect>
+        <x>9</x>
+        <y>9</y>
+        <width>771</width>
+        <height>421</height>
+       </rect>
+      </property>
+      <layout class="QVBoxLayout" name="verticalLayout_2">
+       <item>
+        <widget class="QLabel" name="graphImage">
+         <property name="text">
+          <string>TextLabel</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer name="verticalSpacer_2">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="Line" name="line">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_6">
+         <item>
+          <widget class="QLabel" name="label">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Fixed" vsizetype="Minimum">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="text">
+            <string>Node:</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QComboBox" name="nodeSelect">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QLabel" name="label_2">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="text">
+            <string>Param:</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QComboBox" name="paramSelect"/>
+         </item>
+         <item>
+          <widget class="QLabel" name="label_3">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="text">
+            <string>Value:</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QLineEdit" name="paramValue">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <widget class="Line" name="line_2">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_5">
+         <item>
+          <widget class="QPushButton" name="pbControlRefresh">
+           <property name="text">
+            <string>Refresh Controller Graph</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </widget>
+    </widget>
    </widget>
    <widget class="QPushButton" name="pbRefresh">
     <property name="geometry">
      <rect>
       <x>10</x>
-      <y>350</y>
+      <y>480</y>
       <width>88</width>
       <height>34</height>
      </rect>
@@ -248,7 +392,7 @@
     <rect>
      <x>0</x>
      <y>0</y>
-     <width>652</width>
+     <width>798</width>
      <height>30</height>
     </rect>
    </property>
-- 
GitLab