Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Ho committed Sep 14, 2017
2 parents e92d658 + 5850fe2 commit 6c804d6
Show file tree
Hide file tree
Showing 16 changed files with 988 additions and 198 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Change Log

## [3.2.0](https://github.com/sho-87/cognitive-battery/releases/tag/3.2.0) *(2017-09-14)*

**General**
- Added tooltips to the Settings window items to clarify the purpose of each option.
- App-wide values moved to separate module (e.g. URLs).
- Streamlined the setting of default values for task options.
- Added placeholder scripts for aggregating task data.
- Fixed a few typos.

**Tasks**
- Added Eriksen Flanker task.

**Bug Fixes**
- Fixed a bug where settings for new tasks are not read/saved if `settings.ini` already exists.

## [3.1.0](https://github.com/sho-87/cognitive-battery/releases/tag/3.1.0) *(2017-07-06)*

**General**
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Simon Ho
Copyright (c) 2017 Simon Ho

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ Currently implemented tasks:
- Based on the version used by
[Berman et al. (2008)](http://pss.sagepub.com/content/19/12/1207) and
[Bourrier (2015)](https://open.library.ubc.ca/cIRcle/collections/ubctheses/24/items/1.0166677)
* **Eriksen Flanker Task**
- Based on the compatible and incompatible versions by [Hillman et al. (2006)](http://psycnet.apa.org/record/2006-20659-003) and
[Pontifex et al. (2011)](https://www.ncbi.nlm.nih.gov/pubmed/20521857)
* **Mental Rotation Task**
- Based on the redrawn version by
[Peters et al. (1995)](http://www.ncbi.nlm.nih.gov/pubmed/7546667)
Expand Down
11 changes: 8 additions & 3 deletions designer/battery_window_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ def setupUi(self, CognitiveBattery):
item = QtWidgets.QListWidgetItem()
item.setCheckState(QtCore.Qt.Unchecked)
self.taskList.addItem(item)
item = QtWidgets.QListWidgetItem()
item.setCheckState(QtCore.Qt.Unchecked)
self.taskList.addItem(item)
self.taskListLayout.addWidget(self.taskList)
self.reorderButtonLayout = QtWidgets.QVBoxLayout()
self.reorderButtonLayout.setContentsMargins(0, -1, -1, -1)
Expand Down Expand Up @@ -294,12 +297,14 @@ def retranslateUi(self, CognitiveBattery):
item = self.taskList.item(1)
item.setText(_translate("CognitiveBattery", "Digit Span (backwards)"))
item = self.taskList.item(2)
item.setText(_translate("CognitiveBattery", "Mental Rotation Task"))
item.setText(_translate("CognitiveBattery", "Eriksen Flanker Task"))
item = self.taskList.item(3)
item.setText(_translate("CognitiveBattery", "Raven\'s Progressive Matrices"))
item.setText(_translate("CognitiveBattery", "Mental Rotation Task"))
item = self.taskList.item(4)
item.setText(_translate("CognitiveBattery", "Sternberg Task"))
item.setText(_translate("CognitiveBattery", "Raven\'s Progressive Matrices"))
item = self.taskList.item(5)
item.setText(_translate("CognitiveBattery", "Sternberg Task"))
item = self.taskList.item(6)
item.setText(_translate("CognitiveBattery", "Sustained Attention to Response Task (SART)"))
self.taskList.setSortingEnabled(__sortingEnabled)
self.upButton.setStatusTip(_translate("CognitiveBattery", "Move selected task up in order of administration"))
Expand Down
91 changes: 86 additions & 5 deletions designer/settings_window_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Ui_SettingsDialog(object):
def setupUi(self, SettingsDialog):
SettingsDialog.setObjectName("SettingsDialog")
SettingsDialog.setWindowModality(QtCore.Qt.ApplicationModal)
SettingsDialog.resize(415, 296)
SettingsDialog.resize(409, 414)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
Expand All @@ -29,7 +29,7 @@ def setupUi(self, SettingsDialog):
self.scrollArea.setWidgetResizable(True)
self.scrollArea.setObjectName("scrollArea")
self.scrollAreaWidgetContents = QtWidgets.QWidget()
self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 391, 241))
self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 385, 359))
self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.scrollAreaWidgetContents)
self.verticalLayout_5.setContentsMargins(0, 0, 0, 0)
Expand All @@ -42,7 +42,7 @@ def setupUi(self, SettingsDialog):
self.settings_toolbox.setFrameShape(QtWidgets.QFrame.NoFrame)
self.settings_toolbox.setObjectName("settings_toolbox")
self.general_page = QtWidgets.QWidget()
self.general_page.setGeometry(QtCore.QRect(0, 0, 373, 115))
self.general_page.setGeometry(QtCore.QRect(0, 0, 367, 206))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
Expand Down Expand Up @@ -90,7 +90,7 @@ def setupUi(self, SettingsDialog):
self.verticalLayout_7.addItem(spacerItem)
self.settings_toolbox.addItem(self.general_page, "")
self.ant_page = QtWidgets.QWidget()
self.ant_page.setGeometry(QtCore.QRect(0, 0, 373, 115))
self.ant_page.setGeometry(QtCore.QRect(0, 0, 367, 206))
self.ant_page.setObjectName("ant_page")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.ant_page)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
Expand All @@ -106,7 +106,63 @@ def setupUi(self, SettingsDialog):
self.ant_form.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.settings_ant_blocks_value)
self.horizontalLayout.addLayout(self.ant_form)
self.settings_toolbox.addItem(self.ant_page, "")
self.flanker_page = QtWidgets.QWidget()
self.flanker_page.setGeometry(QtCore.QRect(0, 0, 367, 206))
self.flanker_page.setObjectName("flanker_page")
self.verticalLayout = QtWidgets.QVBoxLayout(self.flanker_page)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setObjectName("verticalLayout")
self.flanker_form = QtWidgets.QFormLayout()
self.flanker_form.setContentsMargins(10, -1, 10, -1)
self.flanker_form.setObjectName("flanker_form")
self.settings_flanker_dark = QtWidgets.QCheckBox(self.flanker_page)
self.settings_flanker_dark.setObjectName("settings_flanker_dark")
self.flanker_form.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.settings_flanker_dark)
self.settings_flanker_compat_label = QtWidgets.QLabel(self.flanker_page)
self.settings_flanker_compat_label.setObjectName("settings_flanker_compat_label")
self.flanker_form.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.settings_flanker_compat_label)
self.settings_flanker_compat_value = QtWidgets.QLineEdit(self.flanker_page)
self.settings_flanker_compat_value.setObjectName("settings_flanker_compat_value")
self.flanker_form.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.settings_flanker_compat_value)
self.settings_flanker_incompat_label = QtWidgets.QLabel(self.flanker_page)
self.settings_flanker_incompat_label.setObjectName("settings_flanker_incompat_label")
self.flanker_form.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.settings_flanker_incompat_label)
self.settings_flanker_incompat_value = QtWidgets.QLineEdit(self.flanker_page)
self.settings_flanker_incompat_value.setObjectName("settings_flanker_incompat_value")
self.flanker_form.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.settings_flanker_incompat_value)
self.settings_flanker_order_label = QtWidgets.QLabel(self.flanker_page)
self.settings_flanker_order_label.setObjectName("settings_flanker_order_label")
self.flanker_form.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.settings_flanker_order_label)
self.settings_flanker_order_group = QtWidgets.QVBoxLayout()
self.settings_flanker_order_group.setObjectName("settings_flanker_order_group")
self.settings_flanker_order_compat = QtWidgets.QRadioButton(self.flanker_page)
self.settings_flanker_order_compat.setCheckable(True)
self.settings_flanker_order_compat.setChecked(True)
self.settings_flanker_order_compat.setObjectName("settings_flanker_order_compat")
self.settings_flanker_order_group.addWidget(self.settings_flanker_order_compat)
self.settings_flanker_order_incompat = QtWidgets.QRadioButton(self.flanker_page)
self.settings_flanker_order_incompat.setObjectName("settings_flanker_order_incompat")
self.settings_flanker_order_group.addWidget(self.settings_flanker_order_incompat)
self.settings_flanker_order_choose = QtWidgets.QRadioButton(self.flanker_page)
self.settings_flanker_order_choose.setObjectName("settings_flanker_order_choose")
self.settings_flanker_order_group.addWidget(self.settings_flanker_order_choose)
self.flanker_form.setLayout(5, QtWidgets.QFormLayout.FieldRole, self.settings_flanker_order_group)
self.settings_flanker_practice_sets_label = QtWidgets.QLabel(self.flanker_page)
self.settings_flanker_practice_sets_label.setObjectName("settings_flanker_practice_sets_label")
self.flanker_form.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.settings_flanker_practice_sets_label)
self.settings_flanker_main_sets_label = QtWidgets.QLabel(self.flanker_page)
self.settings_flanker_main_sets_label.setObjectName("settings_flanker_main_sets_label")
self.flanker_form.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.settings_flanker_main_sets_label)
self.settings_flanker_practice_sets_value = QtWidgets.QLineEdit(self.flanker_page)
self.settings_flanker_practice_sets_value.setObjectName("settings_flanker_practice_sets_value")
self.flanker_form.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.settings_flanker_practice_sets_value)
self.settings_flanker_main_sets_value = QtWidgets.QLineEdit(self.flanker_page)
self.settings_flanker_main_sets_value.setObjectName("settings_flanker_main_sets_value")
self.flanker_form.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.settings_flanker_main_sets_value)
self.verticalLayout.addLayout(self.flanker_form)
self.settings_toolbox.addItem(self.flanker_page, "")
self.ravens_page = QtWidgets.QWidget()
self.ravens_page.setGeometry(QtCore.QRect(0, 0, 367, 206))
self.ravens_page.setObjectName("ravens_page")
self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.ravens_page)
self.verticalLayout_4.setContentsMargins(0, 0, 0, 0)
Expand All @@ -129,7 +185,7 @@ def setupUi(self, SettingsDialog):
self.verticalLayout_4.addLayout(self.formLayout)
self.settings_toolbox.addItem(self.ravens_page, "")
self.sternberg_page = QtWidgets.QWidget()
self.sternberg_page.setGeometry(QtCore.QRect(0, 0, 373, 115))
self.sternberg_page.setGeometry(QtCore.QRect(0, 0, 367, 206))
self.sternberg_page.setObjectName("sternberg_page")
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.sternberg_page)
self.verticalLayout_3.setContentsMargins(0, 0, 0, 0)
Expand Down Expand Up @@ -168,20 +224,45 @@ def setupUi(self, SettingsDialog):
def retranslateUi(self, SettingsDialog):
_translate = QtCore.QCoreApplication.translate
SettingsDialog.setWindowTitle(_translate("SettingsDialog", "Settings"))
self.settings_task_fullscreen_checkbox.setToolTip(_translate("SettingsDialog", "Show tasks in fullscreen mode"))
self.settings_task_fullscreen_checkbox.setText(_translate("SettingsDialog", "Fullscreen"))
self.settings_task_borderless_checkbox.setToolTip(_translate("SettingsDialog", "Show tasks in a borderless window"))
self.settings_task_borderless_checkbox.setText(_translate("SettingsDialog", "Borderless"))
self.settings_task_width_label.setText(_translate("SettingsDialog", "Width:"))
self.settings_task_width_value.setStatusTip(_translate("SettingsDialog", "Width of the task windows"))
self.settings_task_height_label.setText(_translate("SettingsDialog", "Height:"))
self.settings_task_height_value.setStatusTip(_translate("SettingsDialog", "Height of the task windows"))
self.settings_task_beep_checkbox.setToolTip(_translate("SettingsDialog", "Play audible beep at the completion of each task"))
self.settings_task_beep_checkbox.setText(_translate("SettingsDialog", "Play beep after each task"))
self.settings_toolbox.setItemText(self.settings_toolbox.indexOf(self.general_page), _translate("SettingsDialog", "General"))
self.settings_ant_blocks_label.setText(_translate("SettingsDialog", "Number of blocks:"))
self.settings_ant_blocks_value.setToolTip(_translate("SettingsDialog", "Total number of blocks used in the task"))
self.settings_toolbox.setItemText(self.settings_toolbox.indexOf(self.ant_page), _translate("SettingsDialog", "Attention Network Test"))
self.settings_flanker_dark.setToolTip(_translate("SettingsDialog", "Use dark colour scheme. White text on black background"))
self.settings_flanker_dark.setText(_translate("SettingsDialog", "Dark mode"))
self.settings_flanker_compat_label.setText(_translate("SettingsDialog", "Number of compatible blocks:"))
self.settings_flanker_compat_value.setToolTip(_translate("SettingsDialog", "Compatible block: respond in direction of center arrow"))
self.settings_flanker_incompat_label.setText(_translate("SettingsDialog", "Number of incompatible blocks:"))
self.settings_flanker_incompat_value.setToolTip(_translate("SettingsDialog", "Incompatible block: respond in opposite direction to center arrow"))
self.settings_flanker_order_label.setText(_translate("SettingsDialog", "Block order:"))
self.settings_flanker_order_compat.setToolTip(_translate("SettingsDialog", "Display compatible blocks first"))
self.settings_flanker_order_compat.setText(_translate("SettingsDialog", "Compatible first"))
self.settings_flanker_order_incompat.setToolTip(_translate("SettingsDialog", "Display incompatible blocks first"))
self.settings_flanker_order_incompat.setText(_translate("SettingsDialog", "Incompatible first"))
self.settings_flanker_order_choose.setToolTip(_translate("SettingsDialog", "Choose block order when task starts"))
self.settings_flanker_order_choose.setText(_translate("SettingsDialog", "Choose"))
self.settings_flanker_practice_sets_label.setText(_translate("SettingsDialog", "Number of sets per practice block:"))
self.settings_flanker_main_sets_label.setText(_translate("SettingsDialog", "Number of sets per main block:"))
self.settings_flanker_practice_sets_value.setToolTip(_translate("SettingsDialog", "Number of set repeats per practice block. 1 set = 4 trials (all combinations)"))
self.settings_flanker_main_sets_value.setToolTip(_translate("SettingsDialog", "Number of set repeats per main block. 1 set = 4 trials (all combinations)"))
self.settings_toolbox.setItemText(self.settings_toolbox.indexOf(self.flanker_page), _translate("SettingsDialog", "Eriksen Flanker Task"))
self.settings_ravens_start_label.setText(_translate("SettingsDialog", "Starting image #:"))
self.settings_ravens_start_value.setToolTip(_translate("SettingsDialog", "First image of the Raven\'s image set to be shown"))
self.settings_ravens_trials_label.setText(_translate("SettingsDialog", "Number of trials:"))
self.settings_ravens_trials_value.setToolTip(_translate("SettingsDialog", "Number of total images to show, starting from the start image #"))
self.settings_toolbox.setItemText(self.settings_toolbox.indexOf(self.ravens_page), _translate("SettingsDialog", "Raven\'s Progressive Matrices"))
self.settings_sternberg_blocks_label.setText(_translate("SettingsDialog", "Number of blocks:"))
self.settings_sternberg_blocks_value.setToolTip(_translate("SettingsDialog", "Total number of blocks used in the task"))
self.settings_toolbox.setItemText(self.settings_toolbox.indexOf(self.sternberg_page), _translate("SettingsDialog", "Sternberg Task"))
self.settings_save_button.setStatusTip(_translate("SettingsDialog", "Save settings"))
self.settings_save_button.setText(_translate("SettingsDialog", "Save"))
Expand Down
8 changes: 8 additions & 0 deletions designer/ui/battery_window_qt.ui
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,14 @@
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string>Eriksen Flanker Task</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string>Mental Rotation Task</string>
Expand Down
Loading

0 comments on commit 6c804d6

Please sign in to comment.