diff --git a/src/gui/__pycache__/mainGui.cpython-310.pyc b/src/gui/__pycache__/mainGui.cpython-310.pyc index 0a5cf6f..273f46f 100644 Binary files a/src/gui/__pycache__/mainGui.cpython-310.pyc and b/src/gui/__pycache__/mainGui.cpython-310.pyc differ diff --git a/src/gui/__pycache__/plotter.cpython-310.pyc b/src/gui/__pycache__/plotter.cpython-310.pyc index 9f7357b..fe63742 100644 Binary files a/src/gui/__pycache__/plotter.cpython-310.pyc and b/src/gui/__pycache__/plotter.cpython-310.pyc differ diff --git a/src/gui/mainGui.py b/src/gui/mainGui.py index 83813f0..7597dde 100644 --- a/src/gui/mainGui.py +++ b/src/gui/mainGui.py @@ -32,8 +32,8 @@ class MainWindow(BaseMainWindow): self.settings_button.setFixedWidth(160) self.select_dir_button = QtWidgets.QPushButton("Open directory") self.select_dir_button.setFixedWidth(175) - self.report_button = QtWidgets.QPushButton("Generate report") - self.report_button.setFixedWidth(175) + self.report_button = QtWidgets.QPushButton("Customize view") + self.report_button.setFixedWidth(185) button_layout = QtWidgets.QHBoxLayout() button_layout.setSpacing(2) button_layout.addWidget(self.settings_button) diff --git a/src/gui/plotter.py b/src/gui/plotter.py index 510de8d..58e1d03 100644 --- a/src/gui/plotter.py +++ b/src/gui/plotter.py @@ -193,7 +193,7 @@ class PlotWidget(BasePlotWidget): # Итерация по точкам for cur_point, point_data in enumerate(points_pocket): - # point_data структура: [point_timeframe, ideal_data, point_events] + # point_data структура: [point_timeframe, ideal_data, point_events, useful_p_data] point_timeframe, ideal_dat, point_events, useful_p_data = point_data ideal_data = copy.deepcopy(ideal_dat) @@ -214,7 +214,6 @@ class PlotWidget(BasePlotWidget): if settings["stages"]: self._add_stage_regions(plot_item, point_events, dataframe_headers, reg_items, 75) - # TODO: подобрать не вырвеглазные цвета, возможно ограничить зону if settings["workpiece"]: x1 = point_timeframe[0] dx = point_timeframe[1] - x1 @@ -259,6 +258,7 @@ class PlotWidget(BasePlotWidget): TWC_time += TWC_delta ideal_time += ideal_delta curr_perf = ideal_delta/TWC_delta if TWC_delta != 0 else 1 + if curr_perf < worst_perf: worst_perf = curr_perf worst_timeframe = point_timeframe @@ -274,13 +274,13 @@ class PlotWidget(BasePlotWidget): if settings["performance"]: self._add_performance_label(result_layout, TWC_time, ideal_time, tesla_time) - navigator, ROI_region = self._create_navigator(worst_timeframe, main_plot) - plot_layout.addItem(plot_item, widget_num, 0) - - plot_layout.addItem(navigator, widget_num+1, 0) - self._sync_main_plot_with_navigator(main_plot, ROI_region) - main_plot.sigXRangeChanged.connect(lambda _, plot=main_plot, region=ROI_region: self._sync_navigator_with_main(main_plot=plot, region=region)) + + navigator, ROI_region = self._create_navigator(worst_timeframe, main_plot) + if navigator is not None: + plot_layout.addItem(navigator, widget_num+1, 0) + self._sync_main_plot_with_navigator(main_plot, ROI_region) + main_plot.sigXRangeChanged.connect(lambda _, plot=main_plot, region=ROI_region: self._sync_navigator_with_main(main_plot=plot, region=region)) result_layout.addWidget(plot_layout) return result_widget, reg_items, curve_items diff --git a/src/utils/base/__pycache__/base.cpython-310.pyc b/src/utils/base/__pycache__/base.cpython-310.pyc index 37ad3b9..54561f9 100644 Binary files a/src/utils/base/__pycache__/base.cpython-310.pyc and b/src/utils/base/__pycache__/base.cpython-310.pyc differ diff --git a/src/utils/base/base.py b/src/utils/base/base.py index b48e234..0860912 100644 --- a/src/utils/base/base.py +++ b/src/utils/base/base.py @@ -387,6 +387,7 @@ class BaseMainWindow(QWidget): def __init__(self, controller: Optional[BaseController] = None): super().__init__() + self.resize(800,800) self._controller = controller ...