JND experiments. Location JND ready.
authorThomas Pietrzak <thomas.pietrzak@gmail.com>
Tue, 4 Sep 2012 14:26:57 +0000 (14:26 +0000)
committerThomas Pietrzak <thomas.pietrzak@gmail.com>
Tue, 4 Sep 2012 14:26:57 +0000 (14:26 +0000)
git-svn-id: svn+ssh://thomaspietrzak.com/var/svn/rep@94 47cf9a05-e0a8-4ed5-9e9b-101a649bc004

20 files changed:
DeltaTimeJND/DeltaTimeJND.cpp [new file with mode: 0644]
DeltaTimeJND/DeltaTimeJND.h [new file with mode: 0644]
DeltaTimeJND/DeltaTimeJND.vcxproj [new file with mode: 0644]
DeltaTimeJND/deltatimejnd.qrc [new file with mode: 0644]
DeltaTimeJND/deltatimejnd.ui [new file with mode: 0644]
DeltaTimeJND/main.cpp [new file with mode: 0644]
LocationsJND/AnswerLocationJND.cpp [new file with mode: 0644]
LocationsJND/AnswerLocationJND.h [new file with mode: 0644]
LocationsJND/AnswerLocationJND.ui [new file with mode: 0644]
LocationsJND/LocationsJND.vcxproj [new file with mode: 0644]
LocationsJND/locationsjnd.cpp [new file with mode: 0644]
LocationsJND/locationsjnd.h [new file with mode: 0644]
LocationsJND/locationsjnd.qrc [new file with mode: 0644]
LocationsJND/locationsjnd.ui [new file with mode: 0644]
LocationsJND/main.cpp [new file with mode: 0644]
Tactons Experiment.sdf
Tactons Experiment.sln
Tactons Experiment.suo
Tactons JND/Tactons JND.vcxproj
Tactons JND/answer3AFC.cpp

diff --git a/DeltaTimeJND/DeltaTimeJND.cpp b/DeltaTimeJND/DeltaTimeJND.cpp
new file mode 100644 (file)
index 0000000..703e619
--- /dev/null
@@ -0,0 +1,12 @@
+#include "DeltaTimeJND.h"\r
+\r
+DeltaTimeJND::DeltaTimeJND(QWidget *parent, Qt::WFlags flags)\r
+       : QMainWindow(parent, flags)\r
+{\r
+       ui.setupUi(this);\r
+}\r
+\r
+DeltaTimeJND::~DeltaTimeJND()\r
+{\r
+\r
+}\r
diff --git a/DeltaTimeJND/DeltaTimeJND.h b/DeltaTimeJND/DeltaTimeJND.h
new file mode 100644 (file)
index 0000000..9ca7248
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef DELTATIMEJND_H\r
+#define DELTATIMEJND_H\r
+\r
+#include <QtGui/QMainWindow>\r
+#include "ui_deltatimejnd.h"\r
+\r
+class DeltaTimeJND : public QMainWindow\r
+{\r
+       Q_OBJECT\r
+\r
+public:\r
+       DeltaTimeJND(QWidget *parent = 0, Qt::WFlags flags = 0);\r
+       ~DeltaTimeJND();\r
+\r
+private:\r
+       Ui::DeltaTimeJNDClass ui;\r
+};\r
+\r
+#endif // DELTATIMEJND_H\r
diff --git a/DeltaTimeJND/DeltaTimeJND.vcxproj b/DeltaTimeJND/DeltaTimeJND.vcxproj
new file mode 100644 (file)
index 0000000..4830aeb
--- /dev/null
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup Label="ProjectConfigurations">\r
+    <ProjectConfiguration Include="Debug|Win32">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|Win32">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+  </ItemGroup>\r
+  <PropertyGroup Label="Globals">\r
+    <ProjectGuid>{2AEA0C75-E45A-4992-9DB3-20CA8169F47F}</ProjectGuid>\r
+    <Keyword>Qt4VS</Keyword>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
+    <ConfigurationType>Application</ConfigurationType>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
+    <ConfigurationType>Application</ConfigurationType>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+  <ImportGroup Label="ExtensionSettings">\r
+  </ImportGroup>\r
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+  </ImportGroup>\r
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+  </ImportGroup>\r
+  <PropertyGroup Label="UserMacros" />\r
+  <PropertyGroup>\r
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
+  </PropertyGroup>\r
+  <ItemDefinitionGroup>\r
+  </ItemDefinitionGroup>\r
+  <ItemGroup>\r
+  </ItemGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+  <ImportGroup Label="ExtensionTargets">\r
+  </ImportGroup>\r
+</Project>
\ No newline at end of file
diff --git a/DeltaTimeJND/deltatimejnd.qrc b/DeltaTimeJND/deltatimejnd.qrc
new file mode 100644 (file)
index 0000000..ae0ac9b
--- /dev/null
@@ -0,0 +1,4 @@
+<RCC>\r
+    <qresource prefix="DeltaTimeJND">\r
+    </qresource>\r
+</RCC>\r
diff --git a/DeltaTimeJND/deltatimejnd.ui b/DeltaTimeJND/deltatimejnd.ui
new file mode 100644 (file)
index 0000000..4cfb199
--- /dev/null
@@ -0,0 +1,29 @@
+<UI version="4.0" >\r
+ <class>DeltaTimeJNDClass</class>\r
+ <widget class="QMainWindow" name="DeltaTimeJNDClass" >\r
+  <property name="objectName" >\r
+   <string notr="true">DeltaTimeJNDClass</string>\r
+  </property>\r
+  <property name="geometry" >\r
+   <rect>\r
+       <x>0</x>\r
+       <y>0</y>\r
+       <width>600</width>\r
+       <height>400</height>\r
+   </rect>\r
+  </property>\r
+  <property name="windowTitle" >\r
+   <string>DeltaTimeJND</string>\r
+  </property>\r
+  <widget class="QMenuBar" name="menuBar" />\r
+  <widget class="QToolBar" name="mainToolBar" />\r
+  <widget class="QWidget" name="centralWidget" />\r
+  <widget class="QStatusBar" name="statusBar" />\r
+ </widget>\r
+ <layoutDefault spacing="6" margin="11" />\r
+ <pixmapfunction></pixmapfunction>\r
+ <resources>\r
+   <include location="deltatimejnd.qrc"/>\r
+ </resources>\r
+ <connections/>\r
+</UI>\r
diff --git a/DeltaTimeJND/main.cpp b/DeltaTimeJND/main.cpp
new file mode 100644 (file)
index 0000000..778db7b
--- /dev/null
@@ -0,0 +1,10 @@
+#include "DeltaTimeJND.h"\r
+#include <QtGui/QApplication>\r
+\r
+int main(int argc, char *argv[])\r
+{\r
+       QApplication a(argc, argv);\r
+       DeltaTimeJND w;\r
+       w.show();\r
+       return a.exec();\r
+}\r
diff --git a/LocationsJND/AnswerLocationJND.cpp b/LocationsJND/AnswerLocationJND.cpp
new file mode 100644 (file)
index 0000000..1d46c18
--- /dev/null
@@ -0,0 +1,230 @@
+#include "AnswerLocationJND.h"\r
+\r
+#include <QTimer>\r
+#include <QDate>\r
+#include <QTime>\r
+#include <QDebug>\r
+#include <cmath>\r
+\r
+AnswerLocationJND::AnswerLocationJND(QWidget *parent, Qt::WFlags flags)\r
+:QMainWindow(parent, flags),\r
+_logfile(NULL), _tactonPlayer("COM4"), _goodanswer(-1)\r
+{\r
+       //init the window\r
+       setupUi(this);\r
+//     this->layout()->setSizeConstraint(QLayout::SetFixedSize);\r
+\r
+       for (int i = 0 ; i < 4 ; i++)\r
+       {\r
+               _currenttest[i] = 1.0;\r
+               _jnd[i] = 0.0;\r
+       }\r
+\r
+       //init buttons\r
+       QObject::connect(_first, SIGNAL(clicked()), this, SLOT(answer()));\r
+       QObject::connect(_second, SIGNAL(clicked()), this, SLOT(answer()));\r
+}\r
+\r
+AnswerLocationJND::~AnswerLocationJND()\r
+{\r
+       if (_logfile)\r
+               fclose(_logfile);\r
+       //reset the wristband\r
+       _tactonPlayer.stop();\r
+}\r
+\r
+void AnswerLocationJND::init(QString user, QString vibratortest, int reversals, int frequency, int duration, float deltadown)\r
+{\r
+       if( vibratortest == "Top")\r
+               _vibratortest = 1;\r
+       else if( vibratortest == "Down")\r
+               _vibratortest = 3;\r
+       else if( vibratortest == "Left")\r
+               _vibratortest = 2;\r
+       else\r
+               _vibratortest = 0;\r
+       \r
+       if (_vibratortest == 0)\r
+               _currentside = 1;\r
+       else\r
+               _currentside = 0;\r
+\r
+       _reversals = reversals;\r
+       _duration = duration;\r
+       _deltadown = deltadown;\r
+\r
+       //create log file\r
+       QString date = QDate::currentDate().toString("yyyy-MM-dd") + "-" + QTime::currentTime().toString("HH-mm-ss");\r
+       QString logfilename = user + "-" + vibratortest + "-" + date + "-answers";\r
+       if (_logfile = fopen(logfilename.toStdString().c_str(), "w"))\r
+               fprintf(_logfile, "TestSide,Side,Value,IntValue,GoodAnswer,UserAnswer,Error\n");\r
+       logfilename = user + "-" + vibratortest + "-" + date + "-jnd";\r
+       if (_logfile2 = fopen(logfilename.toStdString().c_str(), "w"))\r
+               fprintf(_logfile2, "TestSide,Side,JND\n");\r
+\r
+       for (int i = 0 ; i < 4 ; i++)\r
+       {\r
+               _currenttest[i] = 1.0;\r
+               _sidefinished[i] = false;\r
+       }\r
+       _sidefinished[_vibratortest] = true;\r
+\r
+       unsigned char amp[] = {0, 0, 0, 0};\r
+       _tactonPlayer.setAmplitudes(4, amp);\r
+       _tactonPlayer.setFrequency(frequency);\r
+\r
+       runTrial();\r
+}\r
+\r
+void AnswerLocationJND::playTest()\r
+{\r
+       unsigned char amplitudes[4] = {0, 0, 0, 0};\r
+       amplitudes[_vibratortest] = 255;\r
+\r
+       _tactonPlayer.setAmplitudes(4, amplitudes);\r
+\r
+       QTimer::singleShot(_duration, this, SLOT(stop()));\r
+}\r
+\r
+void AnswerLocationJND::playOther()\r
+{\r
+       unsigned char amplitudes[4] = {0, 0, 0, 0};\r
+       amplitudes[_currentside] = _currenttest[_currentside] * 255;\r
+\r
+       _tactonPlayer.setAmplitudes(4, amplitudes);\r
+\r
+       QTimer::singleShot(_duration, this, SLOT(stop()));\r
+}\r
+\r
+void AnswerLocationJND::stop()\r
+{\r
+       unsigned char amp[] = {0, 0, 0, 0};\r
+       _tactonPlayer.setAmplitudes(4, amp);\r
+}\r
+\r
+void AnswerLocationJND::answer()\r
+{\r
+       QPushButton *button = (QPushButton *)sender();\r
+       int rep;\r
+       if (button->objectName() == "_first")\r
+               rep = 0;\r
+       else if (button->objectName() == "_second")\r
+               rep = 1;\r
+\r
+       log(rep);\r
+\r
+       static int nb[4] = {0, 0, 0, 0}, rev[4] = {0, 0, 0, 0};\r
+\r
+       static bool newblock[4] = {true, true, true, true};\r
+       static bool lastval[4];\r
+       bool val = rep == _goodanswer;\r
+\r
+       //reversal\r
+       if (!newblock[_currentside] && val != lastval[_currentside])\r
+       {\r
+               rev[_currentside]++;\r
+               _jnd[_currentside] += _currenttest[_currentside] / _reversals;\r
+               \r
+               //if enough reversals the side is done\r
+               if (rev[_currentside] >= _reversals)\r
+               {\r
+                       log2();\r
+                       _sidefinished[_currentside] = true;\r
+               }\r
+               //new reversal, but side not finished\r
+               else\r
+               {\r
+                       //good answer: reduce the gap\r
+                       if (val)\r
+                       {\r
+                               _currenttest[_currentside] -= _deltadown;\r
+                               if (_currenttest[_currentside] < 0.0)\r
+                                       _currenttest[_currentside] = 0.0;\r
+                       }\r
+                       //wrong answer: increase the gap\r
+                       else\r
+                       {\r
+                               _currenttest[_currentside] += _deltadown;\r
+                               if (_currenttest[_currentside] > 1.0)\r
+                                       _currenttest[_currentside] = 1.0;\r
+                       }\r
+               }\r
+       }\r
+       //no reversal\r
+       else\r
+       {\r
+               newblock[_currentside] = false;\r
+               //good answer: reduce the gap\r
+               if (val)\r
+               {\r
+                       _currenttest[_currentside] -= _deltadown;\r
+                       if (_currenttest[_currentside] < 0.0)\r
+                               _currenttest[_currentside] = 0.0;\r
+               }\r
+               //wrong answer: increase the gap\r
+               else\r
+               {\r
+                       _currenttest[_currentside] += _deltadown;\r
+                       if (_currenttest[_currentside] > 1.0)\r
+                               _currenttest[_currentside] = 1.0;\r
+               }\r
+       }\r
+       lastval[_currentside] = val;\r
+\r
+       bool finished = true;\r
+       //search for the next side\r
+       for (int i = 0 ; i < 4 ; i++)\r
+       {\r
+               _currentside = (_currentside + 1) % 4;\r
+               if (!_sidefinished[_currentside])\r
+               {\r
+                       finished = false;\r
+                       break;\r
+               }\r
+       }\r
+\r
+       if (finished)\r
+       {\r
+               _first->setEnabled(false);\r
+               _second->setEnabled(false);\r
+               _label->setText("Finished!");\r
+               return;\r
+       }\r
+\r
+       runTrial();\r
+}\r
+\r
+void AnswerLocationJND::log(int answer) const\r
+{\r
+       if (_logfile == NULL)\r
+               return;\r
+       fprintf(_logfile, "%d,%d,%0.2f,%d,%d,%d,%d\n", _vibratortest, _currentside, _currenttest[_currentside], (unsigned char)(_currenttest[_currentside] * 255), _goodanswer, answer, _goodanswer == answer);\r
+}\r
+\r
+void AnswerLocationJND::log2() const\r
+{\r
+       if (_logfile2 == NULL)\r
+               return;\r
+       fprintf(_logfile2, "%d,%d,%0.2f\n", _vibratortest, _currentside, _jnd[_currentside]);\r
+}\r
+\r
+void AnswerLocationJND::runTrial()\r
+{\r
+       _goodanswer = rand() % 2;\r
+\r
+       if (_goodanswer == 0)\r
+       {\r
+               QTimer::singleShot(500, this, SLOT(playOther()));\r
+               QTimer::singleShot(1500 + _duration, this, SLOT(playTest()));\r
+       }\r
+       else\r
+       {\r
+               QTimer::singleShot(500, this, SLOT(playTest()));\r
+               QTimer::singleShot(1500 + _duration, this, SLOT(playOther()));\r
+       }\r
+}\r
+\r
+unsigned int AnswerLocationJND::testValue(unsigned int value, double db) const\r
+{\r
+       return static_cast<unsigned int>(value / pow(10.0, db / 20.0));\r
+}
\ No newline at end of file
diff --git a/LocationsJND/AnswerLocationJND.h b/LocationsJND/AnswerLocationJND.h
new file mode 100644 (file)
index 0000000..fd153eb
--- /dev/null
@@ -0,0 +1,62 @@
+#ifndef _AnswerLocationJND_\r
+#define _AnswerLocationJND_\r
+\r
+#include <TactonPlayer/Tacton.hpp>\r
+#include <TactonPlayer/TactonPlayer.hpp>\r
+\r
+#include <QtGui/QMainWindow>\r
+#include "ui_AnswerLocationJND.h"\r
+\r
+\r
+class AnswerLocationJND : public QMainWindow, Ui::AnswerWindow\r
+{\r
+       Q_OBJECT\r
+\r
+public:\r
+       AnswerLocationJND(QWidget *parent = 0, Qt::WFlags flags = 0);\r
+       ~AnswerLocationJND();\r
+\r
+       void init(QString user, QString vibratortest, int reversals, int frequency, int duration, float deltadown);\r
+\r
+       void setAnswer(bool same);\r
+\r
+private:\r
+       //log the answers\r
+       void log(int answer) const;\r
+       //log the JND values\r
+       void log2() const;\r
+       void runTrial();\r
+       void runBlock();\r
+       unsigned int testValue(unsigned int value, double db) const;\r
+\r
+       FILE *_logfile, *_logfile2;\r
+       TactonPlayer _tactonPlayer;\r
+\r
+       //parameters\r
+       int _vibratortest;\r
+       int _reversals;\r
+       int _duration;\r
+       double _deltadown;\r
+\r
+       //exp status\r
+       int _goodanswer;\r
+       //current value for each side\r
+       double _currenttest[4];\r
+       //which sides are finished?\r
+       bool _sidefinished[4];\r
+       //id of the test vibrator\r
+       int _testid;\r
+       //id of the side currently being tested\r
+       int _currentside;\r
+\r
+       //results\r
+       double _jnd[4];\r
+\r
+private slots:\r
+       void playTest();\r
+       void playOther();\r
+       void stop();\r
+       void answer();\r
+};\r
+\r
+#endif\r
diff --git a/LocationsJND/AnswerLocationJND.ui b/LocationsJND/AnswerLocationJND.ui
new file mode 100644 (file)
index 0000000..f553408
--- /dev/null
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<ui version="4.0">\r
+ <class>AnswerWindow</class>\r
+ <widget class="QMainWindow" name="AnswerWindow">\r
+  <property name="geometry">\r
+   <rect>\r
+    <x>0</x>\r
+    <y>0</y>\r
+    <width>491</width>\r
+    <height>230</height>\r
+   </rect>\r
+  </property>\r
+  <property name="windowTitle">\r
+   <string>Experiment</string>\r
+  </property>\r
+  <widget class="QWidget" name="centralwidget">\r
+   <layout class="QVBoxLayout" name="verticalLayout">\r
+    <item>\r
+     <widget class="QLabel" name="_label">\r
+      <property name="font">\r
+       <font>\r
+        <pointsize>20</pointsize>\r
+       </font>\r
+      </property>\r
+      <property name="text">\r
+       <string>Quelle vibration est la plus forte ?</string>\r
+      </property>\r
+      <property name="alignment">\r
+       <set>Qt::AlignCenter</set>\r
+      </property>\r
+     </widget>\r
+    </item>\r
+    <item>\r
+     <layout class="QHBoxLayout" name="horizontalLayout">\r
+      <item>\r
+       <widget class="QPushButton" name="_first">\r
+        <property name="minimumSize">\r
+         <size>\r
+          <width>0</width>\r
+          <height>100</height>\r
+         </size>\r
+        </property>\r
+        <property name="font">\r
+         <font>\r
+          <pointsize>20</pointsize>\r
+         </font>\r
+        </property>\r
+        <property name="text">\r
+         <string>Première</string>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+      <item>\r
+       <widget class="QPushButton" name="_second">\r
+        <property name="minimumSize">\r
+         <size>\r
+          <width>0</width>\r
+          <height>100</height>\r
+         </size>\r
+        </property>\r
+        <property name="font">\r
+         <font>\r
+          <pointsize>20</pointsize>\r
+         </font>\r
+        </property>\r
+        <property name="text">\r
+         <string>Seconde</string>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+     </layout>\r
+    </item>\r
+   </layout>\r
+  </widget>\r
+ </widget>\r
+ <resources/>\r
+ <connections/>\r
+</ui>\r
diff --git a/LocationsJND/LocationsJND.vcxproj b/LocationsJND/LocationsJND.vcxproj
new file mode 100644 (file)
index 0000000..e2503e6
--- /dev/null
@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup Label="ProjectConfigurations">\r
+    <ProjectConfiguration Include="Debug|Win32">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|Win32">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+  </ItemGroup>\r
+  <PropertyGroup Label="Globals">\r
+    <ProjectGuid>{9B8D15C2-0F04-4BCE-A3A4-211FCAB1C503}</ProjectGuid>\r
+    <Keyword>Qt4VSv1.0</Keyword>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
+    <ConfigurationType>Application</ConfigurationType>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
+    <ConfigurationType>Application</ConfigurationType>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+  <ImportGroup Label="ExtensionSettings">\r
+  </ImportGroup>\r
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+  </ImportGroup>\r
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+  </ImportGroup>\r
+  <PropertyGroup Label="UserMacros" />\r
+  <PropertyGroup>\r
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>\r
+  </PropertyGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <ClCompile>\r
+      <PreprocessorDefinitions>UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_DLL;QT_CORE_LIB;QT_GUI_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <Optimization>Disabled</Optimization>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Windows</SubSystem>\r
+      <OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>\r
+      <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+      <AdditionalDependencies>TactonPlayerd.lib;qtmaind.lib;QtCored4.lib;QtGuid4.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <ClCompile>\r
+      <PreprocessorDefinitions>UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_DLL;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <DebugInformationFormat>\r
+      </DebugInformationFormat>\r
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
+      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Windows</SubSystem>\r
+      <OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>\r
+      <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <GenerateDebugInformation>false</GenerateDebugInformation>\r
+      <AdditionalDependencies>TactonPlayer.lib;qtmain.lib;QtCore4.lib;QtGui4.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <ItemGroup>\r
+    <ClCompile Include="AnswerLocationJND.cpp" />\r
+    <ClCompile Include="GeneratedFiles\Debug\moc_AnswerLocationJND.cpp">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="GeneratedFiles\Debug\moc_locationsjnd.cpp">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="GeneratedFiles\qrc_locationsjnd.cpp">\r
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+      </PrecompiledHeader>\r
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+      </PrecompiledHeader>\r
+    </ClCompile>\r
+    <ClCompile Include="GeneratedFiles\Release\moc_AnswerLocationJND.cpp">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="GeneratedFiles\Release\moc_locationsjnd.cpp">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="locationsjnd.cpp" />\r
+    <ClCompile Include="main.cpp" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <CustomBuild Include="locationsjnd.h">\r
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>\r
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing locationsjnd.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"  -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui"</Command>\r
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>\r
+      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing locationsjnd.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"  -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui"</Command>\r
+    </CustomBuild>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <CustomBuild Include="locationsjnd.ui">\r
+      <FileType>Document</FileType>\r
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>\r
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Uic%27ing %(Identity)...</Message>\r
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>\r
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>\r
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>\r
+      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Uic%27ing %(Identity)...</Message>\r
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>\r
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>\r
+    </CustomBuild>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <CustomBuild Include="AnswerLocationJND.h">\r
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>\r
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing AnswerLocationJND.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"  -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui"</Command>\r
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>\r
+      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing AnswerLocationJND.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"  -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui"</Command>\r
+    </CustomBuild>\r
+    <ClInclude Include="GeneratedFiles\ui_AnswerLocationJND.h" />\r
+    <ClInclude Include="GeneratedFiles\ui_locationsjnd.h" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <CustomBuild Include="locationsjnd.qrc">\r
+      <FileType>Document</FileType>\r
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>\r
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rcc%27ing %(Identity)...</Message>\r
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs)</Outputs>\r
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp</Command>\r
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>\r
+      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rcc%27ing %(Identity)...</Message>\r
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs)</Outputs>\r
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp</Command>\r
+    </CustomBuild>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <CustomBuild Include="AnswerLocationJND.ui">\r
+      <FileType>Document</FileType>\r
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>\r
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Uic%27ing %(Identity)...</Message>\r
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>\r
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>\r
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>\r
+      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Uic%27ing %(Identity)...</Message>\r
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>\r
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>\r
+    </CustomBuild>\r
+  </ItemGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+  <ImportGroup Label="ExtensionTargets">\r
+  </ImportGroup>\r
+  <ProjectExtensions>\r
+    <VisualStudio>\r
+      <UserProperties UicDir=".\GeneratedFiles" MocDir=".\GeneratedFiles\$(ConfigurationName)" MocOptions="" RccDir=".\GeneratedFiles" lupdateOnBuild="0" lupdateOptions="" lreleaseOptions="" QtVersion_x0020_Win32="4.8.2" />\r
+    </VisualStudio>\r
+  </ProjectExtensions>\r
+</Project>
\ No newline at end of file
diff --git a/LocationsJND/locationsjnd.cpp b/LocationsJND/locationsjnd.cpp
new file mode 100644 (file)
index 0000000..4c76284
--- /dev/null
@@ -0,0 +1,21 @@
+#include "locationsjnd.h"\r
+\r
+LocationsJND::LocationsJND(QWidget *parent, Qt::WFlags flags)\r
+: QMainWindow(parent, flags), _w()\r
+{\r
+       setupUi(this);\r
+\r
+       connect(_start, SIGNAL(pressed()), this, SLOT(startExperiment()));\r
+}\r
+\r
+LocationsJND::~LocationsJND()\r
+{\r
+\r
+}\r
+\r
+void LocationsJND::startExperiment()\r
+{\r
+       _w.init(_user->text(), _v0->currentText(), _reversals->value(), _frequency->value(), _duration->value(), _deltadown->value());\r
+       _w.show();\r
+       this->hide();\r
+}\r
diff --git a/LocationsJND/locationsjnd.h b/LocationsJND/locationsjnd.h
new file mode 100644 (file)
index 0000000..f0c8b3c
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef LOCATIONSJND_H\r
+#define LOCATIONSJND_H\r
+\r
+#include <QtGui/QMainWindow>\r
+#include "ui_locationsjnd.h"\r
+\r
+#include "AnswerLocationJND.h"\r
+\r
+class LocationsJND : public QMainWindow, Ui::LocationsJNDClass\r
+{\r
+       Q_OBJECT\r
+\r
+       public:\r
+               LocationsJND(QWidget *parent = 0, Qt::WFlags flags = 0);\r
+               ~LocationsJND();\r
+\r
+       private slots:\r
+               void startExperiment();\r
+\r
+       private:\r
+               AnswerLocationJND _w;\r
+};\r
+\r
+#endif // LOCATIONSJND_H\r
diff --git a/LocationsJND/locationsjnd.qrc b/LocationsJND/locationsjnd.qrc
new file mode 100644 (file)
index 0000000..df71d03
--- /dev/null
@@ -0,0 +1,4 @@
+<RCC>\r
+    <qresource prefix="LocationsJND">\r
+    </qresource>\r
+</RCC>\r
diff --git a/LocationsJND/locationsjnd.ui b/LocationsJND/locationsjnd.ui
new file mode 100644 (file)
index 0000000..560b550
--- /dev/null
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<ui version="4.0">\r
+ <class>LocationsJNDClass</class>\r
+ <widget class="QMainWindow" name="LocationsJNDClass">\r
+  <property name="geometry">\r
+   <rect>\r
+    <x>0</x>\r
+    <y>0</y>\r
+    <width>191</width>\r
+    <height>199</height>\r
+   </rect>\r
+  </property>\r
+  <property name="windowTitle">\r
+   <string>LocationsJND</string>\r
+  </property>\r
+  <widget class="QWidget" name="centralWidget">\r
+   <layout class="QVBoxLayout" name="verticalLayout">\r
+    <item>\r
+     <layout class="QFormLayout" name="formLayout">\r
+      <property name="fieldGrowthPolicy">\r
+       <enum>QFormLayout::AllNonFixedFieldsGrow</enum>\r
+      </property>\r
+      <item row="0" column="0">\r
+       <widget class="QLabel" name="userLabel">\r
+        <property name="text">\r
+         <string>User</string>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+      <item row="0" column="1">\r
+       <widget class="QLineEdit" name="_user"/>\r
+      </item>\r
+      <item row="1" column="0">\r
+       <widget class="QLabel" name="vibratorTestLabel">\r
+        <property name="text">\r
+         <string>Vibrator test</string>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+      <item row="1" column="1">\r
+       <widget class="QComboBox" name="_v0">\r
+        <item>\r
+         <property name="text">\r
+          <string>Down</string>\r
+         </property>\r
+        </item>\r
+        <item>\r
+         <property name="text">\r
+          <string>Top</string>\r
+         </property>\r
+        </item>\r
+        <item>\r
+         <property name="text">\r
+          <string>Left</string>\r
+         </property>\r
+        </item>\r
+        <item>\r
+         <property name="text">\r
+          <string>Right</string>\r
+         </property>\r
+        </item>\r
+       </widget>\r
+      </item>\r
+      <item row="3" column="0">\r
+       <widget class="QLabel" name="frequencyLabel">\r
+        <property name="text">\r
+         <string>Frequency</string>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+      <item row="3" column="1">\r
+       <widget class="QSpinBox" name="_frequency">\r
+        <property name="minimum">\r
+         <number>1</number>\r
+        </property>\r
+        <property name="maximum">\r
+         <number>500</number>\r
+        </property>\r
+        <property name="value">\r
+         <number>300</number>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+      <item row="4" column="0">\r
+       <widget class="QLabel" name="durationLabel">\r
+        <property name="text">\r
+         <string>Duration</string>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+      <item row="4" column="1">\r
+       <widget class="QSpinBox" name="_duration">\r
+        <property name="minimum">\r
+         <number>1</number>\r
+        </property>\r
+        <property name="maximum">\r
+         <number>10000</number>\r
+        </property>\r
+        <property name="singleStep">\r
+         <number>100</number>\r
+        </property>\r
+        <property name="value">\r
+         <number>200</number>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+      <item row="5" column="0">\r
+       <widget class="QLabel" name="deltaDownLabel">\r
+        <property name="text">\r
+         <string>Delta down</string>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+      <item row="5" column="1">\r
+       <widget class="QDoubleSpinBox" name="_deltadown">\r
+        <property name="maximum">\r
+         <double>1.000000000000000</double>\r
+        </property>\r
+        <property name="singleStep">\r
+         <double>0.010000000000000</double>\r
+        </property>\r
+        <property name="value">\r
+         <double>0.050000000000000</double>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+      <item row="2" column="0">\r
+       <widget class="QLabel" name="reversalsLabel">\r
+        <property name="text">\r
+         <string>Reversals</string>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+      <item row="2" column="1">\r
+       <widget class="QSpinBox" name="_reversals">\r
+        <property name="maximum">\r
+         <number>100</number>\r
+        </property>\r
+        <property name="value">\r
+         <number>8</number>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+     </layout>\r
+    </item>\r
+    <item>\r
+     <widget class="QPushButton" name="_start">\r
+      <property name="text">\r
+       <string>Start</string>\r
+      </property>\r
+     </widget>\r
+    </item>\r
+   </layout>\r
+  </widget>\r
+ </widget>\r
+ <layoutdefault spacing="6" margin="11"/>\r
+ <resources>\r
+  <include location="locationsjnd.qrc"/>\r
+ </resources>\r
+ <connections/>\r
+</ui>\r
diff --git a/LocationsJND/main.cpp b/LocationsJND/main.cpp
new file mode 100644 (file)
index 0000000..33b643d
--- /dev/null
@@ -0,0 +1,10 @@
+#include "locationsjnd.h"\r
+#include <QtGui/QApplication>\r
+\r
+int main(int argc, char *argv[])\r
+{\r
+       QApplication a(argc, argv);\r
+       LocationsJND w;\r
+       w.show();\r
+       return a.exec();\r
+}\r
index f82932c7f82bbd9e418c23eba54b93808c4918b2..1bd03a995dff8e53ba6026ba01a8357fed789b08 100644 (file)
Binary files a/Tactons Experiment.sdf and b/Tactons Experiment.sdf differ
index ad560255a2fdf423b631331978ff5955a6de62f5..ce529ed812e5dc97c4c61f1c60e7d6e3a40aa561 100644 (file)
@@ -9,6 +9,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tactons patterns", "Tactons
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tactons Detection", "Tactons Detection\Tactons Detection.vcxproj", "{EC926972-4F08-4721-A572-B278203C092D}"\r
 EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LocationsJND", "LocationsJND\LocationsJND.vcxproj", "{9B8D15C2-0F04-4BCE-A3A4-211FCAB1C503}"\r
+EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
                Debug|Win32 = Debug|Win32\r
@@ -31,6 +33,10 @@ Global
                {EC926972-4F08-4721-A572-B278203C092D}.Debug|Win32.Build.0 = Debug|Win32\r
                {EC926972-4F08-4721-A572-B278203C092D}.Release|Win32.ActiveCfg = Release|Win32\r
                {EC926972-4F08-4721-A572-B278203C092D}.Release|Win32.Build.0 = Release|Win32\r
+               {9B8D15C2-0F04-4BCE-A3A4-211FCAB1C503}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {9B8D15C2-0F04-4BCE-A3A4-211FCAB1C503}.Debug|Win32.Build.0 = Debug|Win32\r
+               {9B8D15C2-0F04-4BCE-A3A4-211FCAB1C503}.Release|Win32.ActiveCfg = Release|Win32\r
+               {9B8D15C2-0F04-4BCE-A3A4-211FCAB1C503}.Release|Win32.Build.0 = Release|Win32\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
index 9e29c4bdec42595610adc05d260c55b13a26ae50..4086475ac6ca0d9a77394f761c6c88bf9c7a322b 100644 (file)
Binary files a/Tactons Experiment.suo and b/Tactons Experiment.suo differ
index 8fb9f8cb61799bc028da44c7e5e3ed115332b6b6..1a5948685ac8dc2a1a1800a627f786de45c18904 100644 (file)
@@ -44,7 +44,7 @@
   </PropertyGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <ClCompile>\r
-      <PreprocessorDefinitions>UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_CORE_LIB;QT_GUI_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions>UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_CORE_LIB;QT_GUI_LIB;QT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <AdditionalIncludeDirectories>.\GeneratedFiles;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\qtmain;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;.\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <Optimization>Disabled</Optimization>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
@@ -62,7 +62,7 @@
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <ClCompile>\r
-      <PreprocessorDefinitions>UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions>UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;QT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <AdditionalIncludeDirectories>.\GeneratedFiles;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\qtmain;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;.\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <DebugInformationFormat>\r
       </DebugInformationFormat>\r
       <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>\r
       <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing %(Identity)...</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"   -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB  "-I." "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I." "-I." "-I." "tactonsjnd.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"</Command>\r
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_DLL  "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I."</Command>\r
       <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>\r
       <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing %(Identity)...</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"   -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB  "-I." "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I." "-I." "-I." "tactonsjnd.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"</Command>\r
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_DLL  "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I."</Command>\r
     </CustomBuild>\r
   </ItemGroup>\r
   <ItemGroup>\r
       <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>\r
       <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing %(Identity)...</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"  -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB "-I." "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I." "-I." "-I."</Command>\r
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_DLL  "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I."</Command>\r
       <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>\r
       <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing %(Identity)...</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"  -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB "-I." "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I." "-I." "-I."</Command>\r
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_DLL  "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I."</Command>\r
     </CustomBuild>\r
     <ClInclude Include="GeneratedFiles\ui_answer3AFC.h" />\r
     <ClInclude Include="GeneratedFiles\ui_tactonsjnd.h" />\r
   </ImportGroup>\r
   <ProjectExtensions>\r
     <VisualStudio>\r
-      <UserProperties UicDir=".\GeneratedFiles" MocDir=".\GeneratedFiles\$(ConfigurationName)" MocOptions="" RccDir=".\GeneratedFiles" lupdateOnBuild="0" lupdateOptions="" lreleaseOptions="" QtVersion_x0020_Win32="4.7.3" />\r
+      <UserProperties UicDir=".\GeneratedFiles" MocDir=".\GeneratedFiles\$(ConfigurationName)" MocOptions="" RccDir=".\GeneratedFiles" lupdateOnBuild="0" lupdateOptions="" lreleaseOptions="" QtVersion_x0020_Win32="4.8.2" />\r
     </VisualStudio>\r
   </ProjectExtensions>\r
 </Project>
\ No newline at end of file
index 13f7cda816717d7fd9a2bc14772e15881d682730..b441e964f3b2fee82162f5de5a71f4710fa8d4f7 100644 (file)
@@ -8,7 +8,7 @@
 \r
 Answer3AFC::Answer3AFC(QWidget *parent, Qt::WFlags flags)\r
 :QDialog(parent, flags),\r
-_logfile(NULL), _tactonPlayer("COM3"), _defaulttacton(0x0f, 200, 250, 0xff), \r
+_logfile(NULL), _tactonPlayer("COM4"), _defaulttacton(0x0f, 200, 250, 0xff), \r
 _currenttest(0.0), _goodanswer(-1), _block(0)\r
 {\r
        //init the window\r
@@ -135,12 +135,10 @@ void Answer3AFC::answer()
 {\r
        QPushButton *button = (QPushButton *)sender();\r
        int rep;\r
-       if (button->objectName() == "answer1")\r
+       if (button->objectName() == "_first")\r
                rep = 0;\r
-       else if (button->objectName() == "answer2")\r
+       else if (button->objectName() == "_second")\r
                rep = 1;\r
-       else if (button->objectName() == "answer3")\r
-               rep = 2;\r
 \r
        log(rep);\r
        _tplayed[0] = _tplayed[1] = _tplayed[2] = 0;\r