优化部分界面
This commit is contained in:
@@ -9,6 +9,7 @@ from orisys_app_shared.i18n import t
|
||||
from orisys_app_shared.paths import outputs_dir
|
||||
from PySide6.QtCore import QTimer, Signal
|
||||
from PySide6.QtWidgets import (
|
||||
QComboBox,
|
||||
QDoubleSpinBox,
|
||||
QFileDialog,
|
||||
QFormLayout,
|
||||
@@ -29,8 +30,11 @@ from PySide6.QtWidgets import (
|
||||
from ..sensor.uv_flat import site_at, uv_origin
|
||||
from ..sensor.uv_outline import outline_snapshot
|
||||
from ..trial import ManualTrial, load_path
|
||||
from .sensor_panel import FlatSurfaceView
|
||||
from .live_force_view import LiveForceView
|
||||
from .sensor_panel import FlatSurfaceView
|
||||
|
||||
#: Product models a session can be recorded under. The stored value is this id.
|
||||
PRODUCT_MODELS: tuple[str, ...] = ("finger",)
|
||||
|
||||
|
||||
class CalibrationPanel(QWidget):
|
||||
@@ -51,8 +55,10 @@ class CalibrationPanel(QWidget):
|
||||
outer = QVBoxLayout(self)
|
||||
header = QHBoxLayout()
|
||||
self.model_label = QLabel(self)
|
||||
self.sensor_model = QLineEdit(self)
|
||||
self.sensor_model = QComboBox(self)
|
||||
self.sensor_model.setObjectName("calibrationSensorModel")
|
||||
self.sensor_model.addItems(PRODUCT_MODELS)
|
||||
self.sensor_model.setCurrentText(PRODUCT_MODELS[0])
|
||||
self.sn_label = QLabel(self)
|
||||
self.sensor_sn = QLineEdit(self)
|
||||
self.sensor_sn.setObjectName("calibrationSensorSn")
|
||||
@@ -271,7 +277,7 @@ class CalibrationPanel(QWidget):
|
||||
site=self._site,
|
||||
levels=levels,
|
||||
hold_s=self.hold.value(),
|
||||
sensor_model=self.sensor_model.text(),
|
||||
sensor_model=self.sensor_model.currentText(),
|
||||
sensor_sn=self.sensor_sn.text(),
|
||||
bundle_path=self._bundle_path,
|
||||
source=source,
|
||||
|
||||
@@ -294,7 +294,7 @@ def test_gui_hold_controls_and_session_lifecycle(make_window, trial_setup, clock
|
||||
panel._picked(2, 1)
|
||||
panel.output_path.setText(str(trial_setup["root"]))
|
||||
panel.sensor_sn.setText("F-001")
|
||||
panel.sensor_model.setText("finger")
|
||||
assert panel.sensor_model.currentText() == "finger"
|
||||
panel.levels.setText("5, 10")
|
||||
panel.start_button.click()
|
||||
assert panel.trial.status == "recording"
|
||||
|
||||
Reference in New Issue
Block a user