]> git.defcon.no Git - rctxduino/commitdiff
Added some code for the controllers testing tool. The code is still not functional.
authorHans Åge Martinsen <hamartin@moshwire.com>
Sat, 10 Sep 2011 00:05:49 +0000 (02:05 +0200)
committerHans Åge Martinsen <hamartin@moshwire.com>
Sat, 10 Sep 2011 00:05:49 +0000 (02:05 +0200)
tools/jstt/jstt.cpp
tools/jstt/jstt.h
tools/jstt/jstt.ui
tools/jstt/moc_jstt.cpp
tools/jstt/ui_jstt.h

index 5698a1adbdf4a4010d19d572aa7544cfbf0db827..4e197db831608a5d9ae01e8d223a97ef23c5ab91 100644 (file)
@@ -5,31 +5,79 @@ jstt::jstt(QWidget *parent) :
     QMainWindow(parent),
     ui(new Ui::jstt)
 {
     QMainWindow(parent),
     ui(new Ui::jstt)
 {
-    int i;
-
     ui->setupUi(this);
 
     ui->setupUi(this);
 
-    if( SDL_Init(SDL_INIT_JOYSTICK) == 0 ) {
-        for(i = 0; i < SDL_NumJoysticks(); i++) {
-            this->jsNames.append(SDL_JoystickName(i));
-        }
-        ui->Joysticks->addItems(this->jsNames);
-    }
+    this->joystick = NULL;
+    this->init();
 }
 
 jstt::~jstt()
 {
     delete ui;
 }
 
 jstt::~jstt()
 {
     delete ui;
+
+    if( jsIsOpen() ) jsClose();
+
+    SDL_Quit();
+}
+
+void jstt::init()
+{
+    QStringList jsNames;
+
+    if( SDL_Init(SDL_INIT_JOYSTICK) == 0 ) {
+
+        for(int i = 0; i < SDL_NumJoysticks(); i++) {
+            jsNames.append(SDL_JoystickName(i));
+        }
+        connect(&jsPullTimer, SIGNAL(timeout()), this, SLOT(processJs()));
+
+        ui->Joysticks->addItems(jsNames);
+        ui->Joysticks->setCurrentIndex(0);          // This will trigger on_Joysticks_currentIndexChanged(int)
+    }
 }
 
 }
 
-void jstt::changeEvent(QEvent *e)
+void jstt::jsOpen(int js)
 {
 {
-    QMainWindow::changeEvent(e);
-    switch (e->type()) {
-    case QEvent::LanguageChange:
-        ui->retranslateUi(this);
-        break;
-    default:
-        break;
+    if( jsIsOpen() ) jsClose();
+
+    joystick = SDL_JoystickOpen(js);
+    if( joystick ) {
+        jsPullTimer.start(eventTimeout);
+        /*
+
+        TODO:
+
+        numAxes = SDL_JoystickNumAxes(joystick);
+        numButtons = SDL_JoystickNumButtons(joystick);
+        numHats = SDL_JoystickNumHats(joystick);
+        numTrackballs = SDL_JoystickNumBalls(joystick);
+        JoystickTimer.start(eventTimeout);
+
+        When we have found out how many axes, buttons etc, we can expand the GUI further
+        */
+        return;
+    } else {
+        /*
+          One should make sure the program will react on this situation instead of just
+          returning.
+          */
+        return;
     }
 }
     }
 }
+
+void jstt::jsClose()
+{
+    this->jsPullTimer.stop();
+    if( joystick ) SDL_JoystickClose(joystick);
+    joystick = NULL;
+}
+
+void jstt::processJs()
+{
+    ui->Chan_1_bar->setValue(30);
+}
+
+void jstt::on_Joysticks_currentIndexChanged(int index)
+{
+    this->jsOpen(index);
+}
index dd3c478775d88489a9edf6b1d78b88bb11cfe570..c2123e5a44bb26473634832f77a2f297ff06d2b0 100644 (file)
@@ -4,6 +4,9 @@
 #include <QMainWindow>
 #include <QStringList>
 #include <SDL/SDL.h>
 #include <QMainWindow>
 #include <QStringList>
 #include <SDL/SDL.h>
+#include <QTimer>
+
+#define eventTimeout 1
 
 namespace Ui {
     class jstt;
 
 namespace Ui {
     class jstt;
@@ -16,12 +19,19 @@ public:
     ~jstt();
 
 protected:
     ~jstt();
 
 protected:
-    void changeEvent(QEvent *e);
+    void init();
+    void jsOpen(int js);
+    void jsClose();
+    void processJs();
+    bool jsIsOpen() { return joystick != NULL; }
 
 private:
     Ui::jstt *ui;
 
 private:
     Ui::jstt *ui;
+    SDL_Joystick *joystick;
+    QTimer jsPullTimer;
 
 
-    QStringList jsNames;
+private slots:
+    void on_Joysticks_currentIndexChanged(int index);
 };
 
 #endif // JSTT_H
 };
 
 #endif // JSTT_H
index 599d2324df66e5f842487a4ce99a11d18f3ac0f4..b9a6a0788ba568f289abc4a9a41400b52e46a091 100644 (file)
    <rect>
     <x>0</x>
     <y>0</y>
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>350</width>
-    <height>344</height>
+    <width>354</width>
+    <height>457</height>
    </rect>
   </property>
   <property name="windowTitle">
    <string>jstt</string>
   </property>
   <widget class="QWidget" name="centralWidget">
    </rect>
   </property>
   <property name="windowTitle">
    <string>jstt</string>
   </property>
   <widget class="QWidget" name="centralWidget">
-   <widget class="QWidget" name="horizontalLayoutWidget">
-    <property name="geometry">
-     <rect>
-      <x>10</x>
-      <y>180</y>
-      <width>331</width>
-      <height>31</height>
-     </rect>
-    </property>
-    <layout class="QHBoxLayout" name="horizontalLayout">
-     <item>
-      <widget class="QLabel" name="label_4">
-       <property name="text">
-        <string>TextLabel</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QLabel" name="label_3">
-       <property name="text">
-        <string>TextLabel</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QLabel" name="label_2">
-       <property name="text">
-        <string>TextLabel</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QLabel" name="label">
-       <property name="text">
-        <string>TextLabel</string>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </widget>
-   <widget class="QWidget" name="horizontalLayoutWidget_2">
+   <widget class="QWidget" name="verticalLayoutWidget_2">
     <property name="geometry">
      <rect>
       <x>10</x>
       <y>10</y>
       <width>331</width>
     <property name="geometry">
      <rect>
       <x>10</x>
       <y>10</y>
       <width>331</width>
-      <height>161</height>
+      <height>381</height>
      </rect>
     </property>
      </rect>
     </property>
-    <layout class="QHBoxLayout" name="horizontalLayout_2">
-     <item>
-      <spacer name="horizontalSpacer_4">
-       <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="QProgressBar" name="Akse_1">
-       <property name="value">
-        <number>24</number>
-       </property>
-       <property name="orientation">
-        <enum>Qt::Vertical</enum>
-       </property>
-       <property name="format">
-        <string/>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <spacer name="horizontalSpacer">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>50</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
+    <layout class="QVBoxLayout" name="Std_channels">
      <item>
      <item>
-      <widget class="QProgressBar" name="Akse_2">
-       <property name="value">
-        <number>24</number>
-       </property>
-       <property name="orientation">
-        <enum>Qt::Vertical</enum>
-       </property>
-       <property name="format">
-        <string/>
-       </property>
-      </widget>
+      <layout class="QHBoxLayout" name="Aimboards">
+       <item>
+        <spacer name="horizontalSpacer_8">
+         <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="QGraphicsView" name="Aimboard_ch_12">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+           <horstretch>110</horstretch>
+           <verstretch>110</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>110</width>
+           <height>110</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>110</width>
+           <height>110</height>
+          </size>
+         </property>
+         <property name="baseSize">
+          <size>
+           <width>110</width>
+           <height>110</height>
+          </size>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer name="horizontalSpacer_6">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>46</width>
+           <height>0</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QGraphicsView" name="Aimboard_ch_34">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+           <horstretch>110</horstretch>
+           <verstretch>110</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>110</width>
+           <height>110</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>110</width>
+           <height>110</height>
+          </size>
+         </property>
+         <property name="baseSize">
+          <size>
+           <width>110</width>
+           <height>110</height>
+          </size>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer name="horizontalSpacer_7">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>40</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
      </item>
      <item>
      </item>
      <item>
-      <spacer name="horizontalSpacer_2">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>50</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
+      <layout class="QHBoxLayout" name="Channel_bars">
+       <item>
+        <spacer name="horizontalSpacer_4">
+         <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="QProgressBar" name="Chan_1_bar">
+         <property name="value">
+          <number>24</number>
+         </property>
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="format">
+          <string/>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer name="horizontalSpacer">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>50</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QProgressBar" name="Chan_2_bar">
+         <property name="value">
+          <number>24</number>
+         </property>
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="format">
+          <string/>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer name="horizontalSpacer_2">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>50</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QProgressBar" name="Chan_3_bar">
+         <property name="value">
+          <number>24</number>
+         </property>
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="format">
+          <string/>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer name="horizontalSpacer_3">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>50</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QProgressBar" name="Chan_4_bar">
+         <property name="value">
+          <number>24</number>
+         </property>
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="format">
+          <string/>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer name="horizontalSpacer_5">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>40</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
      </item>
      <item>
      </item>
      <item>
-      <widget class="QProgressBar" name="Akse_3">
-       <property name="value">
-        <number>24</number>
-       </property>
-       <property name="orientation">
-        <enum>Qt::Vertical</enum>
-       </property>
-       <property name="format">
-        <string/>
-       </property>
-      </widget>
+      <layout class="QHBoxLayout" name="Channel_values">
+       <item>
+        <widget class="QLabel" name="Chan_1_val">
+         <property name="text">
+          <string>TextLabel</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="Chan_2_val">
+         <property name="text">
+          <string>TextLabel</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="Chan_3_val">
+         <property name="text">
+          <string>TextLabel</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="Chan_4_val">
+         <property name="text">
+          <string>TextLabel</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
      </item>
      <item>
      </item>
      <item>
-      <spacer name="horizontalSpacer_3">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>50</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QProgressBar" name="Akse_0">
-       <property name="value">
-        <number>24</number>
-       </property>
-       <property name="orientation">
-        <enum>Qt::Vertical</enum>
-       </property>
-       <property name="format">
-        <string/>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <spacer name="horizontalSpacer_5">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>40</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
+      <layout class="QVBoxLayout" name="Comboboxes">
+       <item>
+        <widget class="QComboBox" name="Joysticks"/>
+       </item>
+       <item>
+        <widget class="QComboBox" name="Mode_menu">
+         <item>
+          <property name="text">
+           <string>Mode 1</string>
+          </property>
+         </item>
+         <item>
+          <property name="text">
+           <string>Mode 2</string>
+          </property>
+         </item>
+         <item>
+          <property name="text">
+           <string>Mode 3</string>
+          </property>
+         </item>
+         <item>
+          <property name="text">
+           <string>Mode 4</string>
+          </property>
+         </item>
+        </widget>
+       </item>
+      </layout>
      </item>
     </layout>
    </widget>
      </item>
     </layout>
    </widget>
-   <widget class="QComboBox" name="Joysticks">
-    <property name="geometry">
-     <rect>
-      <x>10</x>
-      <y>220</y>
-      <width>331</width>
-      <height>27</height>
-     </rect>
-    </property>
-   </widget>
-   <widget class="QComboBox" name="Joysticks_2">
-    <property name="geometry">
-     <rect>
-      <x>10</x>
-      <y>250</y>
-      <width>331</width>
-      <height>27</height>
-     </rect>
-    </property>
-    <item>
-     <property name="text">
-      <string>Mode 1</string>
-     </property>
-    </item>
-    <item>
-     <property name="text">
-      <string>Mode 2</string>
-     </property>
-    </item>
-    <item>
-     <property name="text">
-      <string>Mode 3</string>
-     </property>
-    </item>
-    <item>
-     <property name="text">
-      <string>Mode 4</string>
-     </property>
-    </item>
-   </widget>
+   <zorder>verticalLayoutWidget_2</zorder>
+   <zorder>Chan_2_val</zorder>
   </widget>
   </widget>
+  <widget class="QToolBar" name="mainToolBar">
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+  </widget>
+  <widget class="QStatusBar" name="statusBar"/>
   <widget class="QMenuBar" name="menuBar">
    <property name="geometry">
     <rect>
      <x>0</x>
      <y>0</y>
   <widget class="QMenuBar" name="menuBar">
    <property name="geometry">
     <rect>
      <x>0</x>
      <y>0</y>
-     <width>350</width>
+     <width>354</width>
      <height>25</height>
     </rect>
    </property>
      <height>25</height>
     </rect>
    </property>
    </widget>
    <addaction name="menuFile"/>
   </widget>
    </widget>
    <addaction name="menuFile"/>
   </widget>
-  <widget class="QToolBar" name="mainToolBar">
-   <attribute name="toolBarArea">
-    <enum>TopToolBarArea</enum>
-   </attribute>
-   <attribute name="toolBarBreak">
-    <bool>false</bool>
-   </attribute>
-  </widget>
-  <widget class="QStatusBar" name="statusBar"/>
   <action name="actionAbout">
    <property name="text">
     <string>About</string>
   <action name="actionAbout">
    <property name="text">
     <string>About</string>
    <property name="text">
     <string>Quit</string>
    </property>
    <property name="text">
     <string>Quit</string>
    </property>
+   <property name="shortcutContext">
+    <enum>Qt::WindowShortcut</enum>
+   </property>
   </action>
  </widget>
  <layoutdefault spacing="6" margin="11"/>
   </action>
  </widget>
  <layoutdefault spacing="6" margin="11"/>
index 7c1fb2fe8723eefd1c6159cf1cdccaa916c224e8..eff15f47622a70ce6226fa1a67eeedf714b67d28 100644 (file)
@@ -1,7 +1,7 @@
 /****************************************************************************
 ** Meta object code from reading C++ file 'jstt.h'
 **
 /****************************************************************************
 ** Meta object code from reading C++ file 'jstt.h'
 **
-** Created: Mon Sep 5 22:51:54 2011
+** Created: Sat Sep 10 02:03:53 2011
 **      by: The Qt Meta Object Compiler version 62 (Qt 4.6.3)
 **
 ** WARNING! All changes made in this file will be lost!
 **      by: The Qt Meta Object Compiler version 62 (Qt 4.6.3)
 **
 ** WARNING! All changes made in this file will be lost!
@@ -23,18 +23,21 @@ static const uint qt_meta_data_jstt[] = {
        4,       // revision
        0,       // classname
        0,    0, // classinfo
        4,       // revision
        0,       // classname
        0,    0, // classinfo
-       0,    0, // methods
+       1,   14, // methods
        0,    0, // properties
        0,    0, // enums/sets
        0,    0, // constructors
        0,       // flags
        0,       // signalCount
 
        0,    0, // properties
        0,    0, // enums/sets
        0,    0, // constructors
        0,       // flags
        0,       // signalCount
 
+ // slots: signature, parameters, type, tag, flags
+      12,    6,    5,    5, 0x08,
+
        0        // eod
 };
 
 static const char qt_meta_stringdata_jstt[] = {
        0        // eod
 };
 
 static const char qt_meta_stringdata_jstt[] = {
-    "jstt\0"
+    "jstt\0\0index\0on_Joysticks_currentIndexChanged(int)\0"
 };
 
 const QMetaObject jstt::staticMetaObject = {
 };
 
 const QMetaObject jstt::staticMetaObject = {
@@ -64,6 +67,13 @@ int jstt::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
     _id = QMainWindow::qt_metacall(_c, _id, _a);
     if (_id < 0)
         return _id;
     _id = QMainWindow::qt_metacall(_c, _id, _a);
     if (_id < 0)
         return _id;
+    if (_c == QMetaObject::InvokeMetaMethod) {
+        switch (_id) {
+        case 0: on_Joysticks_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
+        default: ;
+        }
+        _id -= 1;
+    }
     return _id;
 }
 QT_END_MOC_NAMESPACE
     return _id;
 }
 QT_END_MOC_NAMESPACE
index a5e3dc9598e62379bc072769dde7755461870365..721bc5fe7f143585e6a5b9f87cf21bacc1f955df 100644 (file)
@@ -1,7 +1,7 @@
 /********************************************************************************
 ** Form generated from reading UI file 'jstt.ui'
 **
 /********************************************************************************
 ** Form generated from reading UI file 'jstt.ui'
 **
-** Created: Mon Sep 5 23:04:32 2011
+** Created: Sat Sep 10 01:13:38 2011
 **      by: Qt User Interface Compiler version 4.6.3
 **
 ** WARNING! All changes made in this file will be lost when recompiling UI file!
 **      by: Qt User Interface Compiler version 4.6.3
 **
 ** WARNING! All changes made in this file will be lost when recompiling UI file!
@@ -15,6 +15,7 @@
 #include <QtGui/QApplication>
 #include <QtGui/QButtonGroup>
 #include <QtGui/QComboBox>
 #include <QtGui/QApplication>
 #include <QtGui/QButtonGroup>
 #include <QtGui/QComboBox>
+#include <QtGui/QGraphicsView>
 #include <QtGui/QHBoxLayout>
 #include <QtGui/QHeaderView>
 #include <QtGui/QLabel>
 #include <QtGui/QHBoxLayout>
 #include <QtGui/QHeaderView>
 #include <QtGui/QLabel>
@@ -25,6 +26,7 @@
 #include <QtGui/QSpacerItem>
 #include <QtGui/QStatusBar>
 #include <QtGui/QToolBar>
 #include <QtGui/QSpacerItem>
 #include <QtGui/QStatusBar>
 #include <QtGui/QToolBar>
+#include <QtGui/QVBoxLayout>
 #include <QtGui/QWidget>
 
 QT_BEGIN_NAMESPACE
 #include <QtGui/QWidget>
 
 QT_BEGIN_NAMESPACE
@@ -36,146 +38,211 @@ public:
     QAction *actionHelp;
     QAction *actionQuit;
     QWidget *centralWidget;
     QAction *actionHelp;
     QAction *actionQuit;
     QWidget *centralWidget;
-    QWidget *horizontalLayoutWidget;
-    QHBoxLayout *horizontalLayout;
-    QLabel *label_4;
-    QLabel *label_3;
-    QLabel *label_2;
-    QLabel *label;
-    QWidget *horizontalLayoutWidget_2;
-    QHBoxLayout *horizontalLayout_2;
+    QWidget *verticalLayoutWidget_2;
+    QVBoxLayout *Std_channels;
+    QHBoxLayout *Aimboards;
+    QSpacerItem *horizontalSpacer_8;
+    QGraphicsView *Aimboard_ch_12;
+    QSpacerItem *horizontalSpacer_6;
+    QGraphicsView *Aimboard_ch_34;
+    QSpacerItem *horizontalSpacer_7;
+    QHBoxLayout *Channel_bars;
     QSpacerItem *horizontalSpacer_4;
     QSpacerItem *horizontalSpacer_4;
-    QProgressBar *Akse_1;
+    QProgressBar *Chan_1_bar;
     QSpacerItem *horizontalSpacer;
     QSpacerItem *horizontalSpacer;
-    QProgressBar *Akse_2;
+    QProgressBar *Chan_2_bar;
     QSpacerItem *horizontalSpacer_2;
     QSpacerItem *horizontalSpacer_2;
-    QProgressBar *Akse_3;
+    QProgressBar *Chan_3_bar;
     QSpacerItem *horizontalSpacer_3;
     QSpacerItem *horizontalSpacer_3;
-    QProgressBar *Akse_0;
+    QProgressBar *Chan_4_bar;
     QSpacerItem *horizontalSpacer_5;
     QSpacerItem *horizontalSpacer_5;
+    QHBoxLayout *Channel_values;
+    QLabel *Chan_1_val;
+    QLabel *Chan_2_val;
+    QLabel *Chan_3_val;
+    QLabel *Chan_4_val;
+    QVBoxLayout *Comboboxes;
     QComboBox *Joysticks;
     QComboBox *Joysticks;
-    QComboBox *Joysticks_2;
-    QMenuBar *menuBar;
-    QMenu *menuFile;
+    QComboBox *Mode_menu;
     QToolBar *mainToolBar;
     QStatusBar *statusBar;
     QToolBar *mainToolBar;
     QStatusBar *statusBar;
+    QMenuBar *menuBar;
+    QMenu *menuFile;
 
     void setupUi(QMainWindow *jstt)
     {
         if (jstt->objectName().isEmpty())
             jstt->setObjectName(QString::fromUtf8("jstt"));
 
     void setupUi(QMainWindow *jstt)
     {
         if (jstt->objectName().isEmpty())
             jstt->setObjectName(QString::fromUtf8("jstt"));
-        jstt->resize(350, 344);
+        jstt->resize(354, 457);
         actionAbout = new QAction(jstt);
         actionAbout->setObjectName(QString::fromUtf8("actionAbout"));
         actionHelp = new QAction(jstt);
         actionHelp->setObjectName(QString::fromUtf8("actionHelp"));
         actionQuit = new QAction(jstt);
         actionQuit->setObjectName(QString::fromUtf8("actionQuit"));
         actionAbout = new QAction(jstt);
         actionAbout->setObjectName(QString::fromUtf8("actionAbout"));
         actionHelp = new QAction(jstt);
         actionHelp->setObjectName(QString::fromUtf8("actionHelp"));
         actionQuit = new QAction(jstt);
         actionQuit->setObjectName(QString::fromUtf8("actionQuit"));
+        actionQuit->setShortcutContext(Qt::WindowShortcut);
         centralWidget = new QWidget(jstt);
         centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
         centralWidget = new QWidget(jstt);
         centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
-        horizontalLayoutWidget = new QWidget(centralWidget);
-        horizontalLayoutWidget->setObjectName(QString::fromUtf8("horizontalLayoutWidget"));
-        horizontalLayoutWidget->setGeometry(QRect(10, 180, 331, 31));
-        horizontalLayout = new QHBoxLayout(horizontalLayoutWidget);
-        horizontalLayout->setSpacing(6);
-        horizontalLayout->setContentsMargins(11, 11, 11, 11);
-        horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
-        horizontalLayout->setContentsMargins(0, 0, 0, 0);
-        label_4 = new QLabel(horizontalLayoutWidget);
-        label_4->setObjectName(QString::fromUtf8("label_4"));
-
-        horizontalLayout->addWidget(label_4);
-
-        label_3 = new QLabel(horizontalLayoutWidget);
-        label_3->setObjectName(QString::fromUtf8("label_3"));
-
-        horizontalLayout->addWidget(label_3);
-
-        label_2 = new QLabel(horizontalLayoutWidget);
-        label_2->setObjectName(QString::fromUtf8("label_2"));
-
-        horizontalLayout->addWidget(label_2);
-
-        label = new QLabel(horizontalLayoutWidget);
-        label->setObjectName(QString::fromUtf8("label"));
-
-        horizontalLayout->addWidget(label);
-
-        horizontalLayoutWidget_2 = new QWidget(centralWidget);
-        horizontalLayoutWidget_2->setObjectName(QString::fromUtf8("horizontalLayoutWidget_2"));
-        horizontalLayoutWidget_2->setGeometry(QRect(10, 10, 331, 161));
-        horizontalLayout_2 = new QHBoxLayout(horizontalLayoutWidget_2);
-        horizontalLayout_2->setSpacing(6);
-        horizontalLayout_2->setContentsMargins(11, 11, 11, 11);
-        horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
-        horizontalLayout_2->setContentsMargins(0, 0, 0, 0);
+        verticalLayoutWidget_2 = new QWidget(centralWidget);
+        verticalLayoutWidget_2->setObjectName(QString::fromUtf8("verticalLayoutWidget_2"));
+        verticalLayoutWidget_2->setGeometry(QRect(10, 10, 331, 381));
+        Std_channels = new QVBoxLayout(verticalLayoutWidget_2);
+        Std_channels->setSpacing(6);
+        Std_channels->setContentsMargins(11, 11, 11, 11);
+        Std_channels->setObjectName(QString::fromUtf8("Std_channels"));
+        Std_channels->setContentsMargins(0, 0, 0, 0);
+        Aimboards = new QHBoxLayout();
+        Aimboards->setSpacing(6);
+        Aimboards->setObjectName(QString::fromUtf8("Aimboards"));
+        horizontalSpacer_8 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
+
+        Aimboards->addItem(horizontalSpacer_8);
+
+        Aimboard_ch_12 = new QGraphicsView(verticalLayoutWidget_2);
+        Aimboard_ch_12->setObjectName(QString::fromUtf8("Aimboard_ch_12"));
+        QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+        sizePolicy.setHorizontalStretch(110);
+        sizePolicy.setVerticalStretch(110);
+        sizePolicy.setHeightForWidth(Aimboard_ch_12->sizePolicy().hasHeightForWidth());
+        Aimboard_ch_12->setSizePolicy(sizePolicy);
+        Aimboard_ch_12->setMinimumSize(QSize(110, 110));
+        Aimboard_ch_12->setMaximumSize(QSize(110, 110));
+        Aimboard_ch_12->setBaseSize(QSize(110, 110));
+
+        Aimboards->addWidget(Aimboard_ch_12);
+
+        horizontalSpacer_6 = new QSpacerItem(46, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
+
+        Aimboards->addItem(horizontalSpacer_6);
+
+        Aimboard_ch_34 = new QGraphicsView(verticalLayoutWidget_2);
+        Aimboard_ch_34->setObjectName(QString::fromUtf8("Aimboard_ch_34"));
+        sizePolicy.setHeightForWidth(Aimboard_ch_34->sizePolicy().hasHeightForWidth());
+        Aimboard_ch_34->setSizePolicy(sizePolicy);
+        Aimboard_ch_34->setMinimumSize(QSize(110, 110));
+        Aimboard_ch_34->setMaximumSize(QSize(110, 110));
+        Aimboard_ch_34->setBaseSize(QSize(110, 110));
+
+        Aimboards->addWidget(Aimboard_ch_34);
+
+        horizontalSpacer_7 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
+
+        Aimboards->addItem(horizontalSpacer_7);
+
+
+        Std_channels->addLayout(Aimboards);
+
+        Channel_bars = new QHBoxLayout();
+        Channel_bars->setSpacing(6);
+        Channel_bars->setObjectName(QString::fromUtf8("Channel_bars"));
         horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
         horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
-        horizontalLayout_2->addItem(horizontalSpacer_4);
+        Channel_bars->addItem(horizontalSpacer_4);
 
 
-        Akse_1 = new QProgressBar(horizontalLayoutWidget_2);
-        Akse_1->setObjectName(QString::fromUtf8("Akse_1"));
-        Akse_1->setValue(24);
-        Akse_1->setOrientation(Qt::Vertical);
+        Chan_1_bar = new QProgressBar(verticalLayoutWidget_2);
+        Chan_1_bar->setObjectName(QString::fromUtf8("Chan_1_bar"));
+        Chan_1_bar->setValue(24);
+        Chan_1_bar->setOrientation(Qt::Vertical);
 
 
-        horizontalLayout_2->addWidget(Akse_1);
+        Channel_bars->addWidget(Chan_1_bar);
 
         horizontalSpacer = new QSpacerItem(50, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
 
         horizontalSpacer = new QSpacerItem(50, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
-        horizontalLayout_2->addItem(horizontalSpacer);
+        Channel_bars->addItem(horizontalSpacer);
 
 
-        Akse_2 = new QProgressBar(horizontalLayoutWidget_2);
-        Akse_2->setObjectName(QString::fromUtf8("Akse_2"));
-        Akse_2->setValue(24);
-        Akse_2->setOrientation(Qt::Vertical);
+        Chan_2_bar = new QProgressBar(verticalLayoutWidget_2);
+        Chan_2_bar->setObjectName(QString::fromUtf8("Chan_2_bar"));
+        Chan_2_bar->setValue(24);
+        Chan_2_bar->setOrientation(Qt::Vertical);
 
 
-        horizontalLayout_2->addWidget(Akse_2);
+        Channel_bars->addWidget(Chan_2_bar);
 
         horizontalSpacer_2 = new QSpacerItem(50, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
 
         horizontalSpacer_2 = new QSpacerItem(50, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
-        horizontalLayout_2->addItem(horizontalSpacer_2);
+        Channel_bars->addItem(horizontalSpacer_2);
 
 
-        Akse_3 = new QProgressBar(horizontalLayoutWidget_2);
-        Akse_3->setObjectName(QString::fromUtf8("Akse_3"));
-        Akse_3->setValue(24);
-        Akse_3->setOrientation(Qt::Vertical);
+        Chan_3_bar = new QProgressBar(verticalLayoutWidget_2);
+        Chan_3_bar->setObjectName(QString::fromUtf8("Chan_3_bar"));
+        Chan_3_bar->setValue(24);
+        Chan_3_bar->setOrientation(Qt::Vertical);
 
 
-        horizontalLayout_2->addWidget(Akse_3);
+        Channel_bars->addWidget(Chan_3_bar);
 
         horizontalSpacer_3 = new QSpacerItem(50, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
 
         horizontalSpacer_3 = new QSpacerItem(50, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
-        horizontalLayout_2->addItem(horizontalSpacer_3);
+        Channel_bars->addItem(horizontalSpacer_3);
 
 
-        Akse_0 = new QProgressBar(horizontalLayoutWidget_2);
-        Akse_0->setObjectName(QString::fromUtf8("Akse_0"));
-        Akse_0->setValue(24);
-        Akse_0->setOrientation(Qt::Vertical);
+        Chan_4_bar = new QProgressBar(verticalLayoutWidget_2);
+        Chan_4_bar->setObjectName(QString::fromUtf8("Chan_4_bar"));
+        Chan_4_bar->setValue(24);
+        Chan_4_bar->setOrientation(Qt::Vertical);
 
 
-        horizontalLayout_2->addWidget(Akse_0);
+        Channel_bars->addWidget(Chan_4_bar);
 
         horizontalSpacer_5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
 
         horizontalSpacer_5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
-        horizontalLayout_2->addItem(horizontalSpacer_5);
+        Channel_bars->addItem(horizontalSpacer_5);
+
+
+        Std_channels->addLayout(Channel_bars);
+
+        Channel_values = new QHBoxLayout();
+        Channel_values->setSpacing(6);
+        Channel_values->setObjectName(QString::fromUtf8("Channel_values"));
+        Chan_1_val = new QLabel(verticalLayoutWidget_2);
+        Chan_1_val->setObjectName(QString::fromUtf8("Chan_1_val"));
+
+        Channel_values->addWidget(Chan_1_val);
+
+        Chan_2_val = new QLabel(verticalLayoutWidget_2);
+        Chan_2_val->setObjectName(QString::fromUtf8("Chan_2_val"));
+
+        Channel_values->addWidget(Chan_2_val);
+
+        Chan_3_val = new QLabel(verticalLayoutWidget_2);
+        Chan_3_val->setObjectName(QString::fromUtf8("Chan_3_val"));
+
+        Channel_values->addWidget(Chan_3_val);
+
+        Chan_4_val = new QLabel(verticalLayoutWidget_2);
+        Chan_4_val->setObjectName(QString::fromUtf8("Chan_4_val"));
+
+        Channel_values->addWidget(Chan_4_val);
+
+
+        Std_channels->addLayout(Channel_values);
 
 
-        Joysticks = new QComboBox(centralWidget);
+        Comboboxes = new QVBoxLayout();
+        Comboboxes->setSpacing(6);
+        Comboboxes->setObjectName(QString::fromUtf8("Comboboxes"));
+        Joysticks = new QComboBox(verticalLayoutWidget_2);
         Joysticks->setObjectName(QString::fromUtf8("Joysticks"));
         Joysticks->setObjectName(QString::fromUtf8("Joysticks"));
-        Joysticks->setGeometry(QRect(10, 220, 331, 27));
-        Joysticks_2 = new QComboBox(centralWidget);
-        Joysticks_2->setObjectName(QString::fromUtf8("Joysticks_2"));
-        Joysticks_2->setGeometry(QRect(10, 250, 331, 27));
+
+        Comboboxes->addWidget(Joysticks);
+
+        Mode_menu = new QComboBox(verticalLayoutWidget_2);
+        Mode_menu->setObjectName(QString::fromUtf8("Mode_menu"));
+
+        Comboboxes->addWidget(Mode_menu);
+
+
+        Std_channels->addLayout(Comboboxes);
+
         jstt->setCentralWidget(centralWidget);
         jstt->setCentralWidget(centralWidget);
-        menuBar = new QMenuBar(jstt);
-        menuBar->setObjectName(QString::fromUtf8("menuBar"));
-        menuBar->setGeometry(QRect(0, 0, 350, 25));
-        menuFile = new QMenu(menuBar);
-        menuFile->setObjectName(QString::fromUtf8("menuFile"));
-        jstt->setMenuBar(menuBar);
+        verticalLayoutWidget_2->raise();
+        Chan_2_val->raise();
         mainToolBar = new QToolBar(jstt);
         mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
         jstt->addToolBar(Qt::TopToolBarArea, mainToolBar);
         statusBar = new QStatusBar(jstt);
         statusBar->setObjectName(QString::fromUtf8("statusBar"));
         jstt->setStatusBar(statusBar);
         mainToolBar = new QToolBar(jstt);
         mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
         jstt->addToolBar(Qt::TopToolBarArea, mainToolBar);
         statusBar = new QStatusBar(jstt);
         statusBar->setObjectName(QString::fromUtf8("statusBar"));
         jstt->setStatusBar(statusBar);
+        menuBar = new QMenuBar(jstt);
+        menuBar->setObjectName(QString::fromUtf8("menuBar"));
+        menuBar->setGeometry(QRect(0, 0, 354, 25));
+        menuFile = new QMenu(menuBar);
+        menuFile->setObjectName(QString::fromUtf8("menuFile"));
+        jstt->setMenuBar(menuBar);
 
         menuBar->addAction(menuFile->menuAction());
         menuFile->addAction(actionAbout);
 
         menuBar->addAction(menuFile->menuAction());
         menuFile->addAction(actionAbout);
@@ -194,16 +261,16 @@ public:
         actionAbout->setText(QApplication::translate("jstt", "About", 0, QApplication::UnicodeUTF8));
         actionHelp->setText(QApplication::translate("jstt", "Help", 0, QApplication::UnicodeUTF8));
         actionQuit->setText(QApplication::translate("jstt", "Quit", 0, QApplication::UnicodeUTF8));
         actionAbout->setText(QApplication::translate("jstt", "About", 0, QApplication::UnicodeUTF8));
         actionHelp->setText(QApplication::translate("jstt", "Help", 0, QApplication::UnicodeUTF8));
         actionQuit->setText(QApplication::translate("jstt", "Quit", 0, QApplication::UnicodeUTF8));
-        label_4->setText(QApplication::translate("jstt", "TextLabel", 0, QApplication::UnicodeUTF8));
-        label_3->setText(QApplication::translate("jstt", "TextLabel", 0, QApplication::UnicodeUTF8));
-        label_2->setText(QApplication::translate("jstt", "TextLabel", 0, QApplication::UnicodeUTF8));
-        label->setText(QApplication::translate("jstt", "TextLabel", 0, QApplication::UnicodeUTF8));
-        Akse_1->setFormat(QString());
-        Akse_2->setFormat(QString());
-        Akse_3->setFormat(QString());
-        Akse_0->setFormat(QString());
-        Joysticks_2->clear();
-        Joysticks_2->insertItems(0, QStringList()
+        Chan_1_bar->setFormat(QString());
+        Chan_2_bar->setFormat(QString());
+        Chan_3_bar->setFormat(QString());
+        Chan_4_bar->setFormat(QString());
+        Chan_1_val->setText(QApplication::translate("jstt", "TextLabel", 0, QApplication::UnicodeUTF8));
+        Chan_2_val->setText(QApplication::translate("jstt", "TextLabel", 0, QApplication::UnicodeUTF8));
+        Chan_3_val->setText(QApplication::translate("jstt", "TextLabel", 0, QApplication::UnicodeUTF8));
+        Chan_4_val->setText(QApplication::translate("jstt", "TextLabel", 0, QApplication::UnicodeUTF8));
+        Mode_menu->clear();
+        Mode_menu->insertItems(0, QStringList()
          << QApplication::translate("jstt", "Mode 1", 0, QApplication::UnicodeUTF8)
          << QApplication::translate("jstt", "Mode 2", 0, QApplication::UnicodeUTF8)
          << QApplication::translate("jstt", "Mode 3", 0, QApplication::UnicodeUTF8)
          << QApplication::translate("jstt", "Mode 1", 0, QApplication::UnicodeUTF8)
          << QApplication::translate("jstt", "Mode 2", 0, QApplication::UnicodeUTF8)
          << QApplication::translate("jstt", "Mode 3", 0, QApplication::UnicodeUTF8)