boris-behav-obs 8.27.10__py2.py3-none-any.whl → 9.0.1__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.
- boris/about.py +7 -5
- boris/add_modifier.py +35 -35
- boris/add_modifier_ui.py +229 -129
- boris/advanced_event_filtering.py +3 -3
- boris/analysis_plugins/__init__.py +0 -0
- boris/analysis_plugins/number_of_occurences.py +60 -0
- boris/analysis_plugins/number_of_occurences_by_independent_variable.py +72 -0
- boris/analysis_plugins/time_budget.py +95 -0
- boris/behav_coding_map_creator.py +103 -108
- boris/behavior_binary_table.py +1 -1
- boris/behaviors_coding_map.py +8 -8
- boris/coding_pad.py +6 -6
- boris/config.py +6 -0
- boris/config_file.py +1 -1
- boris/connections.py +4 -2
- boris/converters.py +2 -3
- boris/converters_ui.py +187 -110
- boris/cooccurence.py +2 -2
- boris/core.py +340 -94
- boris/core_qrc.py +16088 -13246
- boris/core_ui.py +922 -812
- boris/dialog.py +14 -13
- boris/duration_widget.py +5 -5
- boris/edit_event.py +1 -1
- boris/edit_event_ui.py +162 -88
- boris/event_operations.py +4 -25
- boris/events_cursor.py +17 -9
- boris/events_snapshots.py +5 -5
- boris/exclusion_matrix.py +1 -1
- boris/export_events.py +38 -28
- boris/export_observation.py +1 -1
- boris/external_processes.py +3 -5
- boris/geometric_measurement.py +49 -26
- boris/gui_utilities.py +31 -30
- boris/import_observations.py +2 -4
- boris/irr.py +1 -1
- boris/latency.py +1 -1
- boris/map_creator.py +77 -89
- boris/measurement_widget.py +4 -4
- boris/media_file.py +2 -4
- boris/menu_options.py +1 -3
- boris/modifiers_coding_map.py +4 -4
- boris/mpv2.py +0 -2
- boris/observation.py +124 -29
- boris/observation_operations.py +18 -40
- boris/observation_ui.py +566 -374
- boris/observations_list.py +6 -6
- boris/param_panel.py +2 -2
- boris/param_panel_ui.py +246 -141
- boris/player_dock_widget.py +16 -21
- boris/plot_data_module.py +6 -6
- boris/plot_events_rt.py +7 -8
- boris/plot_spectrogram_rt.py +7 -8
- boris/plot_waveform_rt.py +6 -7
- boris/plugins.py +79 -0
- boris/preferences.py +127 -17
- boris/preferences_ui.py +464 -240
- boris/project.py +69 -72
- boris/project_functions.py +233 -31
- boris/project_import_export.py +59 -67
- boris/project_ui.py +672 -440
- boris/qrc_boris.py +6 -3
- boris/qrc_boris5.py +6 -3
- boris/select_modifiers.py +2 -2
- boris/select_observations.py +2 -2
- boris/select_subj_behav.py +3 -3
- boris/state_events.py +1 -1
- boris/subjects_pad.py +5 -5
- boris/synthetic_time_budget.py +2 -2
- boris/time_budget_functions.py +15 -0
- boris/time_budget_widget.py +4 -4
- boris/transitions.py +34 -25
- boris/utilities.py +95 -2
- boris/version.py +2 -2
- boris/video_equalizer.py +4 -4
- boris/video_equalizer_ui.py +199 -130
- boris/video_operations.py +1 -1
- boris/view_df.py +106 -0
- boris/view_df_ui.py +75 -0
- boris/write_event.py +9 -1
- {boris_behav_obs-8.27.10.dist-info → boris_behav_obs-9.0.1.dist-info}/METADATA +5 -5
- boris_behav_obs-9.0.1.dist-info/RECORD +103 -0
- {boris_behav_obs-8.27.10.dist-info → boris_behav_obs-9.0.1.dist-info}/WHEEL +1 -1
- boris/qdarkstyle/__init__.py +0 -479
- boris/qdarkstyle/__main__.py +0 -66
- boris/qdarkstyle/colorsystem.py +0 -38
- boris/qdarkstyle/dark/__init__.py +0 -1
- boris/qdarkstyle/dark/darkstyle_rc.py +0 -11379
- boris/qdarkstyle/dark/palette.py +0 -38
- boris/qdarkstyle/example/__init__.py +0 -4
- boris/qdarkstyle/example/__main__.py +0 -386
- boris/qdarkstyle/example/ui/__init__.py +0 -4
- boris/qdarkstyle/light/__init__.py +0 -1
- boris/qdarkstyle/light/lightstyle_rc.py +0 -11305
- boris/qdarkstyle/light/palette.py +0 -37
- boris/qdarkstyle/palette.py +0 -102
- boris/qdarkstyle/utils/__init__.py +0 -73
- boris/qdarkstyle/utils/__main__.py +0 -96
- boris/qdarkstyle/utils/images.py +0 -449
- boris/qdarkstyle/utils/scss.py +0 -318
- boris/vlc_local.py +0 -83
- boris_behav_obs-8.27.10.dist-info/RECORD +0 -114
- {boris_behav_obs-8.27.10.dist-info → boris_behav_obs-9.0.1.dist-info}/LICENSE.TXT +0 -0
- {boris_behav_obs-8.27.10.dist-info → boris_behav_obs-9.0.1.dist-info}/entry_points.txt +0 -0
- {boris_behav_obs-8.27.10.dist-info → boris_behav_obs-9.0.1.dist-info}/top_level.txt +0 -0
boris/observations_list.py
CHANGED
|
@@ -21,8 +21,8 @@ Copyright 2012-2024 Olivier Friard
|
|
|
21
21
|
|
|
22
22
|
"""
|
|
23
23
|
|
|
24
|
-
from
|
|
25
|
-
from
|
|
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
|
-
|
|
191
|
-
|
|
192
|
-
|
|
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
|
|
24
|
-
from
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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.
|
|
25
|
+
if not Dialog.objectName():
|
|
26
|
+
Dialog.setObjectName(u"Dialog")
|
|
17
27
|
Dialog.resize(1037, 890)
|
|
18
|
-
self.verticalLayout_4 =
|
|
19
|
-
self.verticalLayout_4.setObjectName("verticalLayout_4")
|
|
20
|
-
self.verticalLayout_2 =
|
|
21
|
-
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
|
22
|
-
self.lbSubjects =
|
|
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
|
-
|
|
26
|
-
self.horizontalLayout_3
|
|
27
|
-
self.
|
|
28
|
-
self.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
|
-
|
|
31
|
-
self.pbUnselectAllSubjects
|
|
43
|
+
|
|
44
|
+
self.pbUnselectAllSubjects = QPushButton(Dialog)
|
|
45
|
+
self.pbUnselectAllSubjects.setObjectName(u"pbUnselectAllSubjects")
|
|
46
|
+
|
|
32
47
|
self.horizontalLayout_3.addWidget(self.pbUnselectAllSubjects)
|
|
33
|
-
|
|
34
|
-
self.pbReverseSubjectsSelection
|
|
48
|
+
|
|
49
|
+
self.pbReverseSubjectsSelection = QPushButton(Dialog)
|
|
50
|
+
self.pbReverseSubjectsSelection.setObjectName(u"pbReverseSubjectsSelection")
|
|
51
|
+
|
|
35
52
|
self.horizontalLayout_3.addWidget(self.pbReverseSubjectsSelection)
|
|
36
|
-
|
|
37
|
-
self.
|
|
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
|
-
|
|
40
|
-
self.lwSubjects
|
|
60
|
+
|
|
61
|
+
self.lwSubjects = QListWidget(Dialog)
|
|
62
|
+
self.lwSubjects.setObjectName(u"lwSubjects")
|
|
63
|
+
|
|
41
64
|
self.verticalLayout_2.addWidget(self.lwSubjects)
|
|
42
|
-
|
|
43
|
-
self.lbBehaviors
|
|
65
|
+
|
|
66
|
+
self.lbBehaviors = QLabel(Dialog)
|
|
67
|
+
self.lbBehaviors.setObjectName(u"lbBehaviors")
|
|
68
|
+
|
|
44
69
|
self.verticalLayout_2.addWidget(self.lbBehaviors)
|
|
45
|
-
|
|
46
|
-
self.horizontalLayout_4
|
|
47
|
-
self.
|
|
48
|
-
self.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
|
-
|
|
51
|
-
self.pbUnselectAllBehaviors
|
|
77
|
+
|
|
78
|
+
self.pbUnselectAllBehaviors = QPushButton(Dialog)
|
|
79
|
+
self.pbUnselectAllBehaviors.setObjectName(u"pbUnselectAllBehaviors")
|
|
80
|
+
|
|
52
81
|
self.horizontalLayout_4.addWidget(self.pbUnselectAllBehaviors)
|
|
53
|
-
|
|
54
|
-
self.pbReverseBehaviorsSelection
|
|
82
|
+
|
|
83
|
+
self.pbReverseBehaviorsSelection = QPushButton(Dialog)
|
|
84
|
+
self.pbReverseBehaviorsSelection.setObjectName(u"pbReverseBehaviorsSelection")
|
|
85
|
+
|
|
55
86
|
self.horizontalLayout_4.addWidget(self.pbReverseBehaviorsSelection)
|
|
56
|
-
|
|
57
|
-
self.
|
|
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
|
-
|
|
60
|
-
self.lwBehaviors
|
|
94
|
+
|
|
95
|
+
self.lwBehaviors = QListWidget(Dialog)
|
|
96
|
+
self.lwBehaviors.setObjectName(u"lwBehaviors")
|
|
97
|
+
|
|
61
98
|
self.verticalLayout_2.addWidget(self.lwBehaviors)
|
|
62
|
-
|
|
63
|
-
self.horizontalLayout_9
|
|
64
|
-
self.
|
|
65
|
-
self.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
|
-
|
|
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
|
-
|
|
110
|
+
|
|
70
111
|
self.horizontalLayout_9.addWidget(self.cb_exclude_non_coded_modifiers)
|
|
71
|
-
|
|
72
|
-
self.cbExcludeBehaviors
|
|
112
|
+
|
|
113
|
+
self.cbExcludeBehaviors = QCheckBox(Dialog)
|
|
114
|
+
self.cbExcludeBehaviors.setObjectName(u"cbExcludeBehaviors")
|
|
115
|
+
|
|
73
116
|
self.horizontalLayout_9.addWidget(self.cbExcludeBehaviors)
|
|
74
|
-
|
|
75
|
-
self.
|
|
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
|
-
|
|
78
|
-
self.frm_time_bin_size
|
|
79
|
-
self.frm_time_bin_size.
|
|
80
|
-
self.frm_time_bin_size.
|
|
81
|
-
self.
|
|
82
|
-
self.horizontalLayout_8.
|
|
83
|
-
self.
|
|
84
|
-
self.horizontalLayout_7
|
|
85
|
-
self.
|
|
86
|
-
self.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
|
-
|
|
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
|
-
|
|
142
|
+
|
|
92
143
|
self.horizontalLayout_7.addWidget(self.sb_time_bin_size)
|
|
93
|
-
|
|
94
|
-
self.
|
|
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
|
-
|
|
98
|
-
self.frm_time
|
|
99
|
-
self.frm_time.
|
|
100
|
-
self.frm_time.
|
|
101
|
-
self.
|
|
102
|
-
self.verticalLayout_3.
|
|
103
|
-
self.
|
|
104
|
-
self.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
|
-
|
|
107
|
-
self.horizontalLayout_5
|
|
108
|
-
self.
|
|
109
|
-
self.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
|
-
|
|
112
|
-
self.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
|
-
|
|
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
|
-
|
|
182
|
+
|
|
118
183
|
self.horizontalLayout_5.addWidget(self.rb_media_duration)
|
|
119
|
-
|
|
120
|
-
self.
|
|
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
|
-
|
|
123
|
-
self.frm_time_interval
|
|
124
|
-
self.frm_time_interval.
|
|
125
|
-
self.frm_time_interval.
|
|
126
|
-
self.
|
|
127
|
-
self.verticalLayout.
|
|
128
|
-
self.
|
|
129
|
-
self.horizontalLayout
|
|
130
|
-
self.
|
|
131
|
-
self.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
|
-
|
|
134
|
-
self.label_2.
|
|
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
|
-
|
|
138
|
-
self.
|
|
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
|
-
|
|
141
|
-
self.horizontalLayout_6
|
|
142
|
-
self.
|
|
143
|
-
self.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
|
-
|
|
146
|
-
self.label_3.
|
|
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
|
-
|
|
150
|
-
self.
|
|
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
|
-
|
|
153
|
-
self.
|
|
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
|
-
|
|
157
|
-
self.horizontalLayout_2
|
|
158
|
-
|
|
159
|
-
self.
|
|
160
|
-
|
|
161
|
-
self.
|
|
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
|
-
|
|
164
|
-
self.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
|
-
|
|
270
|
+
|
|
271
|
+
QMetaObject.connectSlotsByName(Dialog)
|
|
272
|
+
# setupUi
|
|
171
273
|
|
|
172
274
|
def retranslateUi(self, Dialog):
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
self.
|
|
176
|
-
self.
|
|
177
|
-
self.
|
|
178
|
-
self.
|
|
179
|
-
self.
|
|
180
|
-
self.
|
|
181
|
-
self.
|
|
182
|
-
self.
|
|
183
|
-
self.
|
|
184
|
-
self.
|
|
185
|
-
self.
|
|
186
|
-
self.
|
|
187
|
-
self.
|
|
188
|
-
self.
|
|
189
|
-
self.
|
|
190
|
-
self.
|
|
191
|
-
self.
|
|
192
|
-
self.lbEndTime.setText(
|
|
193
|
-
self.
|
|
194
|
-
self.
|
|
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
|
+
|
boris/player_dock_widget.py
CHANGED
|
@@ -23,20 +23,9 @@ This file is part of BORIS.
|
|
|
23
23
|
import sys
|
|
24
24
|
import logging
|
|
25
25
|
import functools
|
|
26
|
-
from
|
|
27
|
-
|
|
28
|
-
|
|
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 =
|
|
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
|
-
|
|
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 =
|
|
102
|
-
volume_slider_moved_signal =
|
|
103
|
-
mute_action_triggered_signal =
|
|
104
|
-
view_signal =
|
|
105
|
-
resize_signal =
|
|
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
|
|
33
|
-
from
|
|
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 =
|
|
59
|
+
send_fig = Signal(float)
|
|
60
60
|
|
|
61
61
|
# send keypress event to mainwindow
|
|
62
|
-
sendEvent =
|
|
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 =
|
|
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
|
-
@
|
|
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
|
|
32
|
-
from
|
|
33
|
-
from
|
|
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 =
|
|
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.
|
|
71
|
-
hlayout1.addWidget(QPushButton("-", self, clicked=lambda: self.time_interval_changed(-1), focusPolicy=Qt.
|
|
72
|
-
self.pb_mode = QPushButton("Include modifiers", self, clicked=self.change_mode, focusPolicy=Qt.
|
|
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
|
|