boris-behav-obs 8.27.10__py2.py3-none-any.whl → 9.0.2__py2.py3-none-any.whl

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 (105) hide show
  1. boris/about.py +7 -5
  2. boris/add_modifier.py +35 -35
  3. boris/add_modifier_ui.py +229 -129
  4. boris/advanced_event_filtering.py +3 -3
  5. boris/analysis_plugins/__init__.py +0 -0
  6. boris/analysis_plugins/number_of_occurences.py +60 -0
  7. boris/analysis_plugins/number_of_occurences_by_independent_variable.py +72 -0
  8. boris/analysis_plugins/time_budget.py +95 -0
  9. boris/behav_coding_map_creator.py +103 -108
  10. boris/behavior_binary_table.py +1 -1
  11. boris/behaviors_coding_map.py +8 -8
  12. boris/coding_pad.py +6 -6
  13. boris/config.py +6 -0
  14. boris/config_file.py +1 -1
  15. boris/connections.py +4 -2
  16. boris/converters.py +2 -3
  17. boris/converters_ui.py +187 -110
  18. boris/cooccurence.py +2 -2
  19. boris/core.py +341 -94
  20. boris/core_qrc.py +16088 -13246
  21. boris/core_ui.py +922 -812
  22. boris/dialog.py +14 -13
  23. boris/duration_widget.py +5 -5
  24. boris/edit_event.py +1 -1
  25. boris/edit_event_ui.py +162 -88
  26. boris/event_operations.py +4 -25
  27. boris/events_cursor.py +17 -9
  28. boris/events_snapshots.py +5 -5
  29. boris/exclusion_matrix.py +1 -1
  30. boris/export_events.py +38 -28
  31. boris/export_observation.py +1 -1
  32. boris/external_processes.py +3 -5
  33. boris/geometric_measurement.py +49 -26
  34. boris/gui_utilities.py +31 -30
  35. boris/import_observations.py +2 -4
  36. boris/irr.py +1 -1
  37. boris/latency.py +1 -1
  38. boris/map_creator.py +77 -89
  39. boris/measurement_widget.py +4 -4
  40. boris/media_file.py +2 -4
  41. boris/menu_options.py +1 -3
  42. boris/modifiers_coding_map.py +4 -4
  43. boris/mpv2.py +0 -2
  44. boris/observation.py +124 -29
  45. boris/observation_operations.py +18 -40
  46. boris/observation_ui.py +566 -374
  47. boris/observations_list.py +6 -6
  48. boris/param_panel.py +2 -2
  49. boris/param_panel_ui.py +246 -141
  50. boris/player_dock_widget.py +16 -21
  51. boris/plot_data_module.py +6 -6
  52. boris/plot_events_rt.py +7 -8
  53. boris/plot_spectrogram_rt.py +7 -8
  54. boris/plot_waveform_rt.py +6 -7
  55. boris/plugins.py +79 -0
  56. boris/preferences.py +127 -17
  57. boris/preferences_ui.py +464 -240
  58. boris/project.py +69 -72
  59. boris/project_functions.py +233 -31
  60. boris/project_import_export.py +59 -67
  61. boris/project_ui.py +672 -440
  62. boris/qrc_boris.py +6 -3
  63. boris/qrc_boris5.py +6 -3
  64. boris/select_modifiers.py +2 -2
  65. boris/select_observations.py +2 -2
  66. boris/select_subj_behav.py +3 -3
  67. boris/state_events.py +1 -1
  68. boris/subjects_pad.py +5 -5
  69. boris/synthetic_time_budget.py +2 -2
  70. boris/time_budget_functions.py +15 -0
  71. boris/time_budget_widget.py +4 -4
  72. boris/transitions.py +34 -25
  73. boris/utilities.py +96 -3
  74. boris/version.py +2 -2
  75. boris/video_equalizer.py +4 -4
  76. boris/video_equalizer_ui.py +199 -130
  77. boris/video_operations.py +1 -1
  78. boris/view_df.py +106 -0
  79. boris/view_df_ui.py +75 -0
  80. boris/write_event.py +9 -1
  81. {boris_behav_obs-8.27.10.dist-info → boris_behav_obs-9.0.2.dist-info}/METADATA +5 -5
  82. boris_behav_obs-9.0.2.dist-info/RECORD +103 -0
  83. {boris_behav_obs-8.27.10.dist-info → boris_behav_obs-9.0.2.dist-info}/WHEEL +1 -1
  84. boris/qdarkstyle/__init__.py +0 -479
  85. boris/qdarkstyle/__main__.py +0 -66
  86. boris/qdarkstyle/colorsystem.py +0 -38
  87. boris/qdarkstyle/dark/__init__.py +0 -1
  88. boris/qdarkstyle/dark/darkstyle_rc.py +0 -11379
  89. boris/qdarkstyle/dark/palette.py +0 -38
  90. boris/qdarkstyle/example/__init__.py +0 -4
  91. boris/qdarkstyle/example/__main__.py +0 -386
  92. boris/qdarkstyle/example/ui/__init__.py +0 -4
  93. boris/qdarkstyle/light/__init__.py +0 -1
  94. boris/qdarkstyle/light/lightstyle_rc.py +0 -11305
  95. boris/qdarkstyle/light/palette.py +0 -37
  96. boris/qdarkstyle/palette.py +0 -102
  97. boris/qdarkstyle/utils/__init__.py +0 -73
  98. boris/qdarkstyle/utils/__main__.py +0 -96
  99. boris/qdarkstyle/utils/images.py +0 -449
  100. boris/qdarkstyle/utils/scss.py +0 -318
  101. boris/vlc_local.py +0 -83
  102. boris_behav_obs-8.27.10.dist-info/RECORD +0 -114
  103. {boris_behav_obs-8.27.10.dist-info → boris_behav_obs-9.0.2.dist-info}/LICENSE.TXT +0 -0
  104. {boris_behav_obs-8.27.10.dist-info → boris_behav_obs-9.0.2.dist-info}/entry_points.txt +0 -0
  105. {boris_behav_obs-8.27.10.dist-info → boris_behav_obs-9.0.2.dist-info}/top_level.txt +0 -0
@@ -21,8 +21,8 @@ Copyright 2012-2024 Olivier Friard
21
21
 
22
22
  """
23
23
 
24
- from PyQt5.QtGui import QColor
25
- from PyQt5.QtWidgets import (
24
+ from PySide6.QtGui import QColor
25
+ from PySide6.QtWidgets import (
26
26
  QTableWidgetItem,
27
27
  QLabel,
28
28
  QLineEdit,
@@ -186,10 +186,10 @@ class observationsList_widget(QDialog):
186
186
  """
187
187
  select or unselect all filtered observations
188
188
  """
189
-
190
- for idx in range(self.view.rowCount()):
191
- table_item = self.view.item(idx, 0)
192
- table_item.setSelected(mode == "select")
189
+ if mode == "select":
190
+ self.view.selectAll()
191
+ if mode == "unselect":
192
+ self.view.clearSelection()
193
193
 
194
194
  def pbCancel_clicked(self):
195
195
  self.close()
boris/param_panel.py CHANGED
@@ -20,8 +20,8 @@ This file is part of BORIS.
20
20
 
21
21
  """
22
22
 
23
- from PyQt5.QtCore import Qt
24
- from PyQt5.QtWidgets import QDialog
23
+ from PySide6.QtCore import Qt
24
+ from PySide6.QtWidgets import QDialog
25
25
 
26
26
  from . import config as cfg
27
27
  from .param_panel_ui import Ui_Dialog
boris/param_panel_ui.py CHANGED
@@ -1,194 +1,299 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
- # Form implementation generated from reading ui file 'boris/param_panel.ui'
4
- #
5
- # Created by: PyQt5 UI code generator 5.15.6
6
- #
7
- # WARNING: Any manual changes made to this file will be lost when pyuic5 is
8
- # run again. Do not edit this file unless you know what you are doing.
9
-
10
-
11
- from PyQt5 import QtCore, QtGui, QtWidgets
3
+ ################################################################################
4
+ ## Form generated from reading UI file 'param_panel.ui'
5
+ ##
6
+ ## Created by: Qt User Interface Compiler version 6.8.0
7
+ ##
8
+ ## WARNING! All changes made in this file will be lost when recompiling UI file!
9
+ ################################################################################
12
10
 
11
+ from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
12
+ QMetaObject, QObject, QPoint, QRect,
13
+ QSize, QTime, QUrl, Qt)
14
+ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
15
+ QFont, QFontDatabase, QGradient, QIcon,
16
+ QImage, QKeySequence, QLinearGradient, QPainter,
17
+ QPalette, QPixmap, QRadialGradient, QTransform)
18
+ from PySide6.QtWidgets import (QApplication, QCheckBox, QDialog, QFrame,
19
+ QHBoxLayout, QLabel, QListWidget, QListWidgetItem,
20
+ QPushButton, QRadioButton, QSizePolicy, QSpacerItem,
21
+ QSpinBox, QVBoxLayout, QWidget)
13
22
 
14
23
  class Ui_Dialog(object):
15
24
  def setupUi(self, Dialog):
16
- Dialog.setObjectName("Dialog")
25
+ if not Dialog.objectName():
26
+ Dialog.setObjectName(u"Dialog")
17
27
  Dialog.resize(1037, 890)
18
- self.verticalLayout_4 = QtWidgets.QVBoxLayout(Dialog)
19
- self.verticalLayout_4.setObjectName("verticalLayout_4")
20
- self.verticalLayout_2 = QtWidgets.QVBoxLayout()
21
- self.verticalLayout_2.setObjectName("verticalLayout_2")
22
- self.lbSubjects = QtWidgets.QLabel(Dialog)
23
- self.lbSubjects.setObjectName("lbSubjects")
28
+ self.verticalLayout_4 = QVBoxLayout(Dialog)
29
+ self.verticalLayout_4.setObjectName(u"verticalLayout_4")
30
+ self.verticalLayout_2 = QVBoxLayout()
31
+ self.verticalLayout_2.setObjectName(u"verticalLayout_2")
32
+ self.lbSubjects = QLabel(Dialog)
33
+ self.lbSubjects.setObjectName(u"lbSubjects")
34
+
24
35
  self.verticalLayout_2.addWidget(self.lbSubjects)
25
- self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
26
- self.horizontalLayout_3.setObjectName("horizontalLayout_3")
27
- self.pbSelectAllSubjects = QtWidgets.QPushButton(Dialog)
28
- self.pbSelectAllSubjects.setObjectName("pbSelectAllSubjects")
36
+
37
+ self.horizontalLayout_3 = QHBoxLayout()
38
+ self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
39
+ self.pbSelectAllSubjects = QPushButton(Dialog)
40
+ self.pbSelectAllSubjects.setObjectName(u"pbSelectAllSubjects")
41
+
29
42
  self.horizontalLayout_3.addWidget(self.pbSelectAllSubjects)
30
- self.pbUnselectAllSubjects = QtWidgets.QPushButton(Dialog)
31
- self.pbUnselectAllSubjects.setObjectName("pbUnselectAllSubjects")
43
+
44
+ self.pbUnselectAllSubjects = QPushButton(Dialog)
45
+ self.pbUnselectAllSubjects.setObjectName(u"pbUnselectAllSubjects")
46
+
32
47
  self.horizontalLayout_3.addWidget(self.pbUnselectAllSubjects)
33
- self.pbReverseSubjectsSelection = QtWidgets.QPushButton(Dialog)
34
- self.pbReverseSubjectsSelection.setObjectName("pbReverseSubjectsSelection")
48
+
49
+ self.pbReverseSubjectsSelection = QPushButton(Dialog)
50
+ self.pbReverseSubjectsSelection.setObjectName(u"pbReverseSubjectsSelection")
51
+
35
52
  self.horizontalLayout_3.addWidget(self.pbReverseSubjectsSelection)
36
- spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
37
- self.horizontalLayout_3.addItem(spacerItem)
53
+
54
+ self.horizontalSpacer_4 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
55
+
56
+ self.horizontalLayout_3.addItem(self.horizontalSpacer_4)
57
+
58
+
38
59
  self.verticalLayout_2.addLayout(self.horizontalLayout_3)
39
- self.lwSubjects = QtWidgets.QListWidget(Dialog)
40
- self.lwSubjects.setObjectName("lwSubjects")
60
+
61
+ self.lwSubjects = QListWidget(Dialog)
62
+ self.lwSubjects.setObjectName(u"lwSubjects")
63
+
41
64
  self.verticalLayout_2.addWidget(self.lwSubjects)
42
- self.lbBehaviors = QtWidgets.QLabel(Dialog)
43
- self.lbBehaviors.setObjectName("lbBehaviors")
65
+
66
+ self.lbBehaviors = QLabel(Dialog)
67
+ self.lbBehaviors.setObjectName(u"lbBehaviors")
68
+
44
69
  self.verticalLayout_2.addWidget(self.lbBehaviors)
45
- self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
46
- self.horizontalLayout_4.setObjectName("horizontalLayout_4")
47
- self.pbSelectAllBehaviors = QtWidgets.QPushButton(Dialog)
48
- self.pbSelectAllBehaviors.setObjectName("pbSelectAllBehaviors")
70
+
71
+ self.horizontalLayout_4 = QHBoxLayout()
72
+ self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
73
+ self.pbSelectAllBehaviors = QPushButton(Dialog)
74
+ self.pbSelectAllBehaviors.setObjectName(u"pbSelectAllBehaviors")
75
+
49
76
  self.horizontalLayout_4.addWidget(self.pbSelectAllBehaviors)
50
- self.pbUnselectAllBehaviors = QtWidgets.QPushButton(Dialog)
51
- self.pbUnselectAllBehaviors.setObjectName("pbUnselectAllBehaviors")
77
+
78
+ self.pbUnselectAllBehaviors = QPushButton(Dialog)
79
+ self.pbUnselectAllBehaviors.setObjectName(u"pbUnselectAllBehaviors")
80
+
52
81
  self.horizontalLayout_4.addWidget(self.pbUnselectAllBehaviors)
53
- self.pbReverseBehaviorsSelection = QtWidgets.QPushButton(Dialog)
54
- self.pbReverseBehaviorsSelection.setObjectName("pbReverseBehaviorsSelection")
82
+
83
+ self.pbReverseBehaviorsSelection = QPushButton(Dialog)
84
+ self.pbReverseBehaviorsSelection.setObjectName(u"pbReverseBehaviorsSelection")
85
+
55
86
  self.horizontalLayout_4.addWidget(self.pbReverseBehaviorsSelection)
56
- spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
57
- self.horizontalLayout_4.addItem(spacerItem1)
87
+
88
+ self.horizontalSpacer_5 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
89
+
90
+ self.horizontalLayout_4.addItem(self.horizontalSpacer_5)
91
+
92
+
58
93
  self.verticalLayout_2.addLayout(self.horizontalLayout_4)
59
- self.lwBehaviors = QtWidgets.QListWidget(Dialog)
60
- self.lwBehaviors.setObjectName("lwBehaviors")
94
+
95
+ self.lwBehaviors = QListWidget(Dialog)
96
+ self.lwBehaviors.setObjectName(u"lwBehaviors")
97
+
61
98
  self.verticalLayout_2.addWidget(self.lwBehaviors)
62
- self.horizontalLayout_9 = QtWidgets.QHBoxLayout()
63
- self.horizontalLayout_9.setObjectName("horizontalLayout_9")
64
- self.cbIncludeModifiers = QtWidgets.QCheckBox(Dialog)
65
- self.cbIncludeModifiers.setObjectName("cbIncludeModifiers")
99
+
100
+ self.horizontalLayout_9 = QHBoxLayout()
101
+ self.horizontalLayout_9.setObjectName(u"horizontalLayout_9")
102
+ self.cbIncludeModifiers = QCheckBox(Dialog)
103
+ self.cbIncludeModifiers.setObjectName(u"cbIncludeModifiers")
104
+
66
105
  self.horizontalLayout_9.addWidget(self.cbIncludeModifiers)
67
- self.cb_exclude_non_coded_modifiers = QtWidgets.QCheckBox(Dialog)
106
+
107
+ self.cb_exclude_non_coded_modifiers = QCheckBox(Dialog)
108
+ self.cb_exclude_non_coded_modifiers.setObjectName(u"cb_exclude_non_coded_modifiers")
68
109
  self.cb_exclude_non_coded_modifiers.setChecked(True)
69
- self.cb_exclude_non_coded_modifiers.setObjectName("cb_exclude_non_coded_modifiers")
110
+
70
111
  self.horizontalLayout_9.addWidget(self.cb_exclude_non_coded_modifiers)
71
- self.cbExcludeBehaviors = QtWidgets.QCheckBox(Dialog)
72
- self.cbExcludeBehaviors.setObjectName("cbExcludeBehaviors")
112
+
113
+ self.cbExcludeBehaviors = QCheckBox(Dialog)
114
+ self.cbExcludeBehaviors.setObjectName(u"cbExcludeBehaviors")
115
+
73
116
  self.horizontalLayout_9.addWidget(self.cbExcludeBehaviors)
74
- spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
75
- self.horizontalLayout_9.addItem(spacerItem2)
117
+
118
+ self.horizontalSpacer_7 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
119
+
120
+ self.horizontalLayout_9.addItem(self.horizontalSpacer_7)
121
+
122
+
76
123
  self.verticalLayout_2.addLayout(self.horizontalLayout_9)
77
- self.frm_time_bin_size = QtWidgets.QFrame(Dialog)
78
- self.frm_time_bin_size.setFrameShape(QtWidgets.QFrame.StyledPanel)
79
- self.frm_time_bin_size.setFrameShadow(QtWidgets.QFrame.Raised)
80
- self.frm_time_bin_size.setObjectName("frm_time_bin_size")
81
- self.horizontalLayout_8 = QtWidgets.QHBoxLayout(self.frm_time_bin_size)
82
- self.horizontalLayout_8.setObjectName("horizontalLayout_8")
83
- self.horizontalLayout_7 = QtWidgets.QHBoxLayout()
84
- self.horizontalLayout_7.setObjectName("horizontalLayout_7")
85
- self.lb_time_bin_size = QtWidgets.QLabel(self.frm_time_bin_size)
86
- self.lb_time_bin_size.setObjectName("lb_time_bin_size")
124
+
125
+ self.frm_time_bin_size = QFrame(Dialog)
126
+ self.frm_time_bin_size.setObjectName(u"frm_time_bin_size")
127
+ self.frm_time_bin_size.setFrameShape(QFrame.StyledPanel)
128
+ self.frm_time_bin_size.setFrameShadow(QFrame.Raised)
129
+ self.horizontalLayout_8 = QHBoxLayout(self.frm_time_bin_size)
130
+ self.horizontalLayout_8.setObjectName(u"horizontalLayout_8")
131
+ self.horizontalLayout_7 = QHBoxLayout()
132
+ self.horizontalLayout_7.setObjectName(u"horizontalLayout_7")
133
+ self.lb_time_bin_size = QLabel(self.frm_time_bin_size)
134
+ self.lb_time_bin_size.setObjectName(u"lb_time_bin_size")
135
+
87
136
  self.horizontalLayout_7.addWidget(self.lb_time_bin_size)
88
- self.sb_time_bin_size = QtWidgets.QSpinBox(self.frm_time_bin_size)
137
+
138
+ self.sb_time_bin_size = QSpinBox(self.frm_time_bin_size)
139
+ self.sb_time_bin_size.setObjectName(u"sb_time_bin_size")
89
140
  self.sb_time_bin_size.setMaximum(86400)
90
141
  self.sb_time_bin_size.setSingleStep(10)
91
- self.sb_time_bin_size.setObjectName("sb_time_bin_size")
142
+
92
143
  self.horizontalLayout_7.addWidget(self.sb_time_bin_size)
93
- spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
94
- self.horizontalLayout_7.addItem(spacerItem3)
144
+
145
+ self.horizontalSpacer_8 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
146
+
147
+ self.horizontalLayout_7.addItem(self.horizontalSpacer_8)
148
+
149
+
95
150
  self.horizontalLayout_8.addLayout(self.horizontalLayout_7)
151
+
152
+
96
153
  self.verticalLayout_2.addWidget(self.frm_time_bin_size)
97
- self.frm_time = QtWidgets.QFrame(Dialog)
98
- self.frm_time.setFrameShape(QtWidgets.QFrame.StyledPanel)
99
- self.frm_time.setFrameShadow(QtWidgets.QFrame.Raised)
100
- self.frm_time.setObjectName("frm_time")
101
- self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.frm_time)
102
- self.verticalLayout_3.setObjectName("verticalLayout_3")
103
- self.lb_time_interval = QtWidgets.QLabel(self.frm_time)
104
- self.lb_time_interval.setObjectName("lb_time_interval")
154
+
155
+ self.frm_time = QFrame(Dialog)
156
+ self.frm_time.setObjectName(u"frm_time")
157
+ self.frm_time.setFrameShape(QFrame.StyledPanel)
158
+ self.frm_time.setFrameShadow(QFrame.Raised)
159
+ self.verticalLayout_3 = QVBoxLayout(self.frm_time)
160
+ self.verticalLayout_3.setObjectName(u"verticalLayout_3")
161
+ self.lb_time_interval = QLabel(self.frm_time)
162
+ self.lb_time_interval.setObjectName(u"lb_time_interval")
163
+
105
164
  self.verticalLayout_3.addWidget(self.lb_time_interval)
106
- self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
107
- self.horizontalLayout_5.setObjectName("horizontalLayout_5")
108
- self.rb_observed_events = QtWidgets.QRadioButton(self.frm_time)
109
- self.rb_observed_events.setObjectName("rb_observed_events")
165
+
166
+ self.horizontalLayout_5 = QHBoxLayout()
167
+ self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
168
+ self.rb_observed_events = QRadioButton(self.frm_time)
169
+ self.rb_observed_events.setObjectName(u"rb_observed_events")
170
+
110
171
  self.horizontalLayout_5.addWidget(self.rb_observed_events)
111
- self.rb_user_defined = QtWidgets.QRadioButton(self.frm_time)
112
- self.rb_user_defined.setObjectName("rb_user_defined")
172
+
173
+ self.rb_user_defined = QRadioButton(self.frm_time)
174
+ self.rb_user_defined.setObjectName(u"rb_user_defined")
175
+
113
176
  self.horizontalLayout_5.addWidget(self.rb_user_defined)
114
- self.rb_media_duration = QtWidgets.QRadioButton(self.frm_time)
177
+
178
+ self.rb_media_duration = QRadioButton(self.frm_time)
179
+ self.rb_media_duration.setObjectName(u"rb_media_duration")
115
180
  self.rb_media_duration.setCheckable(True)
116
181
  self.rb_media_duration.setChecked(False)
117
- self.rb_media_duration.setObjectName("rb_media_duration")
182
+
118
183
  self.horizontalLayout_5.addWidget(self.rb_media_duration)
119
- spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
120
- self.horizontalLayout_5.addItem(spacerItem4)
184
+
185
+ self.horizontalSpacer_3 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
186
+
187
+ self.horizontalLayout_5.addItem(self.horizontalSpacer_3)
188
+
189
+
121
190
  self.verticalLayout_3.addLayout(self.horizontalLayout_5)
122
- self.frm_time_interval = QtWidgets.QFrame(self.frm_time)
123
- self.frm_time_interval.setFrameShape(QtWidgets.QFrame.StyledPanel)
124
- self.frm_time_interval.setFrameShadow(QtWidgets.QFrame.Raised)
125
- self.frm_time_interval.setObjectName("frm_time_interval")
126
- self.verticalLayout = QtWidgets.QVBoxLayout(self.frm_time_interval)
127
- self.verticalLayout.setObjectName("verticalLayout")
128
- self.horizontalLayout = QtWidgets.QHBoxLayout()
129
- self.horizontalLayout.setObjectName("horizontalLayout")
130
- self.lbStartTime = QtWidgets.QLabel(self.frm_time_interval)
131
- self.lbStartTime.setObjectName("lbStartTime")
191
+
192
+ self.frm_time_interval = QFrame(self.frm_time)
193
+ self.frm_time_interval.setObjectName(u"frm_time_interval")
194
+ self.frm_time_interval.setFrameShape(QFrame.StyledPanel)
195
+ self.frm_time_interval.setFrameShadow(QFrame.Raised)
196
+ self.verticalLayout = QVBoxLayout(self.frm_time_interval)
197
+ self.verticalLayout.setObjectName(u"verticalLayout")
198
+ self.horizontalLayout = QHBoxLayout()
199
+ self.horizontalLayout.setObjectName(u"horizontalLayout")
200
+ self.lbStartTime = QLabel(self.frm_time_interval)
201
+ self.lbStartTime.setObjectName(u"lbStartTime")
202
+
132
203
  self.horizontalLayout.addWidget(self.lbStartTime)
133
- self.label_2 = QtWidgets.QLabel(self.frm_time_interval)
134
- self.label_2.setText("")
135
- self.label_2.setObjectName("label_2")
204
+
205
+ self.label_2 = QLabel(self.frm_time_interval)
206
+ self.label_2.setObjectName(u"label_2")
207
+
136
208
  self.horizontalLayout.addWidget(self.label_2)
137
- spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
138
- self.horizontalLayout.addItem(spacerItem5)
209
+
210
+ self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
211
+
212
+ self.horizontalLayout.addItem(self.horizontalSpacer_2)
213
+
214
+
139
215
  self.verticalLayout.addLayout(self.horizontalLayout)
140
- self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
141
- self.horizontalLayout_6.setObjectName("horizontalLayout_6")
142
- self.lbEndTime = QtWidgets.QLabel(self.frm_time_interval)
143
- self.lbEndTime.setObjectName("lbEndTime")
216
+
217
+ self.horizontalLayout_6 = QHBoxLayout()
218
+ self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
219
+ self.lbEndTime = QLabel(self.frm_time_interval)
220
+ self.lbEndTime.setObjectName(u"lbEndTime")
221
+
144
222
  self.horizontalLayout_6.addWidget(self.lbEndTime)
145
- self.label_3 = QtWidgets.QLabel(self.frm_time_interval)
146
- self.label_3.setText("")
147
- self.label_3.setObjectName("label_3")
223
+
224
+ self.label_3 = QLabel(self.frm_time_interval)
225
+ self.label_3.setObjectName(u"label_3")
226
+
148
227
  self.horizontalLayout_6.addWidget(self.label_3)
149
- spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
150
- self.horizontalLayout_6.addItem(spacerItem6)
228
+
229
+ self.horizontalSpacer_6 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
230
+
231
+ self.horizontalLayout_6.addItem(self.horizontalSpacer_6)
232
+
233
+
151
234
  self.verticalLayout.addLayout(self.horizontalLayout_6)
152
- spacerItem7 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
153
- self.verticalLayout.addItem(spacerItem7)
235
+
236
+ self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
237
+
238
+ self.verticalLayout.addItem(self.verticalSpacer)
239
+
240
+
154
241
  self.verticalLayout_3.addWidget(self.frm_time_interval)
242
+
243
+
155
244
  self.verticalLayout_2.addWidget(self.frm_time)
156
- self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
157
- self.horizontalLayout_2.setObjectName("horizontalLayout_2")
158
- spacerItem8 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
159
- self.horizontalLayout_2.addItem(spacerItem8)
160
- self.pbCancel = QtWidgets.QPushButton(Dialog)
161
- self.pbCancel.setObjectName("pbCancel")
245
+
246
+ self.horizontalLayout_2 = QHBoxLayout()
247
+ self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
248
+ self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
249
+
250
+ self.horizontalLayout_2.addItem(self.horizontalSpacer)
251
+
252
+ self.pbCancel = QPushButton(Dialog)
253
+ self.pbCancel.setObjectName(u"pbCancel")
254
+
162
255
  self.horizontalLayout_2.addWidget(self.pbCancel)
163
- self.pbOK = QtWidgets.QPushButton(Dialog)
164
- self.pbOK.setObjectName("pbOK")
256
+
257
+ self.pbOK = QPushButton(Dialog)
258
+ self.pbOK.setObjectName(u"pbOK")
259
+
165
260
  self.horizontalLayout_2.addWidget(self.pbOK)
261
+
262
+
166
263
  self.verticalLayout_2.addLayout(self.horizontalLayout_2)
264
+
265
+
167
266
  self.verticalLayout_4.addLayout(self.verticalLayout_2)
168
267
 
268
+
169
269
  self.retranslateUi(Dialog)
170
- QtCore.QMetaObject.connectSlotsByName(Dialog)
270
+
271
+ QMetaObject.connectSlotsByName(Dialog)
272
+ # setupUi
171
273
 
172
274
  def retranslateUi(self, Dialog):
173
- _translate = QtCore.QCoreApplication.translate
174
- Dialog.setWindowTitle(_translate("Dialog", "Parameters"))
175
- self.lbSubjects.setText(_translate("Dialog", "Subjects"))
176
- self.pbSelectAllSubjects.setText(_translate("Dialog", "Select all"))
177
- self.pbUnselectAllSubjects.setText(_translate("Dialog", "Unselect all"))
178
- self.pbReverseSubjectsSelection.setText(_translate("Dialog", "Reverse selection"))
179
- self.lbBehaviors.setText(_translate("Dialog", "Behaviors"))
180
- self.pbSelectAllBehaviors.setText(_translate("Dialog", "Select all"))
181
- self.pbUnselectAllBehaviors.setText(_translate("Dialog", "Unselect all"))
182
- self.pbReverseBehaviorsSelection.setText(_translate("Dialog", "Reverse selection"))
183
- self.cbIncludeModifiers.setText(_translate("Dialog", "Include modifiers"))
184
- self.cb_exclude_non_coded_modifiers.setText(_translate("Dialog", "Exclude non coded modifiers"))
185
- self.cbExcludeBehaviors.setText(_translate("Dialog", "Exclude behaviors without events"))
186
- self.lb_time_bin_size.setText(_translate("Dialog", "Time bin size (s)"))
187
- self.lb_time_interval.setText(_translate("Dialog", "Time interval"))
188
- self.rb_observed_events.setText(_translate("Dialog", "Observed events"))
189
- self.rb_user_defined.setText(_translate("Dialog", "User defined"))
190
- self.rb_media_duration.setText(_translate("Dialog", "Media file(s) duration"))
191
- self.lbStartTime.setText(_translate("Dialog", "Start time"))
192
- self.lbEndTime.setText(_translate("Dialog", "End time"))
193
- self.pbCancel.setText(_translate("Dialog", "Cancel"))
194
- self.pbOK.setText(_translate("Dialog", "OK"))
275
+ Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"Parameters", None))
276
+ self.lbSubjects.setText(QCoreApplication.translate("Dialog", u"Subjects", None))
277
+ self.pbSelectAllSubjects.setText(QCoreApplication.translate("Dialog", u"Select all", None))
278
+ self.pbUnselectAllSubjects.setText(QCoreApplication.translate("Dialog", u"Unselect all", None))
279
+ self.pbReverseSubjectsSelection.setText(QCoreApplication.translate("Dialog", u"Reverse selection", None))
280
+ self.lbBehaviors.setText(QCoreApplication.translate("Dialog", u"Behaviors", None))
281
+ self.pbSelectAllBehaviors.setText(QCoreApplication.translate("Dialog", u"Select all", None))
282
+ self.pbUnselectAllBehaviors.setText(QCoreApplication.translate("Dialog", u"Unselect all", None))
283
+ self.pbReverseBehaviorsSelection.setText(QCoreApplication.translate("Dialog", u"Reverse selection", None))
284
+ self.cbIncludeModifiers.setText(QCoreApplication.translate("Dialog", u"Include modifiers", None))
285
+ self.cb_exclude_non_coded_modifiers.setText(QCoreApplication.translate("Dialog", u"Exclude non coded modifiers", None))
286
+ self.cbExcludeBehaviors.setText(QCoreApplication.translate("Dialog", u"Exclude behaviors without events", None))
287
+ self.lb_time_bin_size.setText(QCoreApplication.translate("Dialog", u"Time bin size (s)", None))
288
+ self.lb_time_interval.setText(QCoreApplication.translate("Dialog", u"Time interval", None))
289
+ self.rb_observed_events.setText(QCoreApplication.translate("Dialog", u"Observed events", None))
290
+ self.rb_user_defined.setText(QCoreApplication.translate("Dialog", u"User defined", None))
291
+ self.rb_media_duration.setText(QCoreApplication.translate("Dialog", u"Media file(s) duration", None))
292
+ self.lbStartTime.setText(QCoreApplication.translate("Dialog", u"Start time", None))
293
+ self.label_2.setText("")
294
+ self.lbEndTime.setText(QCoreApplication.translate("Dialog", u"End time", None))
295
+ self.label_3.setText("")
296
+ self.pbCancel.setText(QCoreApplication.translate("Dialog", u"Cancel", None))
297
+ self.pbOK.setText(QCoreApplication.translate("Dialog", u"OK", None))
298
+ # retranslateUi
299
+
@@ -23,20 +23,9 @@ This file is part of BORIS.
23
23
  import sys
24
24
  import logging
25
25
  import functools
26
- from PyQt5.QtWidgets import (
27
- QLabel,
28
- QDockWidget,
29
- QWidget,
30
- QHBoxLayout,
31
- QVBoxLayout,
32
- QSlider,
33
- QSizePolicy,
34
- QStackedWidget,
35
- QToolButton,
36
- QAction,
37
- )
38
- from PyQt5.QtCore import pyqtSignal, QEvent, Qt
39
- from PyQt5.QtGui import QIcon
26
+ from PySide6.QtWidgets import QLabel, QDockWidget, QWidget, QHBoxLayout, QVBoxLayout, QSlider, QSizePolicy, QStackedWidget, QToolButton
27
+ from PySide6.QtCore import Signal, QEvent, Qt, QPoint
28
+ from PySide6.QtGui import QIcon, QAction, QPixmap, QPainter, QPen, QColor
40
29
 
41
30
  from . import mpv2 as mpv
42
31
 
@@ -70,7 +59,7 @@ class Clickable_label(QLabel):
70
59
  Label emits a signal when clicked
71
60
  """
72
61
 
73
- mouse_pressed_signal = pyqtSignal(int, QEvent)
62
+ mouse_pressed_signal = Signal(int, QEvent)
74
63
 
75
64
  def __init__(self, id_, parent=None):
76
65
  QLabel.__init__(self, parent)
@@ -80,7 +69,13 @@ class Clickable_label(QLabel):
80
69
  """
81
70
  label clicked
82
71
  """
83
- """logging.debug(f"mousepress event: label {self.id_} clicked")"""
72
+ logging.debug(f"mousepress event: label {self.id_} clicked {event.pos()}")
73
+
74
+ """
75
+ super().mousePressEvent(event)
76
+ x, y = event.pos().x(), event.pos().y()
77
+ draw_on_pixmap(self, x, y) # Example usage
78
+ """
84
79
 
85
80
  self.mouse_pressed_signal.emit(self.id_, event)
86
81
 
@@ -98,11 +93,11 @@ class DW_player(QDockWidget):
98
93
  Define the player class
99
94
  """
100
95
 
101
- key_pressed_signal = pyqtSignal(QEvent)
102
- volume_slider_moved_signal = pyqtSignal(int, int)
103
- mute_action_triggered_signal = pyqtSignal(int)
104
- view_signal = pyqtSignal(int, str, int)
105
- resize_signal = pyqtSignal(int)
96
+ key_pressed_signal = Signal(QEvent)
97
+ volume_slider_moved_signal = Signal(int, int)
98
+ mute_action_triggered_signal = Signal(int)
99
+ view_signal = Signal(int, str, int)
100
+ resize_signal = Signal(int)
106
101
 
107
102
  def __init__(self, id_, parent=None):
108
103
  super().__init__(parent)
boris/plot_data_module.py CHANGED
@@ -29,8 +29,8 @@ from decimal import Decimal as dec
29
29
  import numpy as np
30
30
  from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
31
31
  from matplotlib.figure import Figure
32
- from PyQt5.QtCore import pyqtSignal, QEvent, QThread, QObject, pyqtSlot, QTimer
33
- from PyQt5.QtWidgets import (
32
+ from PySide6.QtCore import Signal, QEvent, QThread, QObject, Slot, QTimer
33
+ from PySide6.QtWidgets import (
34
34
  QSizePolicy,
35
35
  QWidget,
36
36
  QPushButton,
@@ -56,10 +56,10 @@ class MyMplCanvas(FigureCanvas):
56
56
 
57
57
 
58
58
  class Plot_data(QWidget):
59
- send_fig = pyqtSignal(float)
59
+ send_fig = Signal(float)
60
60
 
61
61
  # send keypress event to mainwindow
62
- sendEvent = pyqtSignal(QEvent)
62
+ sendEvent = Signal(QEvent)
63
63
 
64
64
  def __init__(
65
65
  self,
@@ -310,7 +310,7 @@ class Plot_data(QWidget):
310
310
 
311
311
 
312
312
  class Plotter(QObject):
313
- return_fig = pyqtSignal(
313
+ return_fig = Signal(
314
314
  np.ndarray, # x array
315
315
  np.ndarray, # y array
316
316
  float, # position_data
@@ -320,7 +320,7 @@ class Plotter(QObject):
320
320
  float, # position end
321
321
  )
322
322
 
323
- @pyqtSlot(float)
323
+ @Slot(float)
324
324
  def replot(self, current_time): # time_ in s
325
325
  logging.debug("current_time: {}".format(current_time))
326
326
 
boris/plot_events_rt.py CHANGED
@@ -28,10 +28,9 @@ import matplotlib
28
28
  matplotlib.use("Qt5Agg")
29
29
 
30
30
  import numpy as np
31
- from PyQt5.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QPushButton, QLabel
32
- from PyQt5.QtCore import pyqtSignal, QEvent
33
- from PyQt5 import Qt
34
- from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
31
+ from PySide6.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QPushButton, QLabel
32
+ from PySide6.QtCore import Signal, QEvent, Qt
33
+ from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg as FigureCanvas
35
34
 
36
35
  from matplotlib.figure import Figure
37
36
 
@@ -42,7 +41,7 @@ from . import config as cfg
42
41
 
43
42
  class Plot_events_RT(QWidget):
44
43
  # send keypress event to mainwindow
45
- sendEvent = pyqtSignal(QEvent)
44
+ sendEvent = Signal(QEvent)
46
45
 
47
46
  def __init__(self):
48
47
  super().__init__()
@@ -67,9 +66,9 @@ class Plot_events_RT(QWidget):
67
66
 
68
67
  hlayout1 = QHBoxLayout()
69
68
  hlayout1.addWidget(QLabel("Time interval"))
70
- hlayout1.addWidget(QPushButton("+", self, clicked=lambda: self.time_interval_changed(1), focusPolicy=Qt.Qt.NoFocus))
71
- hlayout1.addWidget(QPushButton("-", self, clicked=lambda: self.time_interval_changed(-1), focusPolicy=Qt.Qt.NoFocus))
72
- self.pb_mode = QPushButton("Include modifiers", self, clicked=self.change_mode, focusPolicy=Qt.Qt.NoFocus)
69
+ hlayout1.addWidget(QPushButton("+", self, clicked=lambda: self.time_interval_changed(1), focusPolicy=Qt.NoFocus))
70
+ hlayout1.addWidget(QPushButton("-", self, clicked=lambda: self.time_interval_changed(-1), focusPolicy=Qt.NoFocus))
71
+ self.pb_mode = QPushButton("Include modifiers", self, clicked=self.change_mode, focusPolicy=Qt.NoFocus)
73
72
  hlayout1.addWidget(self.pb_mode)
74
73
  layout.addLayout(hlayout1)
75
74