boris-behav-obs 8.27__tar.gz → 8.27.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/PKG-INFO +1 -1
  2. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/about.py +1 -1
  3. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/observation_operations.py +7 -5
  4. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/project.py +58 -20
  5. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/select_modifiers.py +6 -5
  6. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/version.py +2 -2
  7. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris_behav_obs.egg-info/PKG-INFO +1 -1
  8. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/pyproject.toml +2 -2
  9. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/LICENSE.TXT +0 -0
  10. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/MANIFEST.in +0 -0
  11. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/README.TXT +0 -0
  12. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/README.rst +0 -0
  13. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/__init__.py +0 -0
  14. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/__main__.py +0 -0
  15. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/add_modifier.py +0 -0
  16. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/add_modifier_ui.py +0 -0
  17. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/advanced_event_filtering.py +0 -0
  18. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/behav_coding_map_creator.py +0 -0
  19. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/behavior_binary_table.py +0 -0
  20. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/behaviors_coding_map.py +0 -0
  21. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/boris_cli.py +0 -0
  22. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/cmd_arguments.py +0 -0
  23. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/coding_pad.py +0 -0
  24. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/config.py +0 -0
  25. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/config_file.py +0 -0
  26. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/connections.py +0 -0
  27. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/converters.py +0 -0
  28. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/converters_ui.py +0 -0
  29. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/cooccurence.py +0 -0
  30. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/core.py +0 -0
  31. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/core_qrc.py +0 -0
  32. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/core_ui.py +0 -0
  33. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/db_functions.py +0 -0
  34. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/dev.py +0 -0
  35. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/dialog.py +0 -0
  36. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/duration_widget.py +0 -0
  37. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/edit_event.py +0 -0
  38. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/edit_event_ui.py +0 -0
  39. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/event_operations.py +0 -0
  40. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/events_cursor.py +0 -0
  41. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/events_snapshots.py +0 -0
  42. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/exclusion_matrix.py +0 -0
  43. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/export_events.py +0 -0
  44. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/export_observation.py +0 -0
  45. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/external_processes.py +0 -0
  46. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/geometric_measurement.py +0 -0
  47. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/gui_utilities.py +0 -0
  48. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/image_overlay.py +0 -0
  49. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/import_observations.py +0 -0
  50. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/irr.py +0 -0
  51. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/latency.py +0 -0
  52. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/map_creator.py +0 -0
  53. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/measurement_widget.py +0 -0
  54. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/media_file.py +0 -0
  55. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/menu_options.py +0 -0
  56. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/modifiers_coding_map.py +0 -0
  57. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/mpv.py +0 -0
  58. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/mpv2.py +0 -0
  59. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/observation.py +0 -0
  60. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/observation_ui.py +0 -0
  61. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/observations_list.py +0 -0
  62. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/otx_parser.py +0 -0
  63. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/param_panel.py +0 -0
  64. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/param_panel_ui.py +0 -0
  65. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/player_dock_widget.py +0 -0
  66. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/plot_data_module.py +0 -0
  67. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/plot_events.py +0 -0
  68. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/plot_events_rt.py +0 -0
  69. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/plot_spectrogram_rt.py +0 -0
  70. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/plot_waveform_rt.py +0 -0
  71. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/portion/__init__.py +0 -0
  72. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/portion/const.py +0 -0
  73. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/portion/dict.py +0 -0
  74. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/portion/func.py +0 -0
  75. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/portion/interval.py +0 -0
  76. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/portion/io.py +0 -0
  77. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/preferences.py +0 -0
  78. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/preferences_ui.py +0 -0
  79. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/project_functions.py +0 -0
  80. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/project_import_export.py +0 -0
  81. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/project_ui.py +0 -0
  82. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/qdarkstyle/__init__.py +0 -0
  83. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/qdarkstyle/__main__.py +0 -0
  84. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/qdarkstyle/colorsystem.py +0 -0
  85. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/qdarkstyle/dark/__init__.py +0 -0
  86. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/qdarkstyle/dark/darkstyle_rc.py +0 -0
  87. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/qdarkstyle/dark/palette.py +0 -0
  88. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/qdarkstyle/example/__init__.py +0 -0
  89. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/qdarkstyle/example/__main__.py +0 -0
  90. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/qdarkstyle/example/ui/__init__.py +0 -0
  91. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/qdarkstyle/light/__init__.py +0 -0
  92. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/qdarkstyle/light/lightstyle_rc.py +0 -0
  93. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/qdarkstyle/light/palette.py +0 -0
  94. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/qdarkstyle/palette.py +0 -0
  95. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/qdarkstyle/utils/__init__.py +0 -0
  96. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/qdarkstyle/utils/__main__.py +0 -0
  97. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/qdarkstyle/utils/images.py +0 -0
  98. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/qdarkstyle/utils/scss.py +0 -0
  99. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/qrc_boris.py +0 -0
  100. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/qrc_boris5.py +0 -0
  101. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/select_observations.py +0 -0
  102. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/select_subj_behav.py +0 -0
  103. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/state_events.py +0 -0
  104. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/subjects_pad.py +0 -0
  105. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/synthetic_time_budget.py +0 -0
  106. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/time_budget_functions.py +0 -0
  107. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/time_budget_widget.py +0 -0
  108. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/transitions.py +0 -0
  109. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/utilities.py +0 -0
  110. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/video_equalizer.py +0 -0
  111. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/video_equalizer_ui.py +0 -0
  112. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/video_operations.py +0 -0
  113. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/vlc_local.py +0 -0
  114. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris/write_event.py +0 -0
  115. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris_behav_obs.egg-info/SOURCES.txt +0 -0
  116. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris_behav_obs.egg-info/dependency_links.txt +0 -0
  117. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris_behav_obs.egg-info/entry_points.txt +0 -0
  118. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris_behav_obs.egg-info/requires.txt +0 -0
  119. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/boris_behav_obs.egg-info/top_level.txt +0 -0
  120. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/setup.cfg +0 -0
  121. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/tests/test_db_functions.py +0 -0
  122. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/tests/test_export_observation.py +0 -0
  123. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/tests/test_irr.py +0 -0
  124. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/tests/test_observation_gui.py +0 -0
  125. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/tests/test_otx_parser.py +0 -0
  126. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/tests/test_preferences_gui.py +0 -0
  127. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/tests/test_project_functions.py +0 -0
  128. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/tests/test_time_budget.py +0 -0
  129. {boris_behav_obs-8.27 → boris_behav_obs-8.27.2}/tests/test_utilities.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: boris-behav-obs
3
- Version: 8.27
3
+ Version: 8.27.2
4
4
  Summary: BORIS - Behavioral Observation Research Interactive Software
5
5
  Author-email: Olivier Friard <olivier.friard@unito.it>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -41,7 +41,7 @@ def actionAbout_activated(self):
41
41
  About dialog
42
42
  """
43
43
 
44
- programs_versions = ["MPV media player"]
44
+ programs_versions: list = ["MPV media player"]
45
45
 
46
46
  mpv_lib_version, mpv_lib_file_path = util.mpv_lib_version()
47
47
  programs_versions.append(
@@ -198,8 +198,8 @@ def load_observation(self, obs_id: str, mode: str = cfg.OBS_START) -> str:
198
198
  self.observationId = obs_id
199
199
 
200
200
  if self.pj[cfg.OBSERVATIONS][self.observationId][cfg.TYPE] == cfg.IMAGES:
201
- self.image_idx: int = 0
202
- self.images_list: list = []
201
+ self.image_idx = 0
202
+ self.images_list = []
203
203
 
204
204
  if mode == cfg.OBS_START:
205
205
  self.playerType = cfg.IMAGES
@@ -1803,12 +1803,14 @@ def initialize_new_media_observation(self) -> bool:
1803
1803
 
1804
1804
  self.dw_player[i].fps[mediaFile] = mediaFPS
1805
1805
 
1806
+ # add media file to playlist
1806
1807
  self.dw_player[i].player.playlist_append(media_full_path)
1807
- # self.dw_player[i].player.loadfile(media_full_path)
1808
- # self.dw_player[i].player.pause = True
1808
+
1809
+ # add media file name to player window title
1810
+ self.dw_player[i].setWindowTitle(f"Player #{i + 1} ({pl.Path(media_full_path).name})")
1809
1811
 
1810
1812
  # media duration cumuled in seconds
1811
- self.dw_player[i].cumul_media_durations_sec: List[dec] = [round(dec(x / 1000), 3) for x in self.dw_player[i].cumul_media_durations]
1813
+ self.dw_player[i].cumul_media_durations_sec = [round(dec(x / 1000), 3) for x in self.dw_player[i].cumul_media_durations]
1812
1814
 
1813
1815
  # check if BORIS is running on a Windows VM with the 'WMIC COMPUTERSYSTEM GET SERIALNUMBER' command
1814
1816
  # because "auto" or "auto-safe" crash in Windows VM
@@ -27,6 +27,7 @@ import re
27
27
  from PyQt5.QtCore import Qt, QDateTime
28
28
  from PyQt5.QtGui import QColor
29
29
  from PyQt5.QtWidgets import (
30
+ QApplication,
30
31
  QCheckBox,
31
32
  QDialog,
32
33
  QFileDialog,
@@ -59,10 +60,11 @@ class BehavioralCategories(QDialog):
59
60
  Class for managing the behavioral categories
60
61
  """
61
62
 
62
- def __init__(self, pj):
63
+ def __init__(self, pj, dark_mode):
63
64
  super().__init__()
64
65
 
65
66
  self.pj = pj
67
+ self.dark_mode = dark_mode
66
68
  self.setWindowTitle("Behavioral categories")
67
69
 
68
70
  self.renamed = None
@@ -102,7 +104,8 @@ class BehavioralCategories(QDialog):
102
104
  if behav_cat[key].get(cfg.COLOR, ""):
103
105
  item.setBackground(QColor(behav_cat[key].get(cfg.COLOR, "")))
104
106
  else:
105
- item.setBackground(QColor(230, 230, 230))
107
+ # item.setBackground(QColor(230, 230, 230))
108
+ item.setBackground(self.not_editable_column_color())
106
109
  # item.setFlags(Qt.ItemIsEnabled)
107
110
  self.lw.setItem(idx, 1, item)
108
111
  else:
@@ -135,8 +138,8 @@ class BehavioralCategories(QDialog):
135
138
  self.vbox.addLayout(self.hbox0)
136
139
 
137
140
  hbox1 = QHBoxLayout()
138
- self.pbOK = QPushButton("OK", clicked=self.accept)
139
- self.pbCancel = QPushButton("Cancel", clicked=self.accept)
141
+ self.pbOK = QPushButton(cfg.OK, clicked=self.accept)
142
+ self.pbCancel = QPushButton(cfg.CANCEL, clicked=self.accept)
140
143
 
141
144
  spacerItem = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
142
145
  hbox1.addItem(spacerItem)
@@ -146,6 +149,15 @@ class BehavioralCategories(QDialog):
146
149
 
147
150
  self.setLayout(self.vbox)
148
151
 
152
+ def not_editable_column_color(self):
153
+ """
154
+ return a color for the not editable column
155
+ """
156
+ if self.dark_mode:
157
+ return QColor(55, 65, 79)
158
+ else:
159
+ return QColor(230, 230, 230)
160
+
149
161
  def lw_double_clicked(self, row: int, column: int):
150
162
  """
151
163
  change color
@@ -165,7 +177,8 @@ class BehavioralCategories(QDialog):
165
177
  color = col_diag.currentColor()
166
178
  if color.name() == "#000000": # black -> delete color
167
179
  self.lw.item(row, 1).setText("")
168
- self.lw.item(row, 1).setBackground(QColor(230, 230, 230))
180
+ # self.lw.item(row, 1).setBackground(QColor(230, 230, 230))
181
+ self.lw.item(row, 1).setBackground(self.not_editable_column_color())
169
182
  elif color.isValid():
170
183
  self.lw.item(row, 1).setText(color.name())
171
184
  self.lw.item(row, 1).setBackground(color)
@@ -253,9 +266,7 @@ class BehavioralCategories(QDialog):
253
266
  flag_rename = (
254
267
  dialog.MessageDialog(
255
268
  cfg.programName,
256
- ("Some behavior belong to the <b>{1}</b> to rename:<br>" "{0}<br>").format(
257
- "<br>".join(behaviors_in_category), category_to_rename
258
- ),
269
+ (f"Some behavior belong to the <b>{category_to_rename}</b> to rename:<br>{'<br>'.join(behaviors_in_category)}<br>"),
259
270
  ["Rename category", cfg.CANCEL],
260
271
  )
261
272
  == "Rename category"
@@ -271,7 +282,7 @@ class BehavioralCategories(QDialog):
271
282
  self.lw.item(self.lw.indexFromItem(selected_item).row(), 0).setText(new_category_name)
272
283
  # check behaviors belonging to the renamed category
273
284
  self.renamed = [category_to_rename, new_category_name]
274
- self.accept()
285
+ # self.accept()
275
286
 
276
287
 
277
288
  class projectDialog(QDialog, Ui_dlgProject):
@@ -415,6 +426,15 @@ class projectDialog(QDialog, Ui_dlgProject):
415
426
  self.twSubjects.horizontalHeader().sortIndicatorChanged.connect(self.sort_twSubjects)
416
427
  self.twVariables.horizontalHeader().sortIndicatorChanged.connect(self.sort_twVariables)
417
428
 
429
+ def not_editable_column_color(self):
430
+ """
431
+ return a color for the not editable column
432
+ """
433
+ if self.config_param[cfg.DARK_MODE]:
434
+ return QColor(55, 65, 79)
435
+ else:
436
+ return QColor(230, 230, 230)
437
+
418
438
  def add_button_menu(self, data, menu_obj):
419
439
  """
420
440
  add menu option from dictionary
@@ -665,14 +685,23 @@ class projectDialog(QDialog, Ui_dlgProject):
665
685
  self.twBehavCodingMap.removeRow(self.twBehavCodingMap.selectedIndexes()[0].row())
666
686
 
667
687
  def leLabel_changed(self):
688
+ """
689
+ independent variable label changed
690
+ """
668
691
  if self.selected_twvariables_row != -1:
669
692
  self.twVariables.item(self.selected_twvariables_row, 0).setText(self.leLabel.text())
670
693
 
671
694
  def leDescription_changed(self):
695
+ """
696
+ independent variable description changed
697
+ """
672
698
  if self.selected_twvariables_row != -1:
673
699
  self.twVariables.item(self.selected_twvariables_row, 1).setText(self.leDescription.text())
674
700
 
675
701
  def lePredefined_changed(self):
702
+ """
703
+ independent variable predefined value changed
704
+ """
676
705
  if self.selected_twvariables_row != -1:
677
706
  self.twVariables.item(self.selected_twvariables_row, 3).setText(self.lePredefined.text())
678
707
  if not self.lePredefined.hasFocus():
@@ -681,12 +710,15 @@ class projectDialog(QDialog, Ui_dlgProject):
681
710
  QMessageBox.warning(self, f"{cfg.programName} - Independent variables error", msg)
682
711
 
683
712
  def leSetValues_changed(self):
713
+ """
714
+ independent variable available values changed
715
+ """
684
716
  if self.selected_twvariables_row != -1:
685
717
  self.twVariables.item(self.selected_twvariables_row, 4).setText(self.leSetValues.text())
686
718
 
687
719
  def dte_default_date_changed(self):
688
720
  """
689
- default timestamp changed
721
+ independent variable default timestamp changed
690
722
  """
691
723
  if self.selected_twvariables_row != -1:
692
724
  self.twVariables.item(self.selected_twvariables_row, 3).setText(
@@ -698,7 +730,7 @@ class projectDialog(QDialog, Ui_dlgProject):
698
730
  behavioral categories manager
699
731
  """
700
732
 
701
- bc = BehavioralCategories(self.pj)
733
+ bc = BehavioralCategories(self.pj, self.config_param[cfg.DARK_MODE])
702
734
 
703
735
  if bc.exec_():
704
736
  self.pj[cfg.BEHAVIORAL_CATEGORIES] = []
@@ -754,11 +786,11 @@ class projectDialog(QDialog, Ui_dlgProject):
754
786
  """
755
787
 
756
788
  # check if double click on excluded column
757
- if column == cfg.behavioursFields["excluded"]:
789
+ if column == cfg.behavioursFields[cfg.EXCLUDED]:
758
790
  self.exclusion_matrix()
759
791
 
760
792
  # check if double click on 'coding map' column
761
- if column == cfg.behavioursFields["coding map"]:
793
+ if column == cfg.behavioursFields[cfg.CODING_MAP_sp]:
762
794
  if "with coding map" in self.twBehaviors.item(row, cfg.behavioursFields[cfg.TYPE]).text():
763
795
  self.behavior_type_changed(row)
764
796
  else:
@@ -779,8 +811,8 @@ class projectDialog(QDialog, Ui_dlgProject):
779
811
  if column == cfg.behavioursFields[cfg.MODIFIERS]:
780
812
  # check if behavior has coding map
781
813
  if (
782
- self.twBehaviors.item(row, cfg.behavioursFields["coding map"]) is not None
783
- and self.twBehaviors.item(row, cfg.behavioursFields["coding map"]).text()
814
+ self.twBehaviors.item(row, cfg.behavioursFields[cfg.CODING_MAP_sp]) is not None
815
+ and self.twBehaviors.item(row, cfg.behavioursFields[cfg.CODING_MAP_sp]).text()
784
816
  ):
785
817
  QMessageBox.warning(self, cfg.programName, "Use the coding map to set/modify the areas")
786
818
  else:
@@ -835,7 +867,8 @@ class projectDialog(QDialog, Ui_dlgProject):
835
867
  color = col_diag.currentColor()
836
868
  if color.name() == "#000000": # black -> delete color
837
869
  self.twBehaviors.item(row, cfg.behavioursFields[cfg.COLOR]).setText("")
838
- self.twBehaviors.item(row, cfg.behavioursFields[cfg.COLOR]).setBackground(QColor(230, 230, 230))
870
+ # self.twBehaviors.item(row, cfg.behavioursFields[cfg.COLOR]).setBackground(QColor(230, 230, 230))
871
+ self.twBehaviors.item(row, cfg.behavioursFields[cfg.COLOR]).setBackground(self.not_editable_column_color())
839
872
  elif color.isValid():
840
873
  self.twBehaviors.item(row, cfg.behavioursFields[cfg.COLOR]).setText(color.name())
841
874
  self.twBehaviors.item(row, cfg.behavioursFields[cfg.COLOR]).setBackground(color)
@@ -1166,7 +1199,8 @@ class projectDialog(QDialog, Ui_dlgProject):
1166
1199
  if e == self.twBehaviors.item(r, cfg.behavioursFields[cfg.BEHAVIOR_CODE]).text():
1167
1200
  item = QTableWidgetItem(",".join(new_excl[e]))
1168
1201
  item.setFlags(Qt.ItemIsEnabled)
1169
- item.setBackground(QColor(230, 230, 230))
1202
+ # item.setBackground(QColor(230, 230, 230))
1203
+ item.setBackground(self.not_editable_column_color())
1170
1204
  self.twBehaviors.setItem(r, cfg.behavioursFields["excluded"], item)
1171
1205
 
1172
1206
  def remove_all_behaviors(self):
@@ -1269,13 +1303,16 @@ class projectDialog(QDialog, Ui_dlgProject):
1269
1303
  self.twBehaviors.setItem(self.twBehaviors.rowCount() - 1, cfg.behavioursFields[field], item)
1270
1304
  if field in (cfg.TYPE, "category", "excluded", "coding map", "modifiers"):
1271
1305
  item.setFlags(Qt.ItemIsEnabled)
1272
- item.setBackground(QColor(230, 230, 230))
1306
+ # item.setBackground(QColor(230, 230, 230))
1307
+ item.setBackground(self.not_editable_column_color())
1273
1308
  if field == cfg.COLOR:
1274
1309
  item.setFlags(Qt.ItemIsEnabled)
1275
1310
  if QColor(self.twBehaviors.item(row, cfg.behavioursFields[field]).text()).isValid():
1276
1311
  item.setBackground(QColor(self.twBehaviors.item(row, cfg.behavioursFields[field]).text()))
1277
1312
  else:
1278
- item.setBackground(QColor(230, 230, 230))
1313
+ # item.setBackground(QColor(230, 230, 230))
1314
+ item.setBackground(self.not_editable_column_color())
1315
+
1279
1316
  self.twBehaviors.scrollToBottom()
1280
1317
 
1281
1318
  def remove_behavior(self):
@@ -1326,7 +1363,8 @@ class projectDialog(QDialog, Ui_dlgProject):
1326
1363
  # no manual editing, gray back ground
1327
1364
  if field_type in (cfg.TYPE, cfg.COLOR, "category", cfg.MODIFIERS, "modifiers", "excluded", "coding map"):
1328
1365
  item.setFlags(Qt.ItemIsEnabled)
1329
- item.setBackground(QColor(230, 230, 230))
1366
+ # item.setBackground(QColor(230, 230, 230))
1367
+ item.setBackground(self.not_editable_column_color())
1330
1368
  self.twBehaviors.setItem(self.twBehaviors.rowCount() - 1, cfg.behavioursFields[field_type], item)
1331
1369
  self.twBehaviors.scrollToBottom()
1332
1370
 
@@ -75,12 +75,13 @@ class ModifiersList(QDialog):
75
75
 
76
76
  self.modifiersSetNumber += 1
77
77
 
78
- lb = QLabel()
79
- lb.setText(f"Modifier <b>{self.modifiers_dict[idx]['name']}</b>")
80
- V2layout.addWidget(lb)
78
+ if self.modifiers_dict[idx].get("name", ""):
79
+ lb1 = QLabel(f"Modifier <b>{self.modifiers_dict[idx].get('name', '')}</b>")
80
+ V2layout.addWidget(lb1)
81
81
 
82
- lb = QLabel(f"<small>{self.modifiers_dict[idx]['description']}</small>")
83
- V2layout.addWidget(lb)
82
+ if self.modifiers_dict[idx].get("description", ""):
83
+ lb2 = QLabel(f"<small>{self.modifiers_dict[idx].get('description', '')}</small>")
84
+ V2layout.addWidget(lb2)
84
85
 
85
86
  if self.modifiers_dict[idx]["type"] in (
86
87
  cfg.SINGLE_SELECTION,
@@ -20,5 +20,5 @@ This file is part of BORIS.
20
20
 
21
21
  """
22
22
 
23
- __version__ = "8.27"
24
- __version_date__ = "2024-06-06"
23
+ __version__ = "8.27.2"
24
+ __version_date__ = "2024-07-03"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: boris-behav-obs
3
- Version: 8.27
3
+ Version: 8.27.2
4
4
  Summary: BORIS - Behavioral Observation Research Interactive Software
5
5
  Author-email: Olivier Friard <olivier.friard@unito.it>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "boris-behav-obs"
3
- version = "8.27"
3
+ version = "8.27.2"
4
4
  description = "BORIS - Behavioral Observation Research Interactive Software"
5
5
  authors = [{ name="Olivier Friard", email="olivier.friard@unito.it" }]
6
6
  readme = "README.rst"
@@ -58,7 +58,7 @@ line-length = 140
58
58
  exclude = ["*_ui.py", "mpv*"]
59
59
 
60
60
  [tool.bumpver]
61
- current_version = "8.27"
61
+ current_version = "8.27.2"
62
62
  version_pattern = "MAJOR.MINOR.PATCH"
63
63
 
64
64