]> git.defcon.no Git - rctxduino/blobdiff - tools/jstt/jstt.h
The code is now functional for the 4 first channels, also applied some simple pulldow...
[rctxduino] / tools / jstt / jstt.h
index c2123e5a44bb26473634832f77a2f297ff06d2b0..acbc312878c1d9aeac33d3efed0a50e21bcf9bb2 100644 (file)
@@ -5,8 +5,11 @@
 #include <QStringList>
 #include <SDL/SDL.h>
 #include <QTimer>
+#include <QProgressBar>
+#include <QLabel>
 
-#define eventTimeout 1
+#define eventTimeout 100
+#define percentBar(value) (((32768 + value) * 100) / 65536)
 
 namespace Ui {
     class jstt;
@@ -19,19 +22,25 @@ public:
     ~jstt();
 
 protected:
+
+private:
     void init();
     void jsOpen(int js);
     void jsClose();
-    void processJs();
     bool jsIsOpen() { return joystick != NULL; }
 
-private:
     Ui::jstt *ui;
     SDL_Joystick *joystick;
     QTimer jsPullTimer;
+    QProgressBar *bars[4];
+    QLabel *labels[4];
 
 private slots:
-    void on_Joysticks_currentIndexChanged(int index);
+    void on_Joysticks_currentIndexChanged(int index) { jsOpen(index); }
+    void on_actionQuit_triggered();
+    void on_actionHelp_triggered();
+    void on_actionAbout_triggered();
+    void processJs();
 };
 
 #endif // JSTT_H