boris-behav-obs 8.27.9__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/db_functions.py +3 -1
- 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.9.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.9.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.9.dist-info/RECORD +0 -114
- {boris_behav_obs-8.27.9.dist-info → boris_behav_obs-9.0.1.dist-info}/LICENSE.TXT +0 -0
- {boris_behav_obs-8.27.9.dist-info → boris_behav_obs-9.0.1.dist-info}/entry_points.txt +0 -0
- {boris_behav_obs-8.27.9.dist-info → boris_behav_obs-9.0.1.dist-info}/top_level.txt +0 -0
boris/video_equalizer_ui.py
CHANGED
|
@@ -1,179 +1,248 @@
|
|
|
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 'video_equalizer.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, QComboBox, QHBoxLayout, QLabel,
|
|
19
|
+
QPushButton, QSizePolicy, QSlider, QSpacerItem,
|
|
20
|
+
QVBoxLayout, QWidget)
|
|
13
21
|
|
|
14
22
|
class Ui_Equalizer(object):
|
|
15
23
|
def setupUi(self, Equalizer):
|
|
16
|
-
Equalizer.
|
|
24
|
+
if not Equalizer.objectName():
|
|
25
|
+
Equalizer.setObjectName(u"Equalizer")
|
|
17
26
|
Equalizer.resize(388, 284)
|
|
18
|
-
self.verticalLayout =
|
|
19
|
-
self.verticalLayout.setObjectName("verticalLayout")
|
|
20
|
-
self.label_6 =
|
|
21
|
-
|
|
27
|
+
self.verticalLayout = QVBoxLayout(Equalizer)
|
|
28
|
+
self.verticalLayout.setObjectName(u"verticalLayout")
|
|
29
|
+
self.label_6 = QLabel(Equalizer)
|
|
30
|
+
self.label_6.setObjectName(u"label_6")
|
|
31
|
+
sizePolicy = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed)
|
|
22
32
|
sizePolicy.setHorizontalStretch(0)
|
|
23
33
|
sizePolicy.setVerticalStretch(0)
|
|
24
34
|
sizePolicy.setHeightForWidth(self.label_6.sizePolicy().hasHeightForWidth())
|
|
25
35
|
self.label_6.setSizePolicy(sizePolicy)
|
|
26
|
-
font =
|
|
36
|
+
font = QFont()
|
|
27
37
|
font.setBold(True)
|
|
28
|
-
font.setWeight(75)
|
|
29
38
|
self.label_6.setFont(font)
|
|
30
|
-
|
|
39
|
+
|
|
31
40
|
self.verticalLayout.addWidget(self.label_6)
|
|
32
|
-
|
|
33
|
-
self.cb_player
|
|
41
|
+
|
|
42
|
+
self.cb_player = QComboBox(Equalizer)
|
|
43
|
+
self.cb_player.setObjectName(u"cb_player")
|
|
44
|
+
|
|
34
45
|
self.verticalLayout.addWidget(self.cb_player)
|
|
35
|
-
|
|
36
|
-
self.horizontalLayout
|
|
37
|
-
self.
|
|
38
|
-
self.label
|
|
39
|
-
self.label.
|
|
40
|
-
self.label.
|
|
46
|
+
|
|
47
|
+
self.horizontalLayout = QHBoxLayout()
|
|
48
|
+
self.horizontalLayout.setObjectName(u"horizontalLayout")
|
|
49
|
+
self.label = QLabel(Equalizer)
|
|
50
|
+
self.label.setObjectName(u"label")
|
|
51
|
+
self.label.setMinimumSize(QSize(70, 0))
|
|
52
|
+
self.label.setMaximumSize(QSize(70, 16777215))
|
|
53
|
+
|
|
41
54
|
self.horizontalLayout.addWidget(self.label)
|
|
42
|
-
|
|
43
|
-
self.hs_brightness
|
|
44
|
-
self.hs_brightness.
|
|
55
|
+
|
|
56
|
+
self.hs_brightness = QSlider(Equalizer)
|
|
57
|
+
self.hs_brightness.setObjectName(u"hs_brightness")
|
|
58
|
+
self.hs_brightness.setMinimumSize(QSize(200, 0))
|
|
59
|
+
self.hs_brightness.setMaximumSize(QSize(200, 16777215))
|
|
45
60
|
self.hs_brightness.setMinimum(-100)
|
|
46
|
-
self.hs_brightness.
|
|
47
|
-
self.hs_brightness.setOrientation(
|
|
48
|
-
|
|
61
|
+
self.hs_brightness.setValue(0)
|
|
62
|
+
self.hs_brightness.setOrientation(Qt.Horizontal)
|
|
63
|
+
|
|
49
64
|
self.horizontalLayout.addWidget(self.hs_brightness)
|
|
50
|
-
|
|
51
|
-
self.lb_brightness
|
|
52
|
-
self.lb_brightness.
|
|
53
|
-
self.lb_brightness.
|
|
65
|
+
|
|
66
|
+
self.lb_brightness = QLabel(Equalizer)
|
|
67
|
+
self.lb_brightness.setObjectName(u"lb_brightness")
|
|
68
|
+
self.lb_brightness.setMinimumSize(QSize(25, 0))
|
|
69
|
+
self.lb_brightness.setMaximumSize(QSize(25, 16777215))
|
|
70
|
+
|
|
54
71
|
self.horizontalLayout.addWidget(self.lb_brightness)
|
|
72
|
+
|
|
73
|
+
|
|
55
74
|
self.verticalLayout.addLayout(self.horizontalLayout)
|
|
56
|
-
|
|
57
|
-
self.horizontalLayout_2
|
|
58
|
-
self.
|
|
59
|
-
self.label_2
|
|
60
|
-
self.label_2.
|
|
61
|
-
self.label_2.
|
|
75
|
+
|
|
76
|
+
self.horizontalLayout_2 = QHBoxLayout()
|
|
77
|
+
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
|
|
78
|
+
self.label_2 = QLabel(Equalizer)
|
|
79
|
+
self.label_2.setObjectName(u"label_2")
|
|
80
|
+
self.label_2.setMinimumSize(QSize(70, 0))
|
|
81
|
+
self.label_2.setMaximumSize(QSize(70, 16777215))
|
|
82
|
+
|
|
62
83
|
self.horizontalLayout_2.addWidget(self.label_2)
|
|
63
|
-
|
|
64
|
-
self.hs_contrast
|
|
65
|
-
self.hs_contrast.
|
|
84
|
+
|
|
85
|
+
self.hs_contrast = QSlider(Equalizer)
|
|
86
|
+
self.hs_contrast.setObjectName(u"hs_contrast")
|
|
87
|
+
self.hs_contrast.setMinimumSize(QSize(200, 0))
|
|
88
|
+
self.hs_contrast.setMaximumSize(QSize(200, 16777215))
|
|
66
89
|
self.hs_contrast.setMinimum(-100)
|
|
67
|
-
self.hs_contrast.
|
|
68
|
-
self.hs_contrast.setOrientation(
|
|
69
|
-
|
|
90
|
+
self.hs_contrast.setValue(0)
|
|
91
|
+
self.hs_contrast.setOrientation(Qt.Horizontal)
|
|
92
|
+
|
|
70
93
|
self.horizontalLayout_2.addWidget(self.hs_contrast)
|
|
71
|
-
|
|
72
|
-
self.lb_contrast
|
|
73
|
-
self.lb_contrast.
|
|
74
|
-
self.lb_contrast.
|
|
94
|
+
|
|
95
|
+
self.lb_contrast = QLabel(Equalizer)
|
|
96
|
+
self.lb_contrast.setObjectName(u"lb_contrast")
|
|
97
|
+
self.lb_contrast.setMinimumSize(QSize(25, 0))
|
|
98
|
+
self.lb_contrast.setMaximumSize(QSize(25, 16777215))
|
|
99
|
+
|
|
75
100
|
self.horizontalLayout_2.addWidget(self.lb_contrast)
|
|
101
|
+
|
|
102
|
+
|
|
76
103
|
self.verticalLayout.addLayout(self.horizontalLayout_2)
|
|
77
|
-
|
|
78
|
-
self.horizontalLayout_3
|
|
79
|
-
self.
|
|
80
|
-
self.label_3
|
|
81
|
-
self.label_3.
|
|
82
|
-
self.label_3.
|
|
104
|
+
|
|
105
|
+
self.horizontalLayout_3 = QHBoxLayout()
|
|
106
|
+
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
|
|
107
|
+
self.label_3 = QLabel(Equalizer)
|
|
108
|
+
self.label_3.setObjectName(u"label_3")
|
|
109
|
+
self.label_3.setMinimumSize(QSize(70, 0))
|
|
110
|
+
self.label_3.setMaximumSize(QSize(70, 16777215))
|
|
111
|
+
|
|
83
112
|
self.horizontalLayout_3.addWidget(self.label_3)
|
|
84
|
-
|
|
85
|
-
self.hs_saturation
|
|
86
|
-
self.hs_saturation.
|
|
113
|
+
|
|
114
|
+
self.hs_saturation = QSlider(Equalizer)
|
|
115
|
+
self.hs_saturation.setObjectName(u"hs_saturation")
|
|
116
|
+
self.hs_saturation.setMinimumSize(QSize(200, 0))
|
|
117
|
+
self.hs_saturation.setMaximumSize(QSize(200, 16777215))
|
|
87
118
|
self.hs_saturation.setMinimum(-100)
|
|
88
|
-
self.hs_saturation.
|
|
89
|
-
self.hs_saturation.setOrientation(
|
|
90
|
-
|
|
119
|
+
self.hs_saturation.setValue(0)
|
|
120
|
+
self.hs_saturation.setOrientation(Qt.Horizontal)
|
|
121
|
+
|
|
91
122
|
self.horizontalLayout_3.addWidget(self.hs_saturation)
|
|
92
|
-
|
|
93
|
-
self.lb_saturation
|
|
94
|
-
self.lb_saturation.
|
|
95
|
-
self.lb_saturation.
|
|
123
|
+
|
|
124
|
+
self.lb_saturation = QLabel(Equalizer)
|
|
125
|
+
self.lb_saturation.setObjectName(u"lb_saturation")
|
|
126
|
+
self.lb_saturation.setMinimumSize(QSize(25, 0))
|
|
127
|
+
self.lb_saturation.setMaximumSize(QSize(25, 16777215))
|
|
128
|
+
|
|
96
129
|
self.horizontalLayout_3.addWidget(self.lb_saturation)
|
|
130
|
+
|
|
131
|
+
|
|
97
132
|
self.verticalLayout.addLayout(self.horizontalLayout_3)
|
|
98
|
-
|
|
99
|
-
self.horizontalLayout_4
|
|
100
|
-
self.
|
|
101
|
-
self.label_4
|
|
102
|
-
self.label_4.
|
|
103
|
-
self.label_4.
|
|
133
|
+
|
|
134
|
+
self.horizontalLayout_4 = QHBoxLayout()
|
|
135
|
+
self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
|
|
136
|
+
self.label_4 = QLabel(Equalizer)
|
|
137
|
+
self.label_4.setObjectName(u"label_4")
|
|
138
|
+
self.label_4.setMinimumSize(QSize(70, 0))
|
|
139
|
+
self.label_4.setMaximumSize(QSize(70, 16777215))
|
|
140
|
+
|
|
104
141
|
self.horizontalLayout_4.addWidget(self.label_4)
|
|
105
|
-
|
|
106
|
-
self.hs_gamma
|
|
107
|
-
self.hs_gamma.
|
|
142
|
+
|
|
143
|
+
self.hs_gamma = QSlider(Equalizer)
|
|
144
|
+
self.hs_gamma.setObjectName(u"hs_gamma")
|
|
145
|
+
self.hs_gamma.setMinimumSize(QSize(200, 0))
|
|
146
|
+
self.hs_gamma.setMaximumSize(QSize(200, 16777215))
|
|
108
147
|
self.hs_gamma.setMinimum(-100)
|
|
109
|
-
self.hs_gamma.
|
|
110
|
-
self.hs_gamma.setOrientation(
|
|
111
|
-
|
|
148
|
+
self.hs_gamma.setValue(0)
|
|
149
|
+
self.hs_gamma.setOrientation(Qt.Horizontal)
|
|
150
|
+
|
|
112
151
|
self.horizontalLayout_4.addWidget(self.hs_gamma)
|
|
113
|
-
|
|
114
|
-
self.lb_gamma
|
|
115
|
-
self.lb_gamma.
|
|
116
|
-
self.lb_gamma.
|
|
152
|
+
|
|
153
|
+
self.lb_gamma = QLabel(Equalizer)
|
|
154
|
+
self.lb_gamma.setObjectName(u"lb_gamma")
|
|
155
|
+
self.lb_gamma.setMinimumSize(QSize(25, 0))
|
|
156
|
+
self.lb_gamma.setMaximumSize(QSize(25, 16777215))
|
|
157
|
+
|
|
117
158
|
self.horizontalLayout_4.addWidget(self.lb_gamma)
|
|
159
|
+
|
|
160
|
+
|
|
118
161
|
self.verticalLayout.addLayout(self.horizontalLayout_4)
|
|
119
|
-
|
|
120
|
-
self.horizontalLayout_5
|
|
121
|
-
self.
|
|
122
|
-
self.label_5
|
|
123
|
-
self.label_5.
|
|
124
|
-
self.label_5.
|
|
162
|
+
|
|
163
|
+
self.horizontalLayout_5 = QHBoxLayout()
|
|
164
|
+
self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
|
|
165
|
+
self.label_5 = QLabel(Equalizer)
|
|
166
|
+
self.label_5.setObjectName(u"label_5")
|
|
167
|
+
self.label_5.setMinimumSize(QSize(70, 0))
|
|
168
|
+
self.label_5.setMaximumSize(QSize(70, 16777215))
|
|
169
|
+
|
|
125
170
|
self.horizontalLayout_5.addWidget(self.label_5)
|
|
126
|
-
|
|
127
|
-
self.hs_hue
|
|
128
|
-
self.hs_hue.
|
|
171
|
+
|
|
172
|
+
self.hs_hue = QSlider(Equalizer)
|
|
173
|
+
self.hs_hue.setObjectName(u"hs_hue")
|
|
174
|
+
self.hs_hue.setMinimumSize(QSize(200, 0))
|
|
175
|
+
self.hs_hue.setMaximumSize(QSize(200, 16777215))
|
|
129
176
|
self.hs_hue.setMinimum(-100)
|
|
130
|
-
self.hs_hue.
|
|
131
|
-
self.hs_hue.setOrientation(
|
|
132
|
-
|
|
177
|
+
self.hs_hue.setValue(0)
|
|
178
|
+
self.hs_hue.setOrientation(Qt.Horizontal)
|
|
179
|
+
|
|
133
180
|
self.horizontalLayout_5.addWidget(self.hs_hue)
|
|
134
|
-
|
|
135
|
-
self.lb_hue
|
|
136
|
-
self.lb_hue.
|
|
137
|
-
self.lb_hue.
|
|
181
|
+
|
|
182
|
+
self.lb_hue = QLabel(Equalizer)
|
|
183
|
+
self.lb_hue.setObjectName(u"lb_hue")
|
|
184
|
+
self.lb_hue.setMinimumSize(QSize(25, 0))
|
|
185
|
+
self.lb_hue.setMaximumSize(QSize(25, 16777215))
|
|
186
|
+
|
|
138
187
|
self.horizontalLayout_5.addWidget(self.lb_hue)
|
|
188
|
+
|
|
189
|
+
|
|
139
190
|
self.verticalLayout.addLayout(self.horizontalLayout_5)
|
|
140
|
-
|
|
141
|
-
self.horizontalLayout_6
|
|
142
|
-
self.
|
|
143
|
-
self.pb_reset_all
|
|
191
|
+
|
|
192
|
+
self.horizontalLayout_6 = QHBoxLayout()
|
|
193
|
+
self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
|
|
194
|
+
self.pb_reset_all = QPushButton(Equalizer)
|
|
195
|
+
self.pb_reset_all.setObjectName(u"pb_reset_all")
|
|
196
|
+
|
|
144
197
|
self.horizontalLayout_6.addWidget(self.pb_reset_all)
|
|
145
|
-
|
|
146
|
-
self.pb_reset
|
|
198
|
+
|
|
199
|
+
self.pb_reset = QPushButton(Equalizer)
|
|
200
|
+
self.pb_reset.setObjectName(u"pb_reset")
|
|
201
|
+
|
|
147
202
|
self.horizontalLayout_6.addWidget(self.pb_reset)
|
|
203
|
+
|
|
204
|
+
|
|
148
205
|
self.verticalLayout.addLayout(self.horizontalLayout_6)
|
|
149
|
-
|
|
150
|
-
self.
|
|
151
|
-
|
|
152
|
-
self.
|
|
153
|
-
|
|
154
|
-
self.horizontalLayout_7
|
|
155
|
-
self.
|
|
156
|
-
self.
|
|
206
|
+
|
|
207
|
+
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
|
|
208
|
+
|
|
209
|
+
self.verticalLayout.addItem(self.verticalSpacer)
|
|
210
|
+
|
|
211
|
+
self.horizontalLayout_7 = QHBoxLayout()
|
|
212
|
+
self.horizontalLayout_7.setObjectName(u"horizontalLayout_7")
|
|
213
|
+
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
|
|
214
|
+
|
|
215
|
+
self.horizontalLayout_7.addItem(self.horizontalSpacer)
|
|
216
|
+
|
|
217
|
+
self.pb_close = QPushButton(Equalizer)
|
|
218
|
+
self.pb_close.setObjectName(u"pb_close")
|
|
219
|
+
|
|
157
220
|
self.horizontalLayout_7.addWidget(self.pb_close)
|
|
221
|
+
|
|
222
|
+
|
|
158
223
|
self.verticalLayout.addLayout(self.horizontalLayout_7)
|
|
159
224
|
|
|
225
|
+
|
|
160
226
|
self.retranslateUi(Equalizer)
|
|
161
|
-
|
|
227
|
+
|
|
228
|
+
QMetaObject.connectSlotsByName(Equalizer)
|
|
229
|
+
# setupUi
|
|
162
230
|
|
|
163
231
|
def retranslateUi(self, Equalizer):
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
self.
|
|
167
|
-
self.
|
|
168
|
-
self.
|
|
169
|
-
self.
|
|
170
|
-
self.
|
|
171
|
-
self.
|
|
172
|
-
self.
|
|
173
|
-
self.
|
|
174
|
-
self.
|
|
175
|
-
self.
|
|
176
|
-
self.
|
|
177
|
-
self.
|
|
178
|
-
self.
|
|
179
|
-
|
|
232
|
+
Equalizer.setWindowTitle(QCoreApplication.translate("Equalizer", u"Video equalizer", None))
|
|
233
|
+
self.label_6.setText(QCoreApplication.translate("Equalizer", u"Video equalizer", None))
|
|
234
|
+
self.label.setText(QCoreApplication.translate("Equalizer", u"Brightness", None))
|
|
235
|
+
self.lb_brightness.setText(QCoreApplication.translate("Equalizer", u"0", None))
|
|
236
|
+
self.label_2.setText(QCoreApplication.translate("Equalizer", u"Contrast", None))
|
|
237
|
+
self.lb_contrast.setText(QCoreApplication.translate("Equalizer", u"0", None))
|
|
238
|
+
self.label_3.setText(QCoreApplication.translate("Equalizer", u"Saturation", None))
|
|
239
|
+
self.lb_saturation.setText(QCoreApplication.translate("Equalizer", u"0", None))
|
|
240
|
+
self.label_4.setText(QCoreApplication.translate("Equalizer", u"Gamma", None))
|
|
241
|
+
self.lb_gamma.setText(QCoreApplication.translate("Equalizer", u"0", None))
|
|
242
|
+
self.label_5.setText(QCoreApplication.translate("Equalizer", u"Hue", None))
|
|
243
|
+
self.lb_hue.setText(QCoreApplication.translate("Equalizer", u"0", None))
|
|
244
|
+
self.pb_reset_all.setText(QCoreApplication.translate("Equalizer", u"Reset all players", None))
|
|
245
|
+
self.pb_reset.setText(QCoreApplication.translate("Equalizer", u"Reset current player", None))
|
|
246
|
+
self.pb_close.setText(QCoreApplication.translate("Equalizer", u"Close", None))
|
|
247
|
+
# retranslateUi
|
|
248
|
+
|
boris/video_operations.py
CHANGED
boris/view_df.py
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
from .view_df_ui import Ui_Form
|
|
2
|
+
from PySide6.QtWidgets import QWidget, QFileDialog
|
|
3
|
+
from PySide6.QtCore import Qt, QAbstractTableModel
|
|
4
|
+
|
|
5
|
+
from . import config as cfg
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
from . import dialog
|
|
8
|
+
|
|
9
|
+
try:
|
|
10
|
+
import pyreadr
|
|
11
|
+
|
|
12
|
+
flag_pyreadr_loaded = True
|
|
13
|
+
except ModuleNotFoundError:
|
|
14
|
+
flag_pyreadr_loaded = False
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class DataFrameModel(QAbstractTableModel):
|
|
18
|
+
def __init__(self, dataframe):
|
|
19
|
+
super().__init__()
|
|
20
|
+
self._dataframe = dataframe
|
|
21
|
+
|
|
22
|
+
def rowCount(self, parent=None):
|
|
23
|
+
return self._dataframe.shape[0]
|
|
24
|
+
|
|
25
|
+
def columnCount(self, parent=None):
|
|
26
|
+
return self._dataframe.shape[1]
|
|
27
|
+
|
|
28
|
+
def data(self, index, role=Qt.DisplayRole):
|
|
29
|
+
if role == Qt.DisplayRole:
|
|
30
|
+
return str(self._dataframe.iat[index.row(), index.column()])
|
|
31
|
+
return None
|
|
32
|
+
|
|
33
|
+
def headerData(self, section, orientation, role=Qt.DisplayRole):
|
|
34
|
+
if role == Qt.DisplayRole:
|
|
35
|
+
if orientation == Qt.Horizontal:
|
|
36
|
+
return self._dataframe.columns[section]
|
|
37
|
+
elif orientation == Qt.Vertical:
|
|
38
|
+
return self._dataframe.index[section]
|
|
39
|
+
return None
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class View_df(QWidget, Ui_Form):
|
|
43
|
+
def __init__(self, plugin_name: str, plugin_version: str, df, parent=None):
|
|
44
|
+
super().__init__()
|
|
45
|
+
self.plugin_name = plugin_name
|
|
46
|
+
self.df = df
|
|
47
|
+
|
|
48
|
+
self.setupUi(self)
|
|
49
|
+
self.lb_plugin_info.setText(f"{plugin_name} v. {plugin_version}")
|
|
50
|
+
self.setWindowTitle(f"{plugin_name} v. {plugin_version}")
|
|
51
|
+
|
|
52
|
+
# print(f"{self.df=}")
|
|
53
|
+
|
|
54
|
+
self.pb_close.clicked.connect(self.close)
|
|
55
|
+
self.pb_save.clicked.connect(self.save)
|
|
56
|
+
|
|
57
|
+
model = DataFrameModel(self.df)
|
|
58
|
+
self.tv_df.setModel(model)
|
|
59
|
+
|
|
60
|
+
def save(self):
|
|
61
|
+
file_formats = (
|
|
62
|
+
cfg.TSV,
|
|
63
|
+
cfg.CSV,
|
|
64
|
+
cfg.ODS,
|
|
65
|
+
cfg.XLSX,
|
|
66
|
+
# cfg.XLS,
|
|
67
|
+
cfg.HTML,
|
|
68
|
+
# cfg.TBS,
|
|
69
|
+
cfg.PANDAS_DF,
|
|
70
|
+
cfg.RDS,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
file_dialog_options = QFileDialog.Options()
|
|
74
|
+
file_dialog_options |= QFileDialog.DontConfirmOverwrite
|
|
75
|
+
|
|
76
|
+
file_name, filter_ = QFileDialog().getSaveFileName(
|
|
77
|
+
None, f"Save {self.plugin_name}", "", ";;".join(file_formats), options=file_dialog_options
|
|
78
|
+
)
|
|
79
|
+
if not file_name:
|
|
80
|
+
return
|
|
81
|
+
|
|
82
|
+
outputFormat = cfg.FILE_NAME_SUFFIX[filter_]
|
|
83
|
+
if Path(file_name).suffix != "." + outputFormat:
|
|
84
|
+
file_name = f"{file_name}.{outputFormat}"
|
|
85
|
+
if Path(file_name).exists():
|
|
86
|
+
if (
|
|
87
|
+
dialog.MessageDialog(cfg.programName, f"The file {file_name} already exists.", [cfg.CANCEL, cfg.OVERWRITE])
|
|
88
|
+
== cfg.CANCEL
|
|
89
|
+
):
|
|
90
|
+
return
|
|
91
|
+
|
|
92
|
+
if filter_ == cfg.TSV:
|
|
93
|
+
self.df.to_csv(file_name, sep="\t", index=False)
|
|
94
|
+
if filter_ == cfg.CSV:
|
|
95
|
+
self.df.to_csv(file_name, sep=";", index=False)
|
|
96
|
+
if filter_ == cfg.XLSX:
|
|
97
|
+
self.df.to_excel(file_name, index=False)
|
|
98
|
+
if filter_ == cfg.ODS:
|
|
99
|
+
self.df.to_excel(file_name, index=False, engine="odf")
|
|
100
|
+
if filter_ == cfg.HTML:
|
|
101
|
+
self.df.to_html(file_name, index=False)
|
|
102
|
+
if filter_ == cfg.PANDAS_DF:
|
|
103
|
+
self.df.to_pickle(file_name)
|
|
104
|
+
|
|
105
|
+
if filter_ == cfg.RDS and flag_pyreadr_loaded:
|
|
106
|
+
pyreadr.write_rds(file_name, self.df)
|
boris/view_df_ui.py
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
################################################################################
|
|
4
|
+
## Form generated from reading UI file 'view_df.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
|
+
################################################################################
|
|
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, QHBoxLayout, QHeaderView, QLabel,
|
|
19
|
+
QPushButton, QSizePolicy, QSpacerItem, QTableView,
|
|
20
|
+
QVBoxLayout, QWidget)
|
|
21
|
+
|
|
22
|
+
class Ui_Form(object):
|
|
23
|
+
def setupUi(self, Form):
|
|
24
|
+
if not Form.objectName():
|
|
25
|
+
Form.setObjectName(u"Form")
|
|
26
|
+
Form.resize(400, 300)
|
|
27
|
+
self.verticalLayout_2 = QVBoxLayout(Form)
|
|
28
|
+
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
|
|
29
|
+
self.lb_plugin_info = QLabel(Form)
|
|
30
|
+
self.lb_plugin_info.setObjectName(u"lb_plugin_info")
|
|
31
|
+
|
|
32
|
+
self.verticalLayout_2.addWidget(self.lb_plugin_info)
|
|
33
|
+
|
|
34
|
+
self.verticalLayout = QVBoxLayout()
|
|
35
|
+
self.verticalLayout.setObjectName(u"verticalLayout")
|
|
36
|
+
self.tv_df = QTableView(Form)
|
|
37
|
+
self.tv_df.setObjectName(u"tv_df")
|
|
38
|
+
|
|
39
|
+
self.verticalLayout.addWidget(self.tv_df)
|
|
40
|
+
|
|
41
|
+
self.horizontalLayout = QHBoxLayout()
|
|
42
|
+
self.horizontalLayout.setObjectName(u"horizontalLayout")
|
|
43
|
+
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
|
|
44
|
+
|
|
45
|
+
self.horizontalLayout.addItem(self.horizontalSpacer)
|
|
46
|
+
|
|
47
|
+
self.pb_save = QPushButton(Form)
|
|
48
|
+
self.pb_save.setObjectName(u"pb_save")
|
|
49
|
+
|
|
50
|
+
self.horizontalLayout.addWidget(self.pb_save)
|
|
51
|
+
|
|
52
|
+
self.pb_close = QPushButton(Form)
|
|
53
|
+
self.pb_close.setObjectName(u"pb_close")
|
|
54
|
+
|
|
55
|
+
self.horizontalLayout.addWidget(self.pb_close)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
self.verticalLayout.addLayout(self.horizontalLayout)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
self.verticalLayout_2.addLayout(self.verticalLayout)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
self.retranslateUi(Form)
|
|
65
|
+
|
|
66
|
+
QMetaObject.connectSlotsByName(Form)
|
|
67
|
+
# setupUi
|
|
68
|
+
|
|
69
|
+
def retranslateUi(self, Form):
|
|
70
|
+
Form.setWindowTitle(QCoreApplication.translate("Form", u"Form", None))
|
|
71
|
+
self.lb_plugin_info.setText(QCoreApplication.translate("Form", u"TextLabel", None))
|
|
72
|
+
self.pb_save.setText(QCoreApplication.translate("Form", u"Save results", None))
|
|
73
|
+
self.pb_close.setText(QCoreApplication.translate("Form", u"Close", None))
|
|
74
|
+
# retranslateUi
|
|
75
|
+
|
boris/write_event.py
CHANGED
|
@@ -93,6 +93,14 @@ def write_event(self, event: dict, mem_time: dec) -> int:
|
|
|
93
93
|
if self.pj[cfg.OBSERVATIONS][self.observationId][cfg.TYPE] in (cfg.MEDIA):
|
|
94
94
|
if self.pj[cfg.OBSERVATIONS][self.observationId].get(cfg.MEDIA_CREATION_DATE_AS_OFFSET, False):
|
|
95
95
|
media_file_name = self.dw_player[0].player.playlist[self.dw_player[0].player.playlist_pos]["filename"]
|
|
96
|
+
# add media creation date/time
|
|
97
|
+
|
|
98
|
+
"""
|
|
99
|
+
print(f"{media_file_name=}")
|
|
100
|
+
print(f"{mem_time=}")
|
|
101
|
+
print(f"{dec(self.pj[cfg.OBSERVATIONS][self.observationId][cfg.MEDIA_INFO][cfg.MEDIA_CREATION_TIME][media_file_name])=}")
|
|
102
|
+
"""
|
|
103
|
+
|
|
96
104
|
mem_time += dec(self.pj[cfg.OBSERVATIONS][self.observationId][cfg.MEDIA_INFO][cfg.MEDIA_CREATION_TIME][media_file_name])
|
|
97
105
|
|
|
98
106
|
# check if time > 2**31 - 1 (2147483647)
|
|
@@ -100,7 +108,7 @@ def write_event(self, event: dict, mem_time: dec) -> int:
|
|
|
100
108
|
if (mem_time < -2147483647) or (mem_time > 2147483647):
|
|
101
109
|
_ = dialog.MessageDialog(
|
|
102
110
|
cfg.programName,
|
|
103
|
-
("The timestamp must be between -2147483647 and 2147483647.<br>
|
|
111
|
+
(f"The timestamp must be between -2147483647 and 2147483647.<br>The current timestamp is {mem_time}"),
|
|
104
112
|
(cfg.OK,),
|
|
105
113
|
)
|
|
106
114
|
return 1
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: boris-behav-obs
|
|
3
|
-
Version:
|
|
3
|
+
Version: 9.0.1
|
|
4
4
|
Summary: BORIS - Behavioral Observation Research Interactive Software
|
|
5
5
|
Author-email: Olivier Friard <olivier.friard@unito.it>
|
|
6
|
-
License:
|
|
6
|
+
License: GNU GENERAL PUBLIC LICENSE
|
|
7
7
|
Version 3, 29 June 2007
|
|
8
8
|
|
|
9
9
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
|
@@ -701,11 +701,11 @@ Requires-Dist: numpy>=1.26.4
|
|
|
701
701
|
Requires-Dist: matplotlib>=3.3.3
|
|
702
702
|
Requires-Dist: pandas>=2.2.2
|
|
703
703
|
Requires-Dist: tablib[cli,html,ods,pandas,xls,xlsx]>=3
|
|
704
|
-
Requires-Dist: pyqt5>=5.15
|
|
705
704
|
Requires-Dist: pyreadr
|
|
705
|
+
Requires-Dist: pyside6==6.8.0.2
|
|
706
|
+
Requires-Dist: hachoir>=3.3.0
|
|
706
707
|
Provides-Extra: dev
|
|
707
708
|
Requires-Dist: black; extra == "dev"
|
|
708
709
|
Requires-Dist: ruff; extra == "dev"
|
|
709
710
|
Requires-Dist: pytest; extra == "dev"
|
|
710
711
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
711
|
-
|