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 Jul 7, 2017
2 parents 07e3d6f + 02c5223 commit 738e6b2
Show file tree
Hide file tree
Showing 17 changed files with 345 additions and 89 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Change Log

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

**General**
- Added a menu item to check for latest releases of the battery (redirects to GitHub releases)

**Tasks**
- Added information about each task to [tasks/README.md](tasks/README.md).
- Added options to adjust Raven's trial count and starting position to Settings menu.
- Added option to play an audio beep after each task (default: True)

**Bug Fixes**
- Fixed a bug where the Raven's task was loading the images in an incorrect order.

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

**General**
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ for statistics
- Automatically import all task modules
- Automatically handle task running/saving
- No longer need to edit the main battery file to add your own tasks
- Add description/details for each task (number of trials, timings etc.)
- Save subject data to non-proprietary file format instead of Excel
- Likely to be CSV, but open to suggestions
- Add more tasks...
Expand Down
5 changes: 5 additions & 0 deletions designer/battery_window_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ def setupUi(self, CognitiveBattery):
self.actionAnalysis = QtWidgets.QAction(CognitiveBattery)
self.actionAnalysis.setEnabled(False)
self.actionAnalysis.setObjectName("actionAnalysis")
self.actionCheck_for_updates = QtWidgets.QAction(CognitiveBattery)
self.actionCheck_for_updates.setObjectName("actionCheck_for_updates")
self.menuFile.addAction(self.actionExit)
self.menuHelp.addAction(self.actionDocumentation)
self.menuHelp.addAction(self.actionLicense)
Expand All @@ -252,6 +254,7 @@ def setupUi(self, CognitiveBattery):
self.menuHelp.addAction(self.actionReport_Bug)
self.menuHelp.addAction(self.actionRequest_Feature)
self.menuHelp.addSeparator()
self.menuHelp.addAction(self.actionCheck_for_updates)
self.menuHelp.addAction(self.actionAbout)
self.menuOptions.addAction(self.actionSettings)
self.menubar.addAction(self.menuFile.menuAction())
Expand Down Expand Up @@ -330,4 +333,6 @@ def retranslateUi(self, CognitiveBattery):
self.actionAbout.setStatusTip(_translate("CognitiveBattery", "About the battery"))
self.actionAnalysis.setText(_translate("CognitiveBattery", "Analysis"))
self.actionAnalysis.setStatusTip(_translate("CognitiveBattery", "Calculate aggregate data for all tasks"))
self.actionCheck_for_updates.setText(_translate("CognitiveBattery", "Check for updates"))
self.actionCheck_for_updates.setStatusTip(_translate("CognitiveBattery", "Check for new releases of the battery"))

5 changes: 5 additions & 0 deletions designer/project_window_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ def setupUi(self, ProjectWindow):
self.actionRequest_Feature.setObjectName("actionRequest_Feature")
self.actionAbout = QtWidgets.QAction(ProjectWindow)
self.actionAbout.setObjectName("actionAbout")
self.actionCheck_for_updates = QtWidgets.QAction(ProjectWindow)
self.actionCheck_for_updates.setObjectName("actionCheck_for_updates")
self.menuProject.addAction(self.actionNewProject)
self.menuProject.addAction(self.actionExit)
self.menuHelp.addAction(self.actionDocumentation)
Expand All @@ -174,6 +176,7 @@ def setupUi(self, ProjectWindow):
self.menuHelp.addAction(self.actionReport_Bug)
self.menuHelp.addAction(self.actionRequest_Feature)
self.menuHelp.addSeparator()
self.menuHelp.addAction(self.actionCheck_for_updates)
self.menuHelp.addAction(self.actionAbout)
self.menubar.addAction(self.menuProject.menuAction())
self.menubar.addAction(self.menuHelp.menuAction())
Expand Down Expand Up @@ -216,4 +219,6 @@ def retranslateUi(self, ProjectWindow):
self.actionRequest_Feature.setStatusTip(_translate("ProjectWindow", "Request a feature"))
self.actionAbout.setText(_translate("ProjectWindow", "About"))
self.actionAbout.setStatusTip(_translate("ProjectWindow", "About the battery"))
self.actionCheck_for_updates.setText(_translate("ProjectWindow", "Check for updates"))
self.actionCheck_for_updates.setStatusTip(_translate("ProjectWindow", "Check for new releases of the battery"))

82 changes: 56 additions & 26 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, 243)
SettingsDialog.resize(415, 296)
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, 188))
self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 391, 241))
self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.scrollAreaWidgetContents)
self.verticalLayout_5.setContentsMargins(0, 0, 0, 0)
Expand All @@ -41,53 +41,56 @@ def setupUi(self, SettingsDialog):
self.settings_toolbox.setFont(font)
self.settings_toolbox.setFrameShape(QtWidgets.QFrame.NoFrame)
self.settings_toolbox.setObjectName("settings_toolbox")
self.task_windows_page = QtWidgets.QWidget()
self.task_windows_page.setGeometry(QtCore.QRect(0, 0, 373, 89))
self.general_page = QtWidgets.QWidget()
self.general_page.setGeometry(QtCore.QRect(0, 0, 373, 115))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.task_windows_page.sizePolicy().hasHeightForWidth())
self.task_windows_page.setSizePolicy(sizePolicy)
sizePolicy.setHeightForWidth(self.general_page.sizePolicy().hasHeightForWidth())
self.general_page.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.task_windows_page.setFont(font)
self.task_windows_page.setObjectName("task_windows_page")
self.verticalLayout_7 = QtWidgets.QVBoxLayout(self.task_windows_page)
self.general_page.setFont(font)
self.general_page.setObjectName("general_page")
self.verticalLayout_7 = QtWidgets.QVBoxLayout(self.general_page)
self.verticalLayout_7.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint)
self.verticalLayout_7.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_7.setSpacing(6)
self.verticalLayout_7.setObjectName("verticalLayout_7")
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setContentsMargins(10, -1, 10, -1)
self.verticalLayout.setObjectName("verticalLayout")
self.settings_task_fullscreen_checkbox = QtWidgets.QCheckBox(self.task_windows_page)
self.settings_general_layout = QtWidgets.QVBoxLayout()
self.settings_general_layout.setContentsMargins(10, -1, 10, -1)
self.settings_general_layout.setObjectName("settings_general_layout")
self.settings_task_fullscreen_checkbox = QtWidgets.QCheckBox(self.general_page)
self.settings_task_fullscreen_checkbox.setObjectName("settings_task_fullscreen_checkbox")
self.verticalLayout.addWidget(self.settings_task_fullscreen_checkbox)
self.settings_task_borderless_checkbox = QtWidgets.QCheckBox(self.task_windows_page)
self.settings_general_layout.addWidget(self.settings_task_fullscreen_checkbox)
self.settings_task_borderless_checkbox = QtWidgets.QCheckBox(self.general_page)
self.settings_task_borderless_checkbox.setObjectName("settings_task_borderless_checkbox")
self.verticalLayout.addWidget(self.settings_task_borderless_checkbox)
self.settings_general_layout.addWidget(self.settings_task_borderless_checkbox)
self.settings_task_size = QtWidgets.QHBoxLayout()
self.settings_task_size.setObjectName("settings_task_size")
self.settings_task_width_label = QtWidgets.QLabel(self.task_windows_page)
self.settings_task_width_label = QtWidgets.QLabel(self.general_page)
self.settings_task_width_label.setObjectName("settings_task_width_label")
self.settings_task_size.addWidget(self.settings_task_width_label)
self.settings_task_width_value = QtWidgets.QLineEdit(self.task_windows_page)
self.settings_task_width_value = QtWidgets.QLineEdit(self.general_page)
self.settings_task_width_value.setObjectName("settings_task_width_value")
self.settings_task_size.addWidget(self.settings_task_width_value)
self.settings_task_height_label = QtWidgets.QLabel(self.task_windows_page)
self.settings_task_height_label = QtWidgets.QLabel(self.general_page)
self.settings_task_height_label.setObjectName("settings_task_height_label")
self.settings_task_size.addWidget(self.settings_task_height_label)
self.settings_task_height_value = QtWidgets.QLineEdit(self.task_windows_page)
self.settings_task_height_value = QtWidgets.QLineEdit(self.general_page)
self.settings_task_height_value.setObjectName("settings_task_height_value")
self.settings_task_size.addWidget(self.settings_task_height_value)
self.verticalLayout.addLayout(self.settings_task_size)
self.verticalLayout_7.addLayout(self.verticalLayout)
self.settings_general_layout.addLayout(self.settings_task_size)
self.settings_task_beep_checkbox = QtWidgets.QCheckBox(self.general_page)
self.settings_task_beep_checkbox.setObjectName("settings_task_beep_checkbox")
self.settings_general_layout.addWidget(self.settings_task_beep_checkbox)
self.verticalLayout_7.addLayout(self.settings_general_layout)
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.verticalLayout_7.addItem(spacerItem)
self.settings_toolbox.addItem(self.task_windows_page, "")
self.settings_toolbox.addItem(self.general_page, "")
self.ant_page = QtWidgets.QWidget()
self.ant_page.setGeometry(QtCore.QRect(0, 0, 373, 89))
self.ant_page.setGeometry(QtCore.QRect(0, 0, 373, 115))
self.ant_page.setObjectName("ant_page")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.ant_page)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
Expand All @@ -103,7 +106,30 @@ 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.ravens_page = QtWidgets.QWidget()
self.ravens_page.setObjectName("ravens_page")
self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.ravens_page)
self.verticalLayout_4.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_4.setObjectName("verticalLayout_4")
self.formLayout = QtWidgets.QFormLayout()
self.formLayout.setContentsMargins(10, -1, 10, -1)
self.formLayout.setObjectName("formLayout")
self.settings_ravens_start_label = QtWidgets.QLabel(self.ravens_page)
self.settings_ravens_start_label.setObjectName("settings_ravens_start_label")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.settings_ravens_start_label)
self.settings_ravens_start_value = QtWidgets.QLineEdit(self.ravens_page)
self.settings_ravens_start_value.setObjectName("settings_ravens_start_value")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.settings_ravens_start_value)
self.settings_ravens_trials_label = QtWidgets.QLabel(self.ravens_page)
self.settings_ravens_trials_label.setObjectName("settings_ravens_trials_label")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.settings_ravens_trials_label)
self.settings_ravens_trials_value = QtWidgets.QLineEdit(self.ravens_page)
self.settings_ravens_trials_value.setObjectName("settings_ravens_trials_value")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.settings_ravens_trials_value)
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.setObjectName("sternberg_page")
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.sternberg_page)
self.verticalLayout_3.setContentsMargins(0, 0, 0, 0)
Expand Down Expand Up @@ -136,7 +162,7 @@ def setupUi(self, SettingsDialog):
self.verticalLayout_2.addLayout(self.settings_main_layout)

self.retranslateUi(SettingsDialog)
self.settings_toolbox.setCurrentIndex(2)
self.settings_toolbox.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(SettingsDialog)

def retranslateUi(self, SettingsDialog):
Expand All @@ -148,9 +174,13 @@ def retranslateUi(self, SettingsDialog):
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_toolbox.setItemText(self.settings_toolbox.indexOf(self.task_windows_page), _translate("SettingsDialog", "Task Windows"))
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_toolbox.setItemText(self.settings_toolbox.indexOf(self.ant_page), _translate("SettingsDialog", "Attention Network Test"))
self.settings_ravens_start_label.setText(_translate("SettingsDialog", "Starting image #:"))
self.settings_ravens_trials_label.setText(_translate("SettingsDialog", "Number of trials:"))
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_toolbox.setItemText(self.settings_toolbox.indexOf(self.sternberg_page), _translate("SettingsDialog", "Sternberg Task"))
self.settings_save_button.setStatusTip(_translate("SettingsDialog", "Save settings"))
Expand Down
9 changes: 9 additions & 0 deletions designer/ui/battery_window_qt.ui
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@
<addaction name="actionReport_Bug"/>
<addaction name="actionRequest_Feature"/>
<addaction name="separator"/>
<addaction name="actionCheck_for_updates"/>
<addaction name="actionAbout"/>
</widget>
<widget class="QMenu" name="menuOptions">
Expand Down Expand Up @@ -579,6 +580,14 @@
<string>Calculate aggregate data for all tasks</string>
</property>
</action>
<action name="actionCheck_for_updates">
<property name="text">
<string>Check for updates</string>
</property>
<property name="statusTip">
<string>Check for new releases of the battery</string>
</property>
</action>
</widget>
<resources/>
<connections/>
Expand Down
9 changes: 9 additions & 0 deletions designer/ui/project_window_qt.ui
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@
<addaction name="actionReport_Bug"/>
<addaction name="actionRequest_Feature"/>
<addaction name="separator"/>
<addaction name="actionCheck_for_updates"/>
<addaction name="actionAbout"/>
</widget>
<addaction name="menuProject"/>
Expand Down Expand Up @@ -377,6 +378,14 @@
<string>About the battery</string>
</property>
</action>
<action name="actionCheck_for_updates">
<property name="text">
<string>Check for updates</string>
</property>
<property name="statusTip">
<string>Check for new releases of the battery</string>
</property>
</action>
</widget>
<resources/>
<connections/>
Expand Down
Loading

0 comments on commit 738e6b2

Please sign in to comment.