boris-behav-obs 8.16.5__py3-none-any.whl → 9.7.12__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 (126) hide show
  1. boris/__init__.py +1 -1
  2. boris/__main__.py +1 -1
  3. boris/about.py +28 -40
  4. boris/add_modifier.py +88 -80
  5. boris/add_modifier_ui.py +266 -144
  6. boris/advanced_event_filtering.py +23 -29
  7. boris/analysis_plugins/__init__.py +0 -0
  8. boris/analysis_plugins/_export_to_feral.py +225 -0
  9. boris/analysis_plugins/_latency.py +59 -0
  10. boris/analysis_plugins/irr_cohen_kappa.py +109 -0
  11. boris/analysis_plugins/irr_cohen_kappa_with_modifiers.py +112 -0
  12. boris/analysis_plugins/irr_weighted_cohen_kappa.py +157 -0
  13. boris/analysis_plugins/irr_weighted_cohen_kappa_with_modifiers.py +162 -0
  14. boris/analysis_plugins/list_of_dataframe_columns.py +22 -0
  15. boris/analysis_plugins/number_of_occurences.py +22 -0
  16. boris/analysis_plugins/number_of_occurences_by_independent_variable.py +54 -0
  17. boris/analysis_plugins/time_budget.py +61 -0
  18. boris/behav_coding_map_creator.py +235 -236
  19. boris/behavior_binary_table.py +33 -50
  20. boris/behaviors_coding_map.py +17 -18
  21. boris/boris_cli.py +6 -25
  22. boris/cmd_arguments.py +12 -1
  23. boris/coding_pad.py +19 -36
  24. boris/config.py +109 -50
  25. boris/config_file.py +58 -67
  26. boris/connections.py +105 -58
  27. boris/converters.py +13 -37
  28. boris/converters_ui.py +187 -110
  29. boris/cooccurence.py +250 -0
  30. boris/core.py +2174 -1303
  31. boris/core_qrc.py +15892 -10829
  32. boris/core_ui.py +941 -806
  33. boris/db_functions.py +17 -42
  34. boris/dev.py +27 -7
  35. boris/dialog.py +461 -242
  36. boris/duration_widget.py +9 -14
  37. boris/edit_event.py +61 -31
  38. boris/edit_event_ui.py +208 -97
  39. boris/event_operations.py +405 -281
  40. boris/events_cursor.py +25 -17
  41. boris/events_snapshots.py +36 -82
  42. boris/exclusion_matrix.py +4 -9
  43. boris/export_events.py +180 -203
  44. boris/export_observation.py +60 -73
  45. boris/external_processes.py +123 -98
  46. boris/geometric_measurement.py +427 -218
  47. boris/gui_utilities.py +91 -14
  48. boris/image_overlay.py +4 -4
  49. boris/import_observations.py +190 -98
  50. boris/ipc_mpv.py +325 -0
  51. boris/irr.py +20 -57
  52. boris/latency.py +31 -24
  53. boris/measurement_widget.py +14 -18
  54. boris/media_file.py +17 -19
  55. boris/menu_options.py +16 -6
  56. boris/modifier_coding_map_creator.py +1013 -0
  57. boris/modifiers_coding_map.py +7 -9
  58. boris/mpv2.py +128 -35
  59. boris/observation.py +501 -211
  60. boris/observation_operations.py +1037 -393
  61. boris/observation_ui.py +573 -363
  62. boris/observations_list.py +51 -58
  63. boris/otx_parser.py +74 -68
  64. boris/param_panel.py +45 -59
  65. boris/param_panel_ui.py +254 -138
  66. boris/player_dock_widget.py +91 -56
  67. boris/plot_data_module.py +20 -53
  68. boris/plot_events.py +56 -153
  69. boris/plot_events_rt.py +16 -30
  70. boris/plot_spectrogram_rt.py +83 -56
  71. boris/plot_waveform_rt.py +27 -49
  72. boris/plugins.py +468 -0
  73. boris/portion/__init__.py +18 -8
  74. boris/portion/const.py +35 -18
  75. boris/portion/dict.py +5 -5
  76. boris/portion/func.py +2 -2
  77. boris/portion/interval.py +21 -41
  78. boris/portion/io.py +41 -32
  79. boris/preferences.py +307 -123
  80. boris/preferences_ui.py +686 -227
  81. boris/project.py +294 -271
  82. boris/project_functions.py +626 -537
  83. boris/project_import_export.py +204 -213
  84. boris/project_ui.py +673 -441
  85. boris/qrc_boris.py +6 -3
  86. boris/qrc_boris5.py +6 -3
  87. boris/select_modifiers.py +62 -90
  88. boris/select_observations.py +19 -197
  89. boris/select_subj_behav.py +67 -39
  90. boris/state_events.py +51 -33
  91. boris/subjects_pad.py +7 -9
  92. boris/synthetic_time_budget.py +42 -26
  93. boris/time_budget_functions.py +169 -169
  94. boris/time_budget_widget.py +77 -89
  95. boris/transitions.py +41 -41
  96. boris/utilities.py +594 -226
  97. boris/version.py +3 -3
  98. boris/video_equalizer.py +16 -14
  99. boris/video_equalizer_ui.py +199 -130
  100. boris/video_operations.py +86 -28
  101. boris/view_df.py +104 -0
  102. boris/view_df_ui.py +75 -0
  103. boris/write_event.py +240 -136
  104. boris_behav_obs-9.7.12.dist-info/METADATA +139 -0
  105. boris_behav_obs-9.7.12.dist-info/RECORD +110 -0
  106. {boris_behav_obs-8.16.5.dist-info → boris_behav_obs-9.7.12.dist-info}/WHEEL +1 -1
  107. boris_behav_obs-9.7.12.dist-info/entry_points.txt +2 -0
  108. boris/README.TXT +0 -22
  109. boris/add_modifier.ui +0 -323
  110. boris/converters.ui +0 -289
  111. boris/core.qrc +0 -37
  112. boris/core.ui +0 -1571
  113. boris/edit_event.ui +0 -233
  114. boris/icons/logo_eye.ico +0 -0
  115. boris/map_creator.py +0 -982
  116. boris/observation.ui +0 -814
  117. boris/param_panel.ui +0 -379
  118. boris/preferences.ui +0 -537
  119. boris/project.ui +0 -1074
  120. boris/vlc_local.py +0 -90
  121. boris_behav_obs-8.16.5.dist-info/LICENSE.TXT +0 -674
  122. boris_behav_obs-8.16.5.dist-info/METADATA +0 -134
  123. boris_behav_obs-8.16.5.dist-info/RECORD +0 -107
  124. boris_behav_obs-8.16.5.dist-info/entry_points.txt +0 -2
  125. {boris → boris_behav_obs-9.7.12.dist-info/licenses}/LICENSE.TXT +0 -0
  126. {boris_behav_obs-8.16.5.dist-info → boris_behav_obs-9.7.12.dist-info}/top_level.txt +0 -0
boris/duration_widget.py CHANGED
@@ -2,12 +2,12 @@
2
2
 
3
3
  widget to edit duration > 24 h or < 0
4
4
 
5
- https://stackoverflow.com/questions/44380202/creating-a-custom-widget-in-pyqt5
5
+ https://stackoverflow.com/questions/44380202/creating-a-custom-widget-in-PySide6
6
6
  """
7
7
 
8
8
  from decimal import Decimal as dec
9
9
 
10
- from PyQt5.QtWidgets import (
10
+ from PySide6.QtWidgets import (
11
11
  QWidget,
12
12
  QHBoxLayout,
13
13
  QPushButton,
@@ -20,14 +20,13 @@ from PyQt5.QtWidgets import (
20
20
  QRadioButton,
21
21
  )
22
22
 
23
- from PyQt5.QtCore import pyqtSignal
23
+ from PySide6.QtCore import Signal
24
24
 
25
25
  from . import config as cfg
26
26
 
27
27
 
28
28
  class Widget_hhmmss(QWidget):
29
-
30
- time_changed_signal = pyqtSignal(float)
29
+ time_changed_signal = Signal(float)
31
30
 
32
31
  def __init__(self, parent=None):
33
32
  QWidget.__init__(self, parent=parent)
@@ -84,12 +83,7 @@ class Widget_hhmmss(QWidget):
84
83
  self.update_time_value()
85
84
 
86
85
  def update_time_value(self):
87
- new_time = (
88
- self.hours.value() * 3600
89
- + self.minutes.value() * 60
90
- + self.seconds.value()
91
- + self.milliseconds.value() / 1000
92
- )
86
+ new_time = self.hours.value() * 3600 + self.minutes.value() * 60 + self.seconds.value() + self.milliseconds.value() / 1000
93
87
  if self.sign.text() == "-":
94
88
  new_time = -new_time
95
89
 
@@ -123,8 +117,7 @@ class Widget_hhmmss(QWidget):
123
117
 
124
118
 
125
119
  class Widget_seconds(QWidget):
126
-
127
- time_changed_signal = pyqtSignal(float)
120
+ time_changed_signal = Signal(float)
128
121
 
129
122
  def __init__(self, parent=None):
130
123
  QWidget.__init__(self, parent=parent)
@@ -151,7 +144,6 @@ class Widget_seconds(QWidget):
151
144
 
152
145
  class Duration_widget(QWidget):
153
146
  def __init__(self, time_value=0, parent=None):
154
-
155
147
  super().__init__()
156
148
 
157
149
  self.time_value = dec(time_value).quantize(dec(".001"))
@@ -161,6 +153,7 @@ class Duration_widget(QWidget):
161
153
  lay.setContentsMargins(0, 0, 0, 0)
162
154
 
163
155
  self.Stack = QStackedWidget()
156
+
164
157
  self.w1 = Widget_hhmmss()
165
158
  self.w1.time_changed_signal.connect(self.time_changed)
166
159
  self.Stack.addWidget(self.w1)
@@ -192,6 +185,8 @@ class Duration_widget(QWidget):
192
185
  self.time_value = x
193
186
 
194
187
  def set_time(self, new_time):
188
+ if new_time.is_nan():
189
+ return
195
190
 
196
191
  self.w1.sign.setText("-" if new_time < 0 else "+")
197
192
 
boris/edit_event.py CHANGED
@@ -1,7 +1,7 @@
1
1
  """
2
2
  BORIS
3
3
  Behavioral Observation Research Interactive Software
4
- Copyright 2012-2023 Olivier Friard
4
+ Copyright 2012-2025 Olivier Friard
5
5
 
6
6
  This file is part of BORIS.
7
7
 
@@ -21,10 +21,10 @@ This file is part of BORIS.
21
21
  """
22
22
 
23
23
  from decimal import Decimal as dec
24
+ import logging
24
25
 
25
- from PyQt5.QtWidgets import (
26
+ from PySide6.QtWidgets import (
26
27
  QDialog,
27
- QSpinBox,
28
28
  QHBoxLayout,
29
29
  QLabel,
30
30
  QLineEdit,
@@ -36,7 +36,7 @@ from PyQt5.QtWidgets import (
36
36
  )
37
37
 
38
38
  from . import config as cfg
39
- from . import duration_widget
39
+ from . import dialog
40
40
  from .edit_event_ui import Ui_Form
41
41
 
42
42
 
@@ -44,14 +44,14 @@ class DlgEditEvent(QDialog, Ui_Form):
44
44
  def __init__(
45
45
  self,
46
46
  observation_type: str,
47
- time_value: dec = dec(0),
47
+ time_value: dec = dec("NaN"),
48
48
  image_idx=None,
49
49
  current_time=0,
50
50
  time_format: str = cfg.S,
51
51
  show_set_current_time: bool = False,
52
+ exif_date_time: dec | None = None,
52
53
  parent=None,
53
54
  ):
54
-
55
55
  super().__init__(parent)
56
56
  self.setupUi(self)
57
57
  self.time_value = time_value
@@ -60,61 +60,92 @@ class DlgEditEvent(QDialog, Ui_Form):
60
60
 
61
61
  self.pb_set_to_current_time.setVisible(show_set_current_time)
62
62
  self.current_time = current_time
63
+ self.exif_date_time = exif_date_time
64
+
65
+ # hide frame index for all observations
66
+ # frame index is determined in base of time
67
+ for w in (
68
+ self.lb_frame_idx,
69
+ self.sb_frame_idx,
70
+ self.cb_set_frame_idx_na,
71
+ ):
72
+ w.setVisible(False)
63
73
 
64
74
  # hide image index
65
75
  if observation_type in (cfg.LIVE, cfg.MEDIA):
66
- for w in (self.lb_image_idx, self.sb_image_idx, self.cb_set_time_na):
76
+ # hide image index
77
+ for w in (
78
+ self.cb_set_time_na,
79
+ self.gb_image_index,
80
+ ):
67
81
  w.setVisible(False)
68
82
 
69
- if (observation_type in (cfg.LIVE, cfg.MEDIA)) or (
70
- observation_type == cfg.IMAGES and self.time_value != cfg.NA
71
- ):
72
- self.time_widget = duration_widget.Duration_widget(self.time_value)
73
- if time_format == cfg.S:
74
- self.time_widget.set_format_s()
75
- if time_format == cfg.HHMMSS:
76
- self.time_widget.set_format_hhmmss()
83
+ # widget for time
84
+ self.time_widget = dialog.get_time_widget(self.time_value)
77
85
 
78
- self.horizontalLayout_2.insertWidget(0, self.time_widget)
86
+ if time_format == cfg.S:
87
+ self.time_widget.rb_seconds.setChecked(True)
88
+ if time_format == cfg.HHMMSS:
89
+ self.time_widget.rb_time.setChecked(True)
90
+ if not self.time_value.is_nan() and int(self.time_value) > cfg.DATE_CUTOFF:
91
+ self.time_widget.rb_datetime.setChecked(True)
92
+
93
+ self.horizontalLayout_3.insertWidget(0, self.time_widget)
79
94
 
80
95
  if observation_type == cfg.IMAGES:
81
96
  # hide frame index widgets
82
- for w in (self.lb_frame_idx, self.sb_frame_idx, self.cb_set_frame_idx_na):
83
- w.setVisible(False)
97
+ self.pb_set_to_current_time.setVisible(self.exif_date_time is not None)
84
98
  self.sb_image_idx.setValue(self.image_idx)
85
99
 
86
- self.pb_set_to_current_time.setText("Set to current image index")
87
-
88
100
  self.pb_set_to_current_time.clicked.connect(self.set_to_current_time)
101
+ self.pb_set_to_current_image_index.clicked.connect(self.set_to_current_image_index)
102
+
89
103
  self.cb_set_time_na.stateChanged.connect(self.time_na)
90
104
 
91
- self.cb_set_frame_idx_na.stateChanged.connect(self.frame_idx_na)
92
- self.pbOK.clicked.connect(self.accept)
105
+ # self.cb_set_frame_idx_na.stateChanged.connect(self.frame_idx_na)
106
+ self.pbOK.clicked.connect(self.close_widget)
93
107
  self.pbCancel.clicked.connect(self.reject)
94
108
 
95
- def set_to_current_time(self):
109
+ def close_widget(self):
96
110
  """
97
- set time to current media time
111
+ close the widget
98
112
  """
99
- if self.observation_type in (cfg.LIVE, cfg.MEDIA):
100
- self.time_widget.set_time(float(self.current_time))
113
+ if self.observation_type in (cfg.IMAGES):
114
+ if self.sb_image_idx.value() == 0:
115
+ QMessageBox.warning(self, cfg.programName, "The image index cannot be null")
116
+ return
117
+ self.accept()
101
118
 
119
+ def set_to_current_image_index(self):
120
+ """
121
+ set image index to current image index
122
+ """
102
123
  if self.observation_type in (cfg.IMAGES):
103
124
  self.sb_image_idx.setValue(int(self.current_time))
104
125
 
105
- def frame_idx_na(self):
126
+ def set_to_current_time(self):
106
127
  """
107
- set/unset frame index NA
128
+ set time to current media time
108
129
  """
109
- self.lb_frame_idx.setEnabled(not self.cb_set_frame_idx_na.isChecked())
110
- self.sb_frame_idx.setEnabled(not self.cb_set_frame_idx_na.isChecked())
130
+
131
+ if self.observation_type in (cfg.LIVE, cfg.MEDIA):
132
+ self.time_widget.set_time(dec(float(self.current_time)))
133
+
134
+ if self.observation_type == cfg.IMAGES:
135
+ if self.exif_date_time is not None:
136
+ self.time_widget.set_time(dec(self.exif_date_time))
111
137
 
112
138
  def time_na(self):
113
139
  """
114
140
  set/unset time to NA
115
141
  """
116
142
 
143
+ logging.debug("time_na function")
144
+
145
+ self.time_widget.setVisible(not self.cb_set_time_na.isChecked())
117
146
  self.time_widget.setEnabled(not self.cb_set_time_na.isChecked())
147
+
148
+ self.pb_set_to_current_time.setVisible(not self.cb_set_time_na.isChecked() and self.exif_date_time is not None)
118
149
  self.pb_set_to_current_time.setEnabled(not self.cb_set_time_na.isChecked())
119
150
 
120
151
 
@@ -168,7 +199,6 @@ class EditSelectedEvents(QDialog):
168
199
  self.setLayout(hbox)
169
200
 
170
201
  def rb_changed(self):
171
-
172
202
  self.newText.setEnabled(not self.rbComment.isChecked())
173
203
  self.commentText.setEnabled(self.rbComment.isChecked())
174
204
 
boris/edit_event_ui.py CHANGED
@@ -1,122 +1,233 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
- # Form implementation generated from reading ui file 'boris/edit_event.ui'
4
- #
5
- # Created by: PyQt5 UI code generator 5.15.9
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 'edit_event.ui'
5
+ ##
6
+ ## Created by: Qt User Interface Compiler version 6.9.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, QComboBox, QGroupBox,
19
+ QHBoxLayout, QLabel, QPlainTextEdit, QPushButton,
20
+ QSizePolicy, QSpacerItem, QSpinBox, QVBoxLayout,
21
+ QWidget)
13
22
 
14
23
  class Ui_Form(object):
15
24
  def setupUi(self, Form):
16
- Form.setObjectName("Form")
17
- Form.resize(413, 488)
18
- self.verticalLayout = QtWidgets.QVBoxLayout(Form)
19
- self.verticalLayout.setObjectName("verticalLayout")
20
- self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
21
- self.horizontalLayout_3.setObjectName("horizontalLayout_3")
22
- self.label = QtWidgets.QLabel(Form)
23
- self.label.setObjectName("label")
24
- self.horizontalLayout_3.addWidget(self.label)
25
- self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
26
- self.horizontalLayout_2.setObjectName("horizontalLayout_2")
27
- self.pb_set_to_current_time = QtWidgets.QPushButton(Form)
28
- self.pb_set_to_current_time.setObjectName("pb_set_to_current_time")
29
- self.horizontalLayout_2.addWidget(self.pb_set_to_current_time)
30
- self.cb_set_time_na = QtWidgets.QCheckBox(Form)
31
- self.cb_set_time_na.setObjectName("cb_set_time_na")
32
- self.horizontalLayout_2.addWidget(self.cb_set_time_na)
33
- spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
34
- self.horizontalLayout_2.addItem(spacerItem)
25
+ if not Form.objectName():
26
+ Form.setObjectName(u"Form")
27
+ Form.resize(600, 638)
28
+ self.verticalLayout_3 = QVBoxLayout(Form)
29
+ self.verticalLayout_3.setObjectName(u"verticalLayout_3")
30
+ self.gb_time = QGroupBox(Form)
31
+ self.gb_time.setObjectName(u"gb_time")
32
+ self.verticalLayout = QVBoxLayout(self.gb_time)
33
+ self.verticalLayout.setObjectName(u"verticalLayout")
34
+ self.horizontalLayout_8 = QHBoxLayout()
35
+ self.horizontalLayout_8.setObjectName(u"horizontalLayout_8")
36
+ self.cb_set_time_na = QCheckBox(self.gb_time)
37
+ self.cb_set_time_na.setObjectName(u"cb_set_time_na")
38
+
39
+ self.horizontalLayout_8.addWidget(self.cb_set_time_na)
40
+
41
+ self.horizontalSpacer_7 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
42
+
43
+ self.horizontalLayout_8.addItem(self.horizontalSpacer_7)
44
+
45
+
46
+ self.verticalLayout.addLayout(self.horizontalLayout_8)
47
+
48
+ self.horizontalLayout_3 = QHBoxLayout()
49
+ self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
50
+ self.lb_time = QLabel(self.gb_time)
51
+ self.lb_time.setObjectName(u"lb_time")
52
+
53
+ self.horizontalLayout_3.addWidget(self.lb_time)
54
+
55
+ self.horizontalLayout_2 = QHBoxLayout()
56
+ self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
57
+ self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
58
+
59
+ self.horizontalLayout_2.addItem(self.horizontalSpacer)
60
+
61
+
35
62
  self.horizontalLayout_3.addLayout(self.horizontalLayout_2)
63
+
64
+
36
65
  self.verticalLayout.addLayout(self.horizontalLayout_3)
37
- self.horizontalLayout_7 = QtWidgets.QHBoxLayout()
38
- self.horizontalLayout_7.setObjectName("horizontalLayout_7")
39
- self.lb_image_idx = QtWidgets.QLabel(Form)
40
- self.lb_image_idx.setObjectName("lb_image_idx")
41
- self.horizontalLayout_7.addWidget(self.lb_image_idx)
42
- self.sb_image_idx = QtWidgets.QSpinBox(Form)
66
+
67
+ self.horizontalLayout_9 = QHBoxLayout()
68
+ self.horizontalLayout_9.setObjectName(u"horizontalLayout_9")
69
+ self.pb_set_to_current_time = QPushButton(self.gb_time)
70
+ self.pb_set_to_current_time.setObjectName(u"pb_set_to_current_time")
71
+
72
+ self.horizontalLayout_9.addWidget(self.pb_set_to_current_time)
73
+
74
+ self.horizontalSpacer_8 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
75
+
76
+ self.horizontalLayout_9.addItem(self.horizontalSpacer_8)
77
+
78
+
79
+ self.verticalLayout.addLayout(self.horizontalLayout_9)
80
+
81
+ self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
82
+
83
+ self.verticalLayout.addItem(self.verticalSpacer)
84
+
85
+
86
+ self.verticalLayout_3.addWidget(self.gb_time)
87
+
88
+ self.gb_image_index = QGroupBox(Form)
89
+ self.gb_image_index.setObjectName(u"gb_image_index")
90
+ self.verticalLayout_2 = QVBoxLayout(self.gb_image_index)
91
+ self.verticalLayout_2.setObjectName(u"verticalLayout_2")
92
+ self.horizontalLayout_7 = QHBoxLayout()
93
+ self.horizontalLayout_7.setObjectName(u"horizontalLayout_7")
94
+ self.sb_image_idx = QSpinBox(self.gb_image_index)
95
+ self.sb_image_idx.setObjectName(u"sb_image_idx")
43
96
  self.sb_image_idx.setMaximum(10000000)
44
- self.sb_image_idx.setObjectName("sb_image_idx")
97
+
45
98
  self.horizontalLayout_7.addWidget(self.sb_image_idx)
46
- spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
47
- self.horizontalLayout_7.addItem(spacerItem1)
48
- self.verticalLayout.addLayout(self.horizontalLayout_7)
49
- self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
50
- self.horizontalLayout_4.setObjectName("horizontalLayout_4")
51
- self.lbSubject = QtWidgets.QLabel(Form)
52
- self.lbSubject.setObjectName("lbSubject")
99
+
100
+ self.pb_set_to_current_image_index = QPushButton(self.gb_image_index)
101
+ self.pb_set_to_current_image_index.setObjectName(u"pb_set_to_current_image_index")
102
+
103
+ self.horizontalLayout_7.addWidget(self.pb_set_to_current_image_index)
104
+
105
+ self.horizontalSpacer_6 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
106
+
107
+ self.horizontalLayout_7.addItem(self.horizontalSpacer_6)
108
+
109
+
110
+ self.verticalLayout_2.addLayout(self.horizontalLayout_7)
111
+
112
+
113
+ self.verticalLayout_3.addWidget(self.gb_image_index)
114
+
115
+ self.horizontalLayout_4 = QHBoxLayout()
116
+ self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
117
+ self.lbSubject = QLabel(Form)
118
+ self.lbSubject.setObjectName(u"lbSubject")
119
+
53
120
  self.horizontalLayout_4.addWidget(self.lbSubject)
54
- self.cobSubject = QtWidgets.QComboBox(Form)
55
- self.cobSubject.setObjectName("cobSubject")
121
+
122
+ self.cobSubject = QComboBox(Form)
123
+ self.cobSubject.setObjectName(u"cobSubject")
124
+
56
125
  self.horizontalLayout_4.addWidget(self.cobSubject)
57
- spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
58
- self.horizontalLayout_4.addItem(spacerItem2)
59
- self.verticalLayout.addLayout(self.horizontalLayout_4)
60
- self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
61
- self.horizontalLayout_5.setObjectName("horizontalLayout_5")
62
- self.label_2 = QtWidgets.QLabel(Form)
63
- self.label_2.setObjectName("label_2")
126
+
127
+ self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
128
+
129
+ self.horizontalLayout_4.addItem(self.horizontalSpacer_2)
130
+
131
+
132
+ self.verticalLayout_3.addLayout(self.horizontalLayout_4)
133
+
134
+ self.horizontalLayout_5 = QHBoxLayout()
135
+ self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
136
+ self.label_2 = QLabel(Form)
137
+ self.label_2.setObjectName(u"label_2")
138
+
64
139
  self.horizontalLayout_5.addWidget(self.label_2)
65
- self.cobCode = QtWidgets.QComboBox(Form)
66
- self.cobCode.setObjectName("cobCode")
140
+
141
+ self.cobCode = QComboBox(Form)
142
+ self.cobCode.setObjectName(u"cobCode")
143
+
67
144
  self.horizontalLayout_5.addWidget(self.cobCode)
68
- spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
69
- self.horizontalLayout_5.addItem(spacerItem3)
70
- self.verticalLayout.addLayout(self.horizontalLayout_5)
71
- self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
72
- self.horizontalLayout_6.setObjectName("horizontalLayout_6")
73
- self.lb_frame_idx = QtWidgets.QLabel(Form)
74
- self.lb_frame_idx.setObjectName("lb_frame_idx")
145
+
146
+ self.horizontalSpacer_3 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
147
+
148
+ self.horizontalLayout_5.addItem(self.horizontalSpacer_3)
149
+
150
+
151
+ self.verticalLayout_3.addLayout(self.horizontalLayout_5)
152
+
153
+ self.horizontalLayout_6 = QHBoxLayout()
154
+ self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
155
+ self.lb_frame_idx = QLabel(Form)
156
+ self.lb_frame_idx.setObjectName(u"lb_frame_idx")
157
+
75
158
  self.horizontalLayout_6.addWidget(self.lb_frame_idx)
76
- self.sb_frame_idx = QtWidgets.QSpinBox(Form)
159
+
160
+ self.sb_frame_idx = QSpinBox(Form)
161
+ self.sb_frame_idx.setObjectName(u"sb_frame_idx")
77
162
  self.sb_frame_idx.setMinimum(0)
78
163
  self.sb_frame_idx.setMaximum(100000000)
79
- self.sb_frame_idx.setObjectName("sb_frame_idx")
164
+
80
165
  self.horizontalLayout_6.addWidget(self.sb_frame_idx)
81
- self.cb_set_frame_idx_na = QtWidgets.QCheckBox(Form)
82
- self.cb_set_frame_idx_na.setObjectName("cb_set_frame_idx_na")
166
+
167
+ self.cb_set_frame_idx_na = QCheckBox(Form)
168
+ self.cb_set_frame_idx_na.setObjectName(u"cb_set_frame_idx_na")
169
+
83
170
  self.horizontalLayout_6.addWidget(self.cb_set_frame_idx_na)
84
- spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
85
- self.horizontalLayout_6.addItem(spacerItem4)
86
- self.verticalLayout.addLayout(self.horizontalLayout_6)
87
- self.label_4 = QtWidgets.QLabel(Form)
88
- self.label_4.setObjectName("label_4")
89
- self.verticalLayout.addWidget(self.label_4)
90
- self.leComment = QtWidgets.QPlainTextEdit(Form)
91
- self.leComment.setObjectName("leComment")
92
- self.verticalLayout.addWidget(self.leComment)
93
- self.horizontalLayout = QtWidgets.QHBoxLayout()
94
- self.horizontalLayout.setObjectName("horizontalLayout")
95
- spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
96
- self.horizontalLayout.addItem(spacerItem5)
97
- self.pbCancel = QtWidgets.QPushButton(Form)
98
- self.pbCancel.setObjectName("pbCancel")
171
+
172
+ self.horizontalSpacer_5 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
173
+
174
+ self.horizontalLayout_6.addItem(self.horizontalSpacer_5)
175
+
176
+
177
+ self.verticalLayout_3.addLayout(self.horizontalLayout_6)
178
+
179
+ self.label_4 = QLabel(Form)
180
+ self.label_4.setObjectName(u"label_4")
181
+
182
+ self.verticalLayout_3.addWidget(self.label_4)
183
+
184
+ self.leComment = QPlainTextEdit(Form)
185
+ self.leComment.setObjectName(u"leComment")
186
+
187
+ self.verticalLayout_3.addWidget(self.leComment)
188
+
189
+ self.horizontalLayout = QHBoxLayout()
190
+ self.horizontalLayout.setObjectName(u"horizontalLayout")
191
+ self.horizontalSpacer_4 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
192
+
193
+ self.horizontalLayout.addItem(self.horizontalSpacer_4)
194
+
195
+ self.pbCancel = QPushButton(Form)
196
+ self.pbCancel.setObjectName(u"pbCancel")
197
+
99
198
  self.horizontalLayout.addWidget(self.pbCancel)
100
- self.pbOK = QtWidgets.QPushButton(Form)
101
- self.pbOK.setDefault(True)
102
- self.pbOK.setObjectName("pbOK")
199
+
200
+ self.pbOK = QPushButton(Form)
201
+ self.pbOK.setObjectName(u"pbOK")
202
+
103
203
  self.horizontalLayout.addWidget(self.pbOK)
104
- self.verticalLayout.addLayout(self.horizontalLayout)
204
+
205
+
206
+ self.verticalLayout_3.addLayout(self.horizontalLayout)
207
+
105
208
 
106
209
  self.retranslateUi(Form)
107
- QtCore.QMetaObject.connectSlotsByName(Form)
210
+
211
+ self.pbOK.setDefault(True)
212
+
213
+
214
+ QMetaObject.connectSlotsByName(Form)
215
+ # setupUi
108
216
 
109
217
  def retranslateUi(self, Form):
110
- _translate = QtCore.QCoreApplication.translate
111
- Form.setWindowTitle(_translate("Form", "Edit event"))
112
- self.label.setText(_translate("Form", "Time"))
113
- self.pb_set_to_current_time.setText(_translate("Form", "Set to current time"))
114
- self.cb_set_time_na.setText(_translate("Form", "Set NA"))
115
- self.lb_image_idx.setText(_translate("Form", "Image index"))
116
- self.lbSubject.setText(_translate("Form", "Subject"))
117
- self.label_2.setText(_translate("Form", "Code"))
118
- self.lb_frame_idx.setText(_translate("Form", "Frame index"))
119
- self.cb_set_frame_idx_na.setText(_translate("Form", "Set NA"))
120
- self.label_4.setText(_translate("Form", "Comment"))
121
- self.pbCancel.setText(_translate("Form", "Cancel"))
122
- self.pbOK.setText(_translate("Form", "OK"))
218
+ Form.setWindowTitle(QCoreApplication.translate("Form", u"Edit event", None))
219
+ self.gb_time.setTitle(QCoreApplication.translate("Form", u"Time", None))
220
+ self.cb_set_time_na.setText(QCoreApplication.translate("Form", u"Set time to NA", None))
221
+ self.lb_time.setText("")
222
+ self.pb_set_to_current_time.setText(QCoreApplication.translate("Form", u"Set to current time", None))
223
+ self.gb_image_index.setTitle(QCoreApplication.translate("Form", u"Image index", None))
224
+ self.pb_set_to_current_image_index.setText(QCoreApplication.translate("Form", u"Set to current image index", None))
225
+ self.lbSubject.setText(QCoreApplication.translate("Form", u"Subject", None))
226
+ self.label_2.setText(QCoreApplication.translate("Form", u"Behavior", None))
227
+ self.lb_frame_idx.setText(QCoreApplication.translate("Form", u"Frame index", None))
228
+ self.cb_set_frame_idx_na.setText(QCoreApplication.translate("Form", u"Set NA", None))
229
+ self.label_4.setText(QCoreApplication.translate("Form", u"Comment", None))
230
+ self.pbCancel.setText(QCoreApplication.translate("Form", u"Cancel", None))
231
+ self.pbOK.setText(QCoreApplication.translate("Form", u"OK", None))
232
+ # retranslateUi
233
+