Skip to content

Commit

Permalink
Merge pull request #589 from mprib/588-clean-up-playback-widget-buttons
Browse files Browse the repository at this point in the history
588 clean up playback widget buttons
  • Loading branch information
mprib authored Dec 13, 2023
2 parents 62ba203 + f97efe9 commit a2c4709
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
17 changes: 9 additions & 8 deletions pyxy3d/gui/camera_management/playback_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,18 @@ def __init__(self, controller: Controller, port: int, parent=None):

self.autocalibrate_btn = QPushButton("Autocalibrate")
self.target_grid_count_spin = QSpinBox(self)
self.target_grid_count_spin.setMaximumWidth(40)
self.target_grid_count_spin.setRange(0, 100)
self.target_grid_count_spin.setValue(40)
self.target_grid_count_spin.setSingleStep(1)

self.board_threshold_spin = QDoubleSpinBox(self)
self.board_threshold_spin.setMaximumWidth(50)
self.board_threshold_spin.setRange(0, 1)
self.board_threshold_spin.setValue(.7)
self.board_threshold_spin.setSingleStep(.1)

# Create the spinbox
self.spin_box_label = QLabel("Undistorted Image Scale")
self.scaling_spin = QSpinBox(self)
self.scaling_spin.setRange(50, 150)
self.scaling_spin.setValue(100)
Expand All @@ -142,10 +143,10 @@ def place_widgets(self):
self.right_panel.addLayout(self.rotate_span)

self.auto_control_span = QHBoxLayout()
self.auto_control_span.addWidget(QLabel("Target Grid Count"))
self.auto_control_span.addWidget(self.target_grid_count_spin)
self.auto_control_span.addWidget(QLabel("Board Threshold"))
self.auto_control_span.addWidget(self.board_threshold_spin)
self.auto_control_span.addWidget(QLabel("Target Grid Count:"), alignment=Qt.AlignmentFlag.AlignRight)
self.auto_control_span.addWidget(self.target_grid_count_spin, alignment=Qt.AlignmentFlag.AlignLeft)
self.auto_control_span.addWidget(QLabel("Board Threshold:"), alignment=Qt.AlignmentFlag.AlignRight)
self.auto_control_span.addWidget(self.board_threshold_spin, alignment=Qt.AlignmentFlag.AlignLeft)
self.auto_control_span.addWidget(self.autocalibrate_btn)
self.right_panel.addLayout(self.auto_control_span)

Expand All @@ -162,10 +163,10 @@ def place_widgets(self):
self.right_panel.addLayout(self.manual_control_span)

self.distortion_control_span = QHBoxLayout()
self.distortion_control_span.addWidget(self.toggle_distortion, alignment=Qt.AlignmentFlag.AlignCenter)
self.distortion_control_span.addWidget(QLabel("Zoom:"), alignment=Qt.AlignmentFlag.AlignRight)
self.distortion_control_span.addWidget(self.scaling_spin, alignment=Qt.AlignmentFlag.AlignLeft)
self.distortion_control_span.addWidget(self.frame_index_label)
self.distortion_control_span.addWidget(self.toggle_distortion)
self.distortion_control_span.addWidget(self.scaling_spin)
self.distortion_control_span.addWidget(self.spin_box_label)
self.right_panel.addLayout(self.distortion_control_span)
self.layout.addLayout(self.right_panel)

Expand Down
3 changes: 1 addition & 2 deletions pyxy3d/gui/main_widget.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pyxy3d.logger
import pyqtgraph
from pathlib import Path
from enum import Enum
import os
Expand All @@ -16,7 +15,7 @@
)
import rtoml
from PySide6.QtGui import QIcon, QAction
from PySide6.QtCore import Qt, QThread
from PySide6.QtCore import Qt
from pyxy3d import __root__, __settings_path__
from pyxy3d.gui.log_widget import LogWidget
from pyxy3d.gui.charuco_widget import CharucoWidget
Expand Down

0 comments on commit a2c4709

Please sign in to comment.