From a7b280c6ccdef88cad6071f72a7b83b4b7f6acc7 Mon Sep 17 00:00:00 2001 From: Simon Briere Date: Tue, 23 Apr 2024 13:12:14 -0400 Subject: [PATCH] Regressed to Qt 6.5.3 since WebEngine not working properly in 6.7.0 --- python/env/requirements.txt | 2 +- python/libopenimu/importers/AppleWatchImporter.py | 5 +++++ python/libopenimu/qt/BackgroundProcess.py | 2 +- python/libopenimu/qt/GPSView.py | 3 --- python/libopenimu/qt/RecordsetWindow.py | 10 ++++++---- python/resources/ui/StartDialog.ui | 2 +- 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/python/env/requirements.txt b/python/env/requirements.txt index add6095..834f56c 100644 --- a/python/env/requirements.txt +++ b/python/env/requirements.txt @@ -1,5 +1,5 @@ pypiwin32==223; sys_platform == 'win32' -PySide6==6.7.0 +PySide6==6.6.3 cython==3.0.10 numpy==1.26.4 scipy==1.11.4 diff --git a/python/libopenimu/importers/AppleWatchImporter.py b/python/libopenimu/importers/AppleWatchImporter.py index d99fddb..5d2e918 100644 --- a/python/libopenimu/importers/AppleWatchImporter.py +++ b/python/libopenimu/importers/AppleWatchImporter.py @@ -1365,6 +1365,11 @@ def read_data_file(self, file, debug=False): if debug: print('setting_json : ', settings_json_str) + # Sort settings values + settings_json = json.loads(settings_json_str) + settings_json = dict(sorted(settings_json.items())) + settings_json_str = json.dumps(settings_json) + [end_header_id] = struct.unpack(" min(10, int(self.total_work_load / 25)): mean_speed = sum(self.work_speed_estimates) / len(self.work_speed_estimates) - remaining_time = int(mean_speed) * (self.total_work_load - self.total_work_done) + remaining_time = int(mean_speed) * (self.total_work_load - self.total_work_done) - elapsed_time self.work_speed_estimates.pop(0) self.UI.lblRemainingValue.setText(self.format_time_display(remaining_time)) diff --git a/python/libopenimu/qt/GPSView.py b/python/libopenimu/qt/GPSView.py index 586baa2..0a8e15d 100644 --- a/python/libopenimu/qt/GPSView.py +++ b/python/libopenimu/qt/GPSView.py @@ -32,9 +32,6 @@ def __init__(self, parent): # Load file from qrc self.setUrl(QUrl('qrc:/OpenIMU/html/map.html')) - # 3IT = 45.3790193,-71.9430778 - # self.setCurrentPosition(45.3790193, -71.9430778) - # def closeEvent(self, QCloseEvent): # self.aboutToClose.emit(self) diff --git a/python/libopenimu/qt/RecordsetWindow.py b/python/libopenimu/qt/RecordsetWindow.py index 455792b..cc922fb 100644 --- a/python/libopenimu/qt/RecordsetWindow.py +++ b/python/libopenimu/qt/RecordsetWindow.py @@ -265,7 +265,7 @@ def load_sensors(self): self.sensors_menu.addSection(sensor.location) if sensor.id_sensor not in self.sensors: self.sensors[sensor.id_sensor] = sensor - sensor_item = QAction(sensor.name + ' [' + str(sensor.sampling_rate) + ' Hz]') + sensor_item = QAction(sensor.name + ' [' + "{:.1f}".format(sensor.sampling_rate) + ' Hz]') sensor_item.setCheckable(True) sensor_item.setProperty("sensor_id", sensor.id_sensor) self.sensors_items[sensor.id_sensor] = sensor_item @@ -449,7 +449,8 @@ def draw_sensors_names(self): for sensor_id in sensors: sensor = self.sensors[sensor_id] # Sensor names - label = self.timeSensorsScene.addText(sensor.name + ' [' + str(sensor.sampling_rate) + ' Hz]') + label = self.timeSensorsScene.addText(sensor.name + ' [' + "{:.1f}".format(sensor.sampling_rate) + + ' Hz]') label.setPos(0, pos) label.setDefaultTextColor(Qt.black) # label.setFont(QFont("Times", 10, QFont.Bold)) @@ -622,7 +623,8 @@ def query_sensor_data(self, sensor: Sensor, start_time: datetime, end_time: date def sensor_graph_selected(self, sensor_item): sensor_id = sensor_item.property("sensor_id") sensor = self.sensors[sensor_id] - sensor_label = sensor.name + " (" + sensor.location + ")" + ' [' + str(sensor.sampling_rate) + ' Hz]' + sensor_label = (sensor.name + " (" + sensor.location + ")" + ' [' + "{:.1f}".format(sensor.sampling_rate) + + ' Hz]') if sensor_item.isChecked(): # Choose the correct display for each sensor @@ -707,7 +709,7 @@ def sensor_graph_selected(self, sensor_item): # self.UI.displayContents.layout().insertWidget(0,graph) graph_window.show() - QApplication.instance().processEvents() + # QApplication.instance().processEvents() graph_window.aboutToClose.connect(self.graph_was_closed) graph_window.requestData.connect(self.query_sensor_data) diff --git a/python/resources/ui/StartDialog.ui b/python/resources/ui/StartDialog.ui index e57e457..883f7fb 100644 --- a/python/resources/ui/StartDialog.ui +++ b/python/resources/ui/StartDialog.ui @@ -385,7 +385,7 @@ in database - 1.1.1 + 1.1.2