]> git.defcon.no Git - rctxduino/blobdiff - tools/jstt/jstt.h
Added some code for the controllers testing tool. The code is still not functional.
[rctxduino] / tools / jstt / jstt.h
index dd3c478775d88489a9edf6b1d78b88bb11cfe570..c2123e5a44bb26473634832f77a2f297ff06d2b0 100644 (file)
@@ -4,6 +4,9 @@
 #include <QMainWindow>
 #include <QStringList>
 #include <SDL/SDL.h>
+#include <QTimer>
+
+#define eventTimeout 1
 
 namespace Ui {
     class jstt;
@@ -16,12 +19,19 @@ public:
     ~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;
+    SDL_Joystick *joystick;
+    QTimer jsPullTimer;
 
-    QStringList jsNames;
+private slots:
+    void on_Joysticks_currentIndexChanged(int index);
 };
 
 #endif // JSTT_H