Added Tactile fluids, fixed tactile buttons master
authorThomas Pietrzak <thomas.pietrzak@gmail.com>
Wed, 23 Jan 2013 10:55:46 +0000 (10:55 +0000)
committerThomas Pietrzak <thomas.pietrzak@gmail.com>
Wed, 23 Jan 2013 10:55:46 +0000 (10:55 +0000)
git-svn-id: svn+ssh://thomaspietrzak.com/var/svn/rep@100 47cf9a05-e0a8-4ed5-9e9b-101a649bc004

16 files changed:
Arduino/dynamickeyboard/dynamickeyboard.ino
DynamicKeyboardLibrary/DynamicKeyboardLibrary.suo
DynamicKeyboardLibrary/DynamicKeyboardLibrary/DynamicKeyboardController.cpp
DynamicKeyboardLibrary/DynamicKeyboardLibrary/DynamicKeyboardLibrary.vcxproj
DynamicKeyboardLibrary/DynamicKeyboardLibrary/DynamicKeyboardLibrary.vcxproj.filters
DynamicKeyboardLibrary/DynamicKeyboardLibrary/QPushKeysKeyboardController.cpp
DynamicKeyboardLibrary/DynamicKeyboardLibrary/QPushKeysKeyboardController.h
Expe-selection/dyna-expe2/Controler.cpp
Expe-selection/dyna-expe2/Controler.h
Expe-selection/dyna-expe2/HCISheet.cpp
Expe-selection/dyna-expe2/HCISheet.h
Expe-selection/dyna-expe2/QKeyboarLlistener.cpp [new file with mode: 0644]
Expe-selection/dyna-expe2/QKeyboardListener.h [new file with mode: 0644]
Expe-selection/dyna-expe2/dyna-expe2.pro
Expe-selection/dyna-expe2/expe/ExpeConfig.ui
Expe-selection/dyna-expe2/main.cpp

index 60a931ee69af21a4dae5ff3fbcc54ea7fc9a7b34..66e1407424a337edb80cbd46fd4892333b0da1ae 100644 (file)
@@ -20,8 +20,8 @@ byte command = 0;
 
 //threshold values for side keys
 //with hysteresis
-int thresholda = 1;
-int thresholdb = 10;
+int thresholda = 0x20;
+int thresholdb = 0x10;
 
 void sendInformation()
 {
@@ -79,8 +79,8 @@ void setup()
   */
 
   Serial.begin(115200);
-  keysState[0] = 255;
-  keysState[1] = 255;
+  keysState[0] = 0;
+  keysState[1] = 0;
   analogWrite(pwmPin, minDutyCycle);
 }
 
@@ -98,17 +98,15 @@ void setup()
 void checkEvents()
 {
   boolean newevent = false;
-  /*
+ /* 
   Serial.write("F");
   Serial.write(1);
   for (int i = 0 ; i < 4 ; i++)
-    Serial.print(analogRead(keyPins1[i]),HEX);
-  Serial.print(" ");
+    Serial.write(analogRead(keyPins1[i]));
   Serial.write("F");
   Serial.write(1);
   for (int i = 0 ; i < 4 ; i++)
-    Serial.print(analogRead(keyPins2[i]),HEX);
-  Serial.println("");
+    Serial.write(analogRead(keyPins2[i]));
   return;*/
   
   //check key1
@@ -116,19 +114,22 @@ void checkEvents()
   {
     byte b = analogRead(keyPins1[i]);
     //press / release
-    if (keySides1[i] > thresholda && b < thresholda || 
-      keySides1[i] < thresholdb && b > thresholdb)
+    if ((keySides1[i] < thresholda && b > thresholda))
     {
       keySides1[i] = b;
       newevent = true;
     }
+    else if ((keySides1[i] > thresholdb && b < thresholdb))
+    {
+      keySides1[i] = b;
+    }
   }
   if (newevent)
   {
       Serial.write("F");
       Serial.write(1);
       for (int i = 0 ; i < 4 ; i++)
-        Serial.write(255 - keySides1[i]);
+        Serial.write(keySides1[i]);
       newevent = false;
   }
 
@@ -138,19 +139,22 @@ void checkEvents()
   {
     byte b = analogRead(keyPins2[i]);
     //press / release
-    if (keySides2[i] > thresholda && b < thresholda || 
-      keySides2[i] < thresholdb && b > thresholdb)
+    if ((keySides2[i] < thresholda && b > thresholda))
     {
       keySides2[i] = b;
       newevent = true;
     }
+    else if ((keySides2[i] > thresholdb && b < thresholdb))
+    {
+      keySides2[i] = b;
+    }
   }
   if (newevent)
   {
       Serial.write("F");
       Serial.write(2);
       for (int i = 0 ; i < 4 ; i++)
-        Serial.write(255 - keySides2[i]);
+        Serial.write(keySides2[i]);
       newevent = false;
   }
 }
index 0f103d6bd2a28bac101d788120ba015d27ef4c89..413054be2901f85c43bef987c158a981c5dfb110 100644 (file)
Binary files a/DynamicKeyboardLibrary/DynamicKeyboardLibrary.suo and b/DynamicKeyboardLibrary/DynamicKeyboardLibrary.suo differ
index e7d6afd0f74d3c9291337e974bdbfa376cc50413..d2f57e8f63cb8b505a706224b5096fcdb9d7dfb1 100644 (file)
@@ -97,7 +97,7 @@ void DynamicKeyboardController::setBoostDuration(UINT16 val) const
 bool DynamicKeyboardController::getState(UINT16 &solenoids, UINT8 &minDutyCycle, UINT8 &maxDutyCycle, UINT16 &boostDuration) const\r
 {\r
     char comm = 'I';\r
-    if (!_comPort || !_comPort->WriteData(&comm,1))\r
+    if (!_comPort || !_comPort->WriteData(&comm, 1))\r
         return false;\r
 #ifdef WIN32\r
        Sleep(1000);\r
index 3c7972819361923e8973f879c8e4de3d63152088..86492bed17d5efbdc793b54074cd9047ec9e6760 100644 (file)
   </ItemGroup>\r
   <ItemGroup>\r
     <ClInclude Include="DynamicKeyboardController.h" />\r
-    <ClInclude Include="QSideKeyEvent.h" />\r
-    <ClInclude Include="QPushKeysKeyboardController.h" />\r
+    <CustomBuild Include="QPushKeysKeyboardController.h">\r
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>\r
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing QPushKeysKeyboardController.h...</Message>\r
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>\r
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DDEBUG -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_CORE_LIB -DDYNAMICKEYBOARDLIBRARY_LIB -D_WINDLL "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore"</Command>\r
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>\r
+      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing QPushKeysKeyboardController.h...</Message>\r
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>\r
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DDLLEXPORT -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DDYNAMICKEYBOARDLIBRARY_LIB -D_WINDLL "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore"</Command>\r
+    </CustomBuild>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClCompile Include="DynamicKeyboardController.cpp" />\r
-    <ClCompile Include="QSideKeyEvent.cpp" />\r
+    <ClCompile Include="GeneratedFiles\Debug\moc_QPushKeysKeyboardController.cpp">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="GeneratedFiles\Release\moc_QPushKeysKeyboardController.cpp">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
     <ClCompile Include="QPushKeysKeyboardController.cpp" />\r
   </ItemGroup>\r
   <PropertyGroup Label="Globals">\r
index 51c5a9d2481aae69aa798af89781359739ef79d5..6a9907892873cf46c71f5657e7fd9c5945581d67 100644 (file)
       <Extensions>moc;h;cpp</Extensions>\r
       <SourceControlFiles>False</SourceControlFiles>\r
     </Filter>\r
+    <Filter Include="Generated Files\Debug">\r
+      <UniqueIdentifier>{b926e84f-3889-4973-bac7-53502e36e5e9}</UniqueIdentifier>\r
+      <Extensions>cpp;moc</Extensions>\r
+      <SourceControlFiles>False</SourceControlFiles>\r
+    </Filter>\r
+    <Filter Include="Generated Files\Release">\r
+      <UniqueIdentifier>{5b1fdf1f-d57f-4851-9b1e-ca12f863c532}</UniqueIdentifier>\r
+      <Extensions>cpp;moc</Extensions>\r
+      <SourceControlFiles>False</SourceControlFiles>\r
+    </Filter>\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <ClInclude Include="QPushKeysKeyboardController.h">\r
-      <Filter>Header Files</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="DynamicKeyboardController.h">\r
       <Filter>Header Files</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="QSideKeyEvent.h">\r
-      <Filter>Header Files</Filter>\r
-    </ClInclude>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClCompile Include="QPushKeysKeyboardController.cpp">\r
     <ClCompile Include="DynamicKeyboardController.cpp">\r
       <Filter>Source Files</Filter>\r
     </ClCompile>\r
-    <ClCompile Include="QSideKeyEvent.cpp">\r
-      <Filter>Source Files</Filter>\r
+    <ClCompile Include="GeneratedFiles\Debug\moc_QPushKeysKeyboardController.cpp">\r
+      <Filter>Generated Files\Debug</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="GeneratedFiles\Release\moc_QPushKeysKeyboardController.cpp">\r
+      <Filter>Generated Files\Release</Filter>\r
     </ClCompile>\r
   </ItemGroup>\r
+  <ItemGroup>\r
+    <CustomBuild Include="QPushKeysKeyboardController.h">\r
+      <Filter>Header Files</Filter>\r
+    </CustomBuild>\r
+  </ItemGroup>\r
 </Project>
\ No newline at end of file
index 658770c90f68fddb8aefc62a953f0c150c0708e2..58fcf4e8cb9a775745465de6765304b5c39f1bb8 100644 (file)
@@ -1,14 +1,13 @@
 #include "QPushKeysKeyboardController.h"\r
 \r
 #include <QCoreApplication>\r
-#include "QSideKeyEvent.h"\r
 \r
 #if DEBUG\r
 #include <QDebug>\r
 #endif\r
 \r
-QPushKeysKeyboardController::QPushKeysKeyboardController(char *port, int baudrate, QObject *receiver)\r
-: DynamicKeyboardController(port, baudrate), _receiver(receiver)\r
+QPushKeysKeyboardController::QPushKeysKeyboardController(char *port, int baudrate)//, QObject *receiver)\r
+: DynamicKeyboardController(port, baudrate)//, _receiver(receiver)\r
 {\r
        start();\r
 }\r
@@ -20,32 +19,37 @@ QPushKeysKeyboardController::~QPushKeysKeyboardController(void)
 \r
 void QPushKeysKeyboardController::run()\r
 {\r
+//     if (!_receiver ||!_comPort)\r
+       if (!_comPort)\r
+               return;\r
+\r
        char buffer[6];\r
-       qDebug() << "Watching for side key events, send them to " << hex << _receiver; \r
 #if DEBUG\r
-                       qDebug() << "Watching for side key events, send them to " << hex << _receiver; \r
+                       qDebug() << "Watching for side key events";//, send them to " << hex << _receiver; \r
 #endif\r
 \r
        while (true)\r
        {\r
-               if (_comPort->ReadData(buffer, 6) == 6 && _receiver)\r
+               if (_comPort->ReadData(buffer, 6) == 6)\r
                {\r
-                       QSideKeyEvent::Sides sides = 0;\r
-                       if (buffer[2] > 0)\r
-                               sides |= QSideKeyEvent::Front;\r
-                       if (buffer[3] > 0)\r
-                               sides |= QSideKeyEvent::Right;\r
-                       if (buffer[4] > 0)\r
-                               sides |= QSideKeyEvent::Back;\r
-                       if (buffer[5] > 0)\r
-                               sides |= QSideKeyEvent::Left;\r
+                       Sides sides = 0;\r
+\r
+                       if (buffer[2] == 0xff)\r
+                               sides |= QPushKeysKeyboardController::Front;\r
+                       if (buffer[3] == 0xff)\r
+                               sides |= QPushKeysKeyboardController::Right;\r
+                       if (buffer[4] == 0xff)\r
+                               sides |= QPushKeysKeyboardController::Back;\r
+                       if (buffer[5] == 0xff)\r
+                               sides |= QPushKeysKeyboardController::Left;\r
 \r
 #if DEBUG\r
                        qDebug() << "post key " << buffer[1] << " sides " << hex << sides; \r
 #endif\r
 \r
-                       QCoreApplication::postEvent(_receiver, new QSideKeyEvent(buffer[1], sides));\r
+                       //QCoreApplication::postEvent(_receiver, new QSideKeyEvent(buffer[1], sides));\r
+                       emit keyEvent(buffer[1], int(sides));\r
                }\r
-               sleep(1000);\r
+               msleep(1);\r
        }\r
 }\r
index 8902995b6c1de4fb49dcfd691dbb9880c785292e..06fa72ab68c609b927925a4b73b651dcfd187f5f 100644 (file)
@@ -1,21 +1,42 @@
 #ifndef __QPUSHKEYSKEYBOARDCONTROLLER_\r
 #define __QPUSHKEYSKEYBOARDCONTROLLER_\r
 \r
-#include <QThread>\r
 #include <QObject>\r
+#include <QThread>\r
+#include <QFlags>\r
+#include <QMetaType>\r
+//#include "QSideKeyEvent.h"\r
 \r
 #include "DynamicKeyboardController.h"\r
 \r
-class EXPORTED QPushKeysKeyboardController: public DynamicKeyboardController, QThread\r
+class EXPORTED QPushKeysKeyboardController: public QThread, public DynamicKeyboardController\r
 {\r
+       Q_OBJECT \r
+\r
        public:\r
-               QPushKeysKeyboardController(char *port, int baudrate, QObject *receiver=NULL);\r
+               QPushKeysKeyboardController(char *port, int baudrate);//, QObject *receiver=NULL);\r
 \r
                ~QPushKeysKeyboardController();\r
 \r
+               enum Side {\r
+                       Front = 0x01,\r
+                       Right = 0x02,\r
+                       Back = 0x04,\r
+                       Left = 0x08 };\r
+\r
+               Q_DECLARE_FLAGS(Sides, Side)\r
+               Q_FLAGS(Sides)\r
+\r
+       signals:\r
+               void keyEvent(int, int); \r
+\r
        protected:\r
                void run();\r
-               QObject *_receiver;\r
+               //QObject *_receiver;\r
 };\r
 \r
+Q_DECLARE_OPERATORS_FOR_FLAGS(QPushKeysKeyboardController::Sides)\r
+\r
+Q_DECLARE_METATYPE(QPushKeysKeyboardController::Sides);\r
+\r
 #endif\r
index 626e625a4825ce12d05c19f7057b7025f8dee277..81f926356a98bdf52339d6d7fefb8243b7e55c56 100644 (file)
 //int secondScreenWidth = 1920;
 //int secondScreenHeight = 1200;
 
+Controler::Controler(MainWindow *_experimenterWindow)
+: Expe(), successSound(":ressources/success.wav"), errorSound("ressources/error.wav"),
+  experimenterWindow(_experimenterWindow), keyboardListener("COM9", 115200)
+{
+    //qDebug() << __PRETTY_FUNCTION__ ;
+    setNbBlock(5); //TODO
+    setNbTrials(28); //TODO
+}
+
 void Controler::setFullScreen()
 {
         widgetParent->showFullScreen();
@@ -20,15 +29,8 @@ void Controler::setFullScreen()
         HCISheet* sheet = dynamic_cast<HCISheet*>(this->trialSheet);
 
         sheet->resize(this->widgetParent->width(), this->widgetParent->height());
-}
 
-Controler::Controler(MainWindow *_experimenterWindow)
-: Expe(), successSound(":ressources/success.wav"), errorSound("ressources/error.wav"),
-  experimenterWindow(_experimenterWindow), keyboardControler(NULL)
-{
-    //qDebug() << __PRETTY_FUNCTION__ ;
-    setNbBlock(5); //TODO
-    setNbTrials(28); //TODO
+        sheet->raise();
 }
 
 //-----------------------------
@@ -50,15 +52,17 @@ void Controler::initCSVWriter(const QStringList &l)
         h = h.mid(0,1);
         title += h+"["+l.at(i) +"]";
     }
+    title += "dy[" + this->keyboardType + "]";
+
     //title += "tec["+ this->tech +"]";
-    //title += "set" + this->set +"]";
+    //title += "                                                                                                                                                                             set" + this->set +"]";
     title +=".csv";
     csvWriter.openFile(title);
     csvWriter.setColumnNames(columNames);
 }
 
 //----------------------
-void Controler::start(const QString& nameFile, QString user, const QString& , const QString& )
+void Controler::start(const QString& nameFile, QString user, const QString& option1, const QString& )
 {
    // qDebug()<<__PRETTY_FUNCTION__;
     QFile f(nameFile);
@@ -67,6 +71,8 @@ void Controler::start(const QString& nameFile, QString user, const QString& , co
 
     Expe::start(nameFile, user);
 
+    this->keyboardType = option1;
+
     QRect geometry = QApplication::desktop()->screenGeometry();
     this->widgetParent->move(0, 0);
     //this->widgetParent->resize(1280,1024);
@@ -91,10 +97,23 @@ void Controler::start(const QString& nameFile, QString user, const QString& , co
      connect(sheet, SIGNAL(hotkeyPressed(char)), this, SLOT(hotkeyPressed(char)));
      connect(sheet, SIGNAL(hotkeyReleased(char)), this, SLOT(hotkeyReleased(char)));
      //key sides
-     connect(sheet, SIGNAL(raisedKeyReleased(char, int)), this, SLOT(raisedKeyReleased(char, int)));
-     connect(sheet, SIGNAL(ctrlPressed()), this, SLOT(raiseKeys()));
+     //connect(sheet, SIGNAL(raisedKeyReleased(char, int)), this, SLOT(raisedKeyReleased(char, int)));
+//     connect(sheet, SIGNAL(ctrlPressed()), this, SLOT(raiseKeys()));
+//     connect(sheet, SIGNAL(ctrlReleased()), this, SLOT(lowerKeys()));
      this->setFullScreen();
-     keyboardControler = new QPushKeysKeyboardController("COM9", 115200, sheet);
+/*
+     try
+     {
+         keyboardControler = new QPushKeysKeyboardController("COM9", 115200);
+
+         connect(dynamic_cast<QPushKeysKeyboardController *>(keyboardControler), SIGNAL(keyEvent(int, int)), this, SLOT(sideKeyEvent(int, int)));
+     }
+     catch (...)
+     {
+         qDebug() << "No dynamic keyboard found";
+         keyboardControler = NULL;
+     }*/
+     connect(&keyboardListener, SIGNAL(keyEvent(int, int)), this, SLOT(sideKeyEvent(int, int)));
 }
 
 //----------------------
@@ -147,6 +166,10 @@ void Controler::prepareTrialData(const QMap<QString, QString>& prop)
     HCISheet * sheet = dynamic_cast<HCISheet *>(this->trialSheet);
     sheet->setTargetKey(key, type);
 
+    csvWriter.write("blockbis", QString::number(this->numBlock()));
+
+    csvWriter.write("dk_keyboard", QString::number(this->keyboardType != "NORMAL"));
+
    // QString str_item = prop["item"];
    //define the stimulus
    //display the stimulus.
@@ -205,6 +228,7 @@ QStringList Controler::completeCSVHeaderData()
 {
     csvWriter.setSeparator("\t");
     QStringList res;
+    res << "blockbis";
     res << "key";
     res << "type";
     res <<"raised";
@@ -214,6 +238,7 @@ QStringList Controler::completeCSVHeaderData()
     res << "correct";
     res << "false";
     res << "time";
+    res << "dk_keyboard";
     return res;
 }
 
@@ -275,12 +300,19 @@ QString Controler::getCharFromConfiguration(int keyId, int configuration)
 
     return key;
 }*/
-
+/*
 void Controler::raiseKeys()
 {
-    keyboardControler->raiseKeys(0xffff);
+    if (keyboardControler)
+        keyboardControler->raiseKeys(0xffff);
 }
 
+void Controler::lowerKeys()
+{
+    if (keyboardControler)
+        keyboardControler->lowerKeys(0xffff);
+}
+*/
 //---------------------------
 void Controler::hotkeyPressed(char /*c*/)
 {
@@ -288,19 +320,28 @@ void Controler::hotkeyPressed(char /*c*/)
 }
 
 //---------------------------
-void Controler::raisedKeyReleased(char key, int sides){
-    QString res = QString(key);
+//void Controler::raisedKeyReleased(char key, int sides){
+void Controler::sideKeyEvent(int key, int sides)
+{
+//    QPushKeysKeyboardController::Sides s =
+    QString res = "";
+    if (key == 1)
+            res += "d";
+    else if (key == 2)
+            res += "o";
     if(sides & QSideKeyEvent::Left) res += "l";
     else if(sides & QSideKeyEvent::Right) res += "r";
     else if(sides & QSideKeyEvent::Front) res += "f";
     else if(sides & QSideKeyEvent::Back) res += "b";
+
+    activateHotkey(res);
 }
 
 //---------------------------
 void Controler::hotkeyReleased(char keyf)
 {
     activateHotkey(QString(keyf)+"t");
-    keyboardControler->lowerKeys(0xffff);
+    //ododdolowerKeys();
 }
 
 
index d608b315d708952f909d01f464ab583747831bc6..c917bcc0ac5b692229f6a918c59f86352ebfe1a1 100644 (file)
@@ -3,11 +3,12 @@
 
 #include <QObject>
 #include <QSound>
+#include <QThread>
 #include "expe/Expe.h"
 #include "HCISheet.h"
 #include "MainWindow.h"
 
-#include<DynamicKeyboard/QPushKeysKeyboardController.h>
+#include "QKeyboardListener.h"
 
 class Controler : public Expe
 {
@@ -21,8 +22,6 @@ public:
 
     //void setExperimenterWindow(MainWindow* _experimenterWindow);
 
-
-
 signals:
     void blockPrepared();
 
@@ -33,9 +32,11 @@ public slots:
     //key will probably D or O.
     //side can be l(left), r(right) f(front) b(back) t(top)
     //force is the force
-    void raisedKeyReleased(char key, int sides);//thomas, you can call this method
+   // void raisedKeyReleased(char key, int sides);//thomas, you can call this method
+    void sideKeyEvent(int, int);
     void activateHotkey(QString advHotkey);
-    void raiseKeys();
+    /*void raiseKeys();
+    void lowerKeys();*/
 
 
 protected:
@@ -65,8 +66,10 @@ protected:
     QString keyTarget;
     //int configuration;
     bool succes;
+    QString keyboardType;
 
-    DynamicKeyboardController *keyboardControler;
+    QKeyboardListener keyboardListener;
+    //DynamicKeyboardController *keyboardControler;
 };
 
 #endif // CONTROLER_H
index 58daf850b23a746d98381b221d36e2db7564d6d3..fcacb22880851edb9e0384b68eafd6f3bba3e601 100644 (file)
@@ -555,6 +555,7 @@ void HCISheet::keyReleaseEvent(QKeyEvent *ke){
     {
         this->ctrl_pressed = false;
         qDebug() << "ctrl released";
+        emit ctrlReleased();
         //TODO
         //RaiseKey 1 2
     }
@@ -581,69 +582,69 @@ void HCISheet::keyReleaseEvent(QKeyEvent *ke){
 
 bool HCISheet::event(QEvent *event)
 {
-    if (event->type() == QSideKeyEvent::QSideKeyEventType)
/*   if (event->type() == QSideKeyEvent::QSideKeyEventType)
     {
         QSideKeyEvent *evt = static_cast<QSideKeyEvent *>(event);
         qDebug() << "Key " << evt->getKey() << "sides " << hex << evt->getSides();
         emit raisedKeyReleased(evt->getKey(), evt->getSides());
         return true;
-    }
+    }*/
 
     return QWidget::event(event);
 }
 
-void HCISheet::ctrlF(){ qDebug()<<"ctrl F"; ctrl_pressed = false; emit hotkeyReleased('f'); }
-void HCISheet::ctrlA(){ qDebug()<<"ctrl A"; ctrl_pressed = false; emit hotkeyReleased('a'); }
-void HCISheet::ctrlS(){ qDebug()<<"ctrl S"; ctrl_pressed = false; emit hotkeyReleased('s'); }
-void HCISheet::ctrlD(){ qDebug()<<"ctrl D"; ctrl_pressed = false; emit hotkeyReleased('D'); }
-void HCISheet::ctrlG(){ qDebug()<<"ctrl G"; ctrl_pressed = false; emit hotkeyReleased('g'); }
-void HCISheet::ctrlE(){ qDebug()<<"ctrl E"; ctrl_pressed = false; emit hotkeyReleased('e'); }
-void HCISheet::ctrl4(){ qDebug()<<"ctrl F"; ctrl_pressed = false; emit hotkeyReleased('4'); }
-void HCISheet::ctrlX(){ qDebug()<<"ctrl X"; ctrl_pressed = false; emit hotkeyReleased('x'); }
-void HCISheet::ctrlC(){ qDebug()<<"ctrl C"; ctrl_pressed = false; emit hotkeyReleased('c'); }
-void HCISheet::ctrlH(){ qDebug()<<"ctrl H"; ctrl_pressed = false; emit hotkeyReleased('h'); }
-
-void HCISheet::ctrlQ(){ qDebug()<<"ctrl Q"; ctrl_pressed = false; emit hotkeyReleased('q'); }
-void HCISheet::ctrlW(){ qDebug()<<"ctrl W"; ctrl_pressed = false; emit hotkeyReleased('w'); }
-void HCISheet::ctrlR(){ qDebug()<<"ctrl R"; ctrl_pressed = false; emit hotkeyReleased('r'); }
-void HCISheet::ctrlT(){ qDebug()<<"ctrl T"; ctrl_pressed = false; emit hotkeyReleased('t'); }
-void HCISheet::ctrlY(){ qDebug()<<"ctrl Y"; ctrl_pressed = false; emit hotkeyReleased('y'); }
-void HCISheet::ctrlU(){ qDebug()<<"ctrl U"; ctrl_pressed = false; emit hotkeyReleased('u'); }
-void HCISheet::ctrlI(){ qDebug()<<"ctrl I"; ctrl_pressed = false; emit hotkeyReleased('i'); }
-void HCISheet::ctrlO(){ qDebug()<<"ctrl O"; ctrl_pressed = false; emit hotkeyReleased('O'); }
-void HCISheet::ctrlP(){ qDebug()<<"ctrl P"; ctrl_pressed = false; emit hotkeyReleased('p'); }
-void HCISheet::ctrlBracketLeft(){ qDebug()<<"ctrl ["; ctrl_pressed = false; emit hotkeyReleased('['); }
-void HCISheet::ctrlBracketRight(){ qDebug()<<"ctrl ]"; ctrl_pressed = false; emit hotkeyReleased(']'); }
-void HCISheet::ctrlJ(){ qDebug()<<"ctrl J"; ctrl_pressed = false; emit hotkeyReleased('j'); }
-void HCISheet::ctrlK(){ qDebug()<<"ctrl K"; ctrl_pressed = false; emit hotkeyReleased('k'); }
-void HCISheet::ctrlL(){ qDebug()<<"ctrl L"; ctrl_pressed = false; emit hotkeyReleased('l'); }
-void HCISheet::ctrlPointVirgule(){ qDebug()<<"ctrl ;"; ctrl_pressed = false; emit hotkeyReleased(';'); }
-void HCISheet::ctrlApostrophe(){ qDebug()<<"ctrl '"; ctrl_pressed = false; emit hotkeyReleased('\''); }
-void HCISheet::ctrlZ(){ qDebug()<<"ctrl Z"; ctrl_pressed = false; emit hotkeyReleased('z'); }
-void HCISheet::ctrlV(){ qDebug()<<"ctrl V"; ctrl_pressed = false; emit hotkeyReleased('v'); }
-void HCISheet::ctrlB(){ qDebug()<<"ctrl B"; ctrl_pressed = false; emit hotkeyReleased('b'); }
-void HCISheet::ctrlN(){ qDebug()<<"ctrl N"; ctrl_pressed = false; emit hotkeyReleased('n'); }
-void HCISheet::ctrlM(){ qDebug()<<"ctrl M"; ctrl_pressed = false; emit hotkeyReleased('m'); }
-void HCISheet::ctrlVirgule(){ qDebug()<<"ctrl ,"; ctrl_pressed = false; emit hotkeyReleased(','); }
-void HCISheet::ctrlPoint(){ qDebug()<<"ctrl ."; ctrl_pressed = false; emit hotkeyReleased('.'); }
-void HCISheet::ctrlSlash(){ qDebug()<<"ctrl /"; ctrl_pressed = false; emit hotkeyReleased('/'); }
-
-void HCISheet::ctrlChapeau(){ qDebug()<<"ctrl ^"; ctrl_pressed = false; emit hotkeyReleased('^'); }
-void HCISheet::ctrlDollar(){ qDebug()<<"ctrl $"; ctrl_pressed = false; emit hotkeyReleased('$'); }
-void HCISheet::ctrlStar(){ qDebug()<<"ctrl *"; ctrl_pressed = false; emit hotkeyReleased('*'); }
-void HCISheet::ctrlAdvU(){ qDebug()<<("ctrl ù"); ctrl_pressed = false; emit hotkeyReleased('\xf9'); }
-void HCISheet::ctrlChevron(){ qDebug()<<"ctrl <"; ctrl_pressed = false; emit hotkeyReleased('<'); }
-void HCISheet::ctrlDoubleDot(){ qDebug()<<"ctrl :"; ctrl_pressed = false; emit hotkeyReleased(':'); }
-void HCISheet::ctrlExclamation(){ qDebug()<<"ctrl !"; ctrl_pressed = false; emit hotkeyReleased('!'); }
-
-void HCISheet::ctrlEtCommercial(){ qDebug()<<"ctrl &"; ctrl_pressed = false; emit hotkeyReleased('&'); }
-void HCISheet::ctrlEAigu(){ qDebug()<<"ctrl é"; ctrl_pressed = false; emit hotkeyReleased('\xe9'); }
-void HCISheet::ctrlEGrave(){ qDebug()<<"ctrl è"; ctrl_pressed = false; emit hotkeyReleased('\xe8'); }
-void HCISheet::ctrlGuillement(){ qDebug()<<"ctrl \""; ctrl_pressed = false; emit hotkeyReleased('\"'); }
-void HCISheet::ctrlParentheseO(){ qDebug()<<"ctrl ("; ctrl_pressed = false; emit hotkeyReleased('('); }
-void HCISheet::ctrlParentheseF(){ qDebug()<<"ctrl )"; ctrl_pressed = false; emit hotkeyReleased(')'); }
-void HCISheet::ctrl_(){ qDebug()<<"ctrl _"; ctrl_pressed = false; emit hotkeyReleased('_'); }
-void HCISheet::ctrlCedille(){ qDebug()<<"ctrl ç"; ctrl_pressed = false; emit hotkeyReleased('\xe7'); }
-void HCISheet::ctrlAGrave(){ qDebug()<<"ctrl à"; ctrl_pressed = false; emit hotkeyReleased('\xe0'); }
-void HCISheet::ctrlEqual(){ qDebug()<<"ctrl ="; ctrl_pressed = false; emit hotkeyReleased('='); }
-void HCISheet::ctrlMinus(){ qDebug()<<"ctrl -"; ctrl_pressed = false; emit hotkeyReleased('-'); }
+void HCISheet::ctrlF(){ qDebug()<<"ctrl F"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('f'); }
+void HCISheet::ctrlA(){ qDebug()<<"ctrl A"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('a'); }
+void HCISheet::ctrlS(){ qDebug()<<"ctrl S"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('s'); }
+void HCISheet::ctrlD(){ qDebug()<<"ctrl D"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('D'); }
+void HCISheet::ctrlG(){ qDebug()<<"ctrl G"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('g'); }
+void HCISheet::ctrlE(){ qDebug()<<"ctrl E"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('e'); }
+void HCISheet::ctrl4(){ qDebug()<<"ctrl F"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('4'); }
+void HCISheet::ctrlX(){ qDebug()<<"ctrl X"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('x'); }
+void HCISheet::ctrlC(){ qDebug()<<"ctrl C"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('c'); }
+void HCISheet::ctrlH(){ qDebug()<<"ctrl H"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('h'); }
+
+void HCISheet::ctrlQ(){ qDebug()<<"ctrl Q"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('q'); }
+void HCISheet::ctrlW(){ qDebug()<<"ctrl W"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('w'); }
+void HCISheet::ctrlR(){ qDebug()<<"ctrl R"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('r'); }
+void HCISheet::ctrlT(){ qDebug()<<"ctrl T"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('t'); }
+void HCISheet::ctrlY(){ qDebug()<<"ctrl Y"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('y'); }
+void HCISheet::ctrlU(){ qDebug()<<"ctrl U"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('u'); }
+void HCISheet::ctrlI(){ qDebug()<<"ctrl I"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('i'); }
+void HCISheet::ctrlO(){ qDebug()<<"ctrl O"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('O'); }
+void HCISheet::ctrlP(){ qDebug()<<"ctrl P"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('p'); }
+void HCISheet::ctrlBracketLeft(){ qDebug()<<"ctrl ["; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('['); }
+void HCISheet::ctrlBracketRight(){ qDebug()<<"ctrl ]"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased(']'); }
+void HCISheet::ctrlJ(){ qDebug()<<"ctrl J"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('j'); }
+void HCISheet::ctrlK(){ qDebug()<<"ctrl K"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('k'); }
+void HCISheet::ctrlL(){ qDebug()<<"ctrl L"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('l'); }
+void HCISheet::ctrlPointVirgule(){ qDebug()<<"ctrl ;"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased(';'); }
+void HCISheet::ctrlApostrophe(){ qDebug()<<"ctrl '"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('\''); }
+void HCISheet::ctrlZ(){ qDebug()<<"ctrl Z"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('z'); }
+void HCISheet::ctrlV(){ qDebug()<<"ctrl V"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('v'); }
+void HCISheet::ctrlB(){ qDebug()<<"ctrl B"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('b'); }
+void HCISheet::ctrlN(){ qDebug()<<"ctrl N"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('n'); }
+void HCISheet::ctrlM(){ qDebug()<<"ctrl M"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('m'); }
+void HCISheet::ctrlVirgule(){ qDebug()<<"ctrl ,"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased(','); }
+void HCISheet::ctrlPoint(){ qDebug()<<"ctrl ."; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('.'); }
+void HCISheet::ctrlSlash(){ qDebug()<<"ctrl /"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('/'); }
+
+void HCISheet::ctrlChapeau(){ qDebug()<<"ctrl ^"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('^'); }
+void HCISheet::ctrlDollar(){ qDebug()<<"ctrl $"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('$'); }
+void HCISheet::ctrlStar(){ qDebug()<<"ctrl *"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('*'); }
+void HCISheet::ctrlAdvU(){ qDebug()<<("ctrl ù"); ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('\xf9'); }
+void HCISheet::ctrlChevron(){ qDebug()<<"ctrl <"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('<'); }
+void HCISheet::ctrlDoubleDot(){ qDebug()<<"ctrl :"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased(':'); }
+void HCISheet::ctrlExclamation(){ qDebug()<<"ctrl !"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('!'); }
+
+void HCISheet::ctrlEtCommercial(){ qDebug()<<"ctrl &"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('&'); }
+void HCISheet::ctrlEAigu(){ qDebug()<<"ctrl é"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('\xe9'); }
+void HCISheet::ctrlEGrave(){ qDebug()<<"ctrl è"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('\xe8'); }
+void HCISheet::ctrlGuillement(){ qDebug()<<"ctrl \""; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('\"'); }
+void HCISheet::ctrlParentheseO(){ qDebug()<<"ctrl ("; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('('); }
+void HCISheet::ctrlParentheseF(){ qDebug()<<"ctrl )"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased(')'); }
+void HCISheet::ctrl_(){ qDebug()<<"ctrl _"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('_'); }
+void HCISheet::ctrlCedille(){ qDebug()<<"ctrl ç"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('\xe7'); }
+void HCISheet::ctrlAGrave(){ qDebug()<<"ctrl à"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('\xe0'); }
+void HCISheet::ctrlEqual(){ qDebug()<<"ctrl ="; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('='); }
+void HCISheet::ctrlMinus(){ qDebug()<<"ctrl -"; ctrl_pressed = false; emit ctrlReleased(); emit hotkeyReleased('-'); }
index 7bff87ae7c62c7bf3c89fcca381cee7f68428030..a34c4a3210103bbafb2b0134663b00358cd62bbe 100644 (file)
@@ -26,6 +26,7 @@ public:
 
 signals:
     void ctrlPressed();
+    void ctrlReleased();
     void hotkeyPressed(char c);
     void hotkeyReleased(char c);
     void raisedKeyReleased(char key, int sides);
diff --git a/Expe-selection/dyna-expe2/QKeyboarLlistener.cpp b/Expe-selection/dyna-expe2/QKeyboarLlistener.cpp
new file mode 100644 (file)
index 0000000..9532258
--- /dev/null
@@ -0,0 +1,81 @@
+#include "QKeyboardListener.h"\r
+\r
+#include <QDebug>\r
+\r
+QKeyboardListener::QKeyboardListener(char *port, int baudrate, QObject *parent)\r
+:QThread(parent)\r
+{\r
+\r
+    try\r
+    {\r
+#ifdef WIN32\r
+        _comPort = new SerialWindows(port, baudrate);\r
+#elif    defined  __MACOSX__\r
+        _comPort = new SerialMac(port, baudrate);\r
+#endif\r
+    }\r
+    catch (...)\r
+    {\r
+        qDebug() << "No Dynamic Keyboard found";\r
+        _comPort = NULL;\r
+    }\r
+\r
+    start();\r
+}\r
+\r
+void QKeyboardListener::run()\r
+{\r
+//     if (!_receiver ||!_comPort)\r
+    if (!_comPort)\r
+        return;\r
+\r
+    char buffer[6];\r
+#if DEBUG\r
+            qDebug() << "Watching for side key events";//, send them to " << hex << _receiver;\r
+#endif\r
+\r
+    while (true)\r
+    {\r
+        if (_comPort->ReadData(buffer, 6) == 6)\r
+        {\r
+            //Sides sides = 0;\r
+\r
+            int max = buffer[2];\r
+            int side = QKeyboardListener::Front;\r
+            if (buffer[3] > max)\r
+            {\r
+                side = QKeyboardListener::Right;\r
+                max = buffer [3];\r
+            }\r
+            if (buffer[4] > max)\r
+            {\r
+                side = QKeyboardListener::Back;\r
+                max = buffer [4];\r
+            }\r
+            if (buffer[5] > max)\r
+            {\r
+                side = QKeyboardListener::Left;\r
+                max = buffer [5];\r
+            }\r
+            emit keyEvent(buffer[1], side);\r
+\r
+                    /*\r
+            if (buffer[2] > 0x10)\r
+                sides |= QKeyboardListener::Front;\r
+            if (buffer[3] > 0x10)\r
+                sides |= QKeyboardListener::Right;\r
+            if (buffer[4] > 0x10)\r
+                sides |= QKeyboardListener::Back;\r
+            if (buffer[5] > 0x10)\r
+                sides |= QKeyboardListener::Left;\r
+\r
+#if DEBUG\r
+            qDebug() << "post key " << buffer[1] << " sides " << hex << sides;\r
+#endif\r
+\r
+            //QCoreApplication::postEvent(_receiver, new QSideKeyEvent(buffer[1], sides));\r
+            emit keyEvent(buffer[1], int(sides));*/\r
+        }\r
+        msleep(1);\r
+    }\r
+}\r
diff --git a/Expe-selection/dyna-expe2/QKeyboardListener.h b/Expe-selection/dyna-expe2/QKeyboardListener.h
new file mode 100644 (file)
index 0000000..eb8e6ea
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef QKEYBOARDLISTENER_H\r
+#define QKEYBOARDLISTENER_H\r
+\r
+#include <QThread>\r
+\r
+#ifdef __MACOSX__\r
+#include <SerialMac.hpp>\r
+#elif defined WIN32\r
+#include <ArduinoSerial\SerialWindows.hpp>\r
+#endif\r
+\r
+class QKeyboardListener : public QThread\r
+{\r
+    Q_OBJECT\r
+    public:\r
+        QKeyboardListener(char *port, int baudrate, QObject *parent = NULL);\r
+        void run();\r
+\r
+\r
+        enum Side {\r
+            Front = 0x01,\r
+            Right = 0x02,\r
+            Back = 0x04,\r
+            Left = 0x08 };\r
+\r
+        Q_DECLARE_FLAGS(Sides, Side)\r
+        Q_FLAGS(Sides)\r
+\r
+    signals:\r
+        void keyEvent(int, int);\r
+\r
+    public slots:\r
+\r
+    private:\r
+    Serial *_comPort;\r
+};\r
+\r
+Q_DECLARE_OPERATORS_FOR_FLAGS(QKeyboardListener::Sides)\r
+\r
+//Q_DECLARE_METATYPE(QKeyboardListener::Sides);\r
+\r
+#endif // QKEYBOARDLISTENER_H\r
index 512fffe62e45d2af8a8849d861267ed5500d4a69..5826abfce4b75b707099fc8880957a34d48e4be3 100644 (file)
@@ -1,59 +1,59 @@
-TARGET = dyna-expe2
-DESTDIR = ../tmp/exec/
-TEMPLATE = app
-QT += xml
-OBJECTS_DIR = ./obj
-MOC_DIR = ./moc
-UI_DIR = ./ui
-
-INCLUDEPATH += expe
-
-RESOURCES += resources.qrc
-
-HEADERS += Controler.h \
-    HCISheet.h
-SOURCES += main.cpp Controler.cpp \
-    HCISheet.cpp
-
-HEADERS += MainWindow.h
-SOURCES += MainWindow.cpp
-
-# experience librairie
-HEADERS += expe/ExpeData.h \
-    expe/Global.h \
-    expe/ExpeLoader.h \
-    expe/Expe.h \
-    expe/ExpeConfig.h
-SOURCES += expe/ExpeData.cpp \
-    expe/Global.cpp \
-    expe/ExpeLoader.cpp \
-    expe/Expe.cpp \
-    expe/Expe_p.cpp \
-    expe/ExpeConfig.cpp
-HEADERS += expe/xml/DataImport.h \
-    expe/xml/DataFactory.h
-SOURCES += expe/xml/DataImport.cpp \
-    expe/xml/DataFactory.cpp
-HEADERS += expe/expeWidget/InterBlock.h \
-    expe/expeWidget/InterTrial.h \
-    expe/expeWidget/ExpeWidget.h \
-    expe/expeWidget/TrialSheet.h
-SOURCES += expe/expeWidget/InterBlock.cpp \
-    expe/expeWidget/InterTrial.cpp \
-    expe/expeWidget/ExpeWidget.cpp \
-    expe/expeWidget/TrialSheet.cpp
-HEADERS += expe/csv/CSVWriter.h
-SOURCES += expe/csv/CSVWriter.cpp
-
-
-FORMS += expe/ExpeConfig.ui
-
-CONFIG(release): LIBS += -lDynamicKeyboardLibrary
-#-L$$PWD/../../../../../../../../Program Files (x86)/Microsoft Visual Studio 10.0/VC/lib/
-
-CONFIG(debug): LIBS += -lDynamicKeyboardLibraryd
-
-#-L$$PWD/../../../../../../../../Program Files (x86)/Microsoft Visual Studio 10.0/VC/lib/
-
-#INCLUDEPATH += $$PWD/../../../../../../../../Program Files (x86)/Microsoft Visual Studio 10.0/VC/include
-#DEPENDPATH += $$PWD/../../../../../../../../Program Files (x86)/Microsoft Visual Studio 10.0/VC/include
+TARGET = dyna-expe2\r
+DESTDIR = ../tmp/exec/\r
+TEMPLATE = app\r
+QT += xml\r
+OBJECTS_DIR = ./obj\r
+MOC_DIR = ./moc\r
+UI_DIR = ./ui\r
+\r
+INCLUDEPATH += expe\r
+\r
+RESOURCES += resources.qrc\r
+\r
+HEADERS += Controler.h \\r
+    HCISheet.h \\r
+    QKeyboardListener.h\r
+SOURCES += main.cpp Controler.cpp \\r
+    HCISheet.cpp \\r
+    QKeyboarLlistener.cpp\r
+\r
+HEADERS += MainWindow.h\r
+SOURCES += MainWindow.cpp\r
+\r
+# experience librairie\r
+HEADERS += expe/ExpeData.h \\r
+    expe/Global.h \\r
+    expe/ExpeLoader.h \\r
+    expe/Expe.h \\r
+    expe/ExpeConfig.h\r
+SOURCES += expe/ExpeData.cpp \\r
+    expe/Global.cpp \\r
+    expe/ExpeLoader.cpp \\r
+    expe/Expe.cpp \\r
+    expe/Expe_p.cpp \\r
+    expe/ExpeConfig.cpp\r
+HEADERS += expe/xml/DataImport.h \\r
+    expe/xml/DataFactory.h\r
+SOURCES += expe/xml/DataImport.cpp \\r
+    expe/xml/DataFactory.cpp\r
+HEADERS += expe/expeWidget/InterBlock.h \\r
+    expe/expeWidget/InterTrial.h \\r
+    expe/expeWidget/ExpeWidget.h \\r
+    expe/expeWidget/TrialSheet.h\r
+SOURCES += expe/expeWidget/InterBlock.cpp \\r
+    expe/expeWidget/InterTrial.cpp \\r
+    expe/expeWidget/ExpeWidget.cpp \\r
+    expe/expeWidget/TrialSheet.cpp\r
+HEADERS += expe/csv/CSVWriter.h\r
+SOURCES += expe/csv/CSVWriter.cpp\r
+\r
+\r
+FORMS += expe/ExpeConfig.ui\r
+\r
+CONFIG(release, debug|release): LIBS += -lArduinoSerial\r
+\r
+CONFIG(debug, debug|release): LIBS += -lArduinoSeriald\r
+\r
+#CONFIG(release): LIBS += -lDynamicKeyboardLibrary\r
+\r
+#CONFIG(debug): LIBS += -lDynamicKeyboardLibraryd\r
index 6cd30e2bb8a143cdcf32a89f87500a29e7a256b5..62ee5c95f6b62e33ffb087d0041136ab925681b1 100644 (file)
      </rect>
     </property>
     <property name="text">
-     <string>linear</string>
+     <string>NORMAL</string>
     </property>
    </widget>
    <widget class="QLabel" name="label_6">
index 1d030c8aa69d4d9733c7501cc2865b439db2bf5c..e5ddd89ba71ad0d5caf04f399ab7dd1b55fd3284 100644 (file)
@@ -13,6 +13,9 @@
 \r
 #include <QTextCodec>\r
 \r
+\r
+//#include <DynamicKeyboard/QPush-KeysKeyboardController.h>\r
+\r
 /*\r
 void unitTest()\r
 {\r
@@ -38,6 +41,8 @@ int main(int argc, char **argv)
     QApplication a(argc, argv);\r
     Global::appPath(&a);\r
 \r
+    //qRegisterMetaType<QPushKeysKeyboardController::Sides>();\r
+\r
 \r
    // MainWindow * mainWindow = new MainWindow();\r
     //mainWindow->show();\r