chore: prune boilerplate and refresh stale docs
- Remove 257 redundant per-definition comment stubs across the package - Drop dead nonlocal declarations in autoslicer_detection.py - Document the swapped flag and swap_left_right in architecture docs - Remove unsupported 'legacy override' claims from autotune/runtime docs
This commit is contained in:
parent
929c828438
commit
426a18f342
24 changed files with 5 additions and 264 deletions
|
|
@ -19,7 +19,6 @@ from PySide6.QtWidgets import (
|
|||
)
|
||||
|
||||
|
||||
# _icon_color_from_palette: function definition for ScanSlicer behavior.
|
||||
def _icon_color_from_palette(palette):
|
||||
if palette is None:
|
||||
return "#f2f2f2"
|
||||
|
|
@ -37,7 +36,6 @@ def _icon_color_from_palette(palette):
|
|||
return "#1f1f1f" if luma >= 0.5 else "#f2f2f2"
|
||||
|
||||
|
||||
# icon_from_svg_data_url: function definition for ScanSlicer behavior.
|
||||
def icon_from_svg_data_url(data_url, size=24, color_hex=None, palette=None):
|
||||
prefix = "data:image/svg+xml;base64,"
|
||||
if not data_url.startswith(prefix):
|
||||
|
|
@ -73,9 +71,7 @@ def icon_from_svg_data_url(data_url, size=24, color_hex=None, palette=None):
|
|||
return QIcon(pixmap)
|
||||
|
||||
|
||||
# ScrollbarWheelOnlyScrollArea: class definition for ScanSlicer behavior.
|
||||
class ScrollbarWheelOnlyScrollArea(QScrollArea):
|
||||
# wheelEvent: function definition for ScanSlicer behavior.
|
||||
def wheelEvent(self, event):
|
||||
scrollbar = self.verticalScrollBar()
|
||||
if scrollbar is None or not scrollbar.isVisible():
|
||||
|
|
@ -91,9 +87,7 @@ class ScrollbarWheelOnlyScrollArea(QScrollArea):
|
|||
super().wheelEvent(event)
|
||||
|
||||
|
||||
# ScanSlicerUiSharedMixin: class definition for ScanSlicer behavior.
|
||||
class ScanSlicerUiSharedMixin:
|
||||
# _build_section_title: function definition for ScanSlicer behavior.
|
||||
def _build_section_title(self, text):
|
||||
label = QLabel(text)
|
||||
title_font = QFont(label.font())
|
||||
|
|
@ -106,7 +100,6 @@ class ScanSlicerUiSharedMixin:
|
|||
)
|
||||
return label
|
||||
|
||||
# _add_vertical_spacer: function definition for ScanSlicer behavior.
|
||||
def _add_vertical_spacer(self, target_layout, row_index):
|
||||
target_layout.addItem(
|
||||
QSpacerItem(
|
||||
|
|
@ -121,7 +114,6 @@ class ScanSlicerUiSharedMixin:
|
|||
2,
|
||||
)
|
||||
|
||||
# _new_group_layout: function definition for ScanSlicer behavior.
|
||||
def _new_group_layout(self):
|
||||
group = QGroupBox()
|
||||
group_layout = QGridLayout(group)
|
||||
|
|
@ -133,21 +125,17 @@ class ScanSlicerUiSharedMixin:
|
|||
)
|
||||
return group, group_layout
|
||||
|
||||
# _add_full_width_widget: function definition for ScanSlicer behavior.
|
||||
def _add_full_width_widget(self, target_layout, row_index, widget):
|
||||
target_layout.addWidget(widget, row_index, 0, 1, 2)
|
||||
return row_index + 1
|
||||
|
||||
# _add_spacer_row: function definition for ScanSlicer behavior.
|
||||
def _add_spacer_row(self, target_layout, row_index):
|
||||
self._add_vertical_spacer(target_layout, row_index)
|
||||
return row_index + 1
|
||||
|
||||
# _add_label_row: function definition for ScanSlicer behavior.
|
||||
def _add_label_row(self, target_layout, row_index, text):
|
||||
return self._add_full_width_widget(target_layout, row_index, QLabel(text))
|
||||
|
||||
# _create_panel_button: function definition for ScanSlicer behavior.
|
||||
def _create_panel_button(self, text, callback, tooltip=None):
|
||||
button = QPushButton(text)
|
||||
if tooltip:
|
||||
|
|
@ -155,7 +143,6 @@ class ScanSlicerUiSharedMixin:
|
|||
button.clicked.connect(callback)
|
||||
return button
|
||||
|
||||
# _build_parameter_block: function definition for ScanSlicer behavior.
|
||||
def _build_parameter_block(self, parent, name, parameter):
|
||||
param_block = QWidget(parent)
|
||||
param_block_layout = QVBoxLayout(param_block)
|
||||
|
|
@ -189,7 +176,6 @@ class ScanSlicerUiSharedMixin:
|
|||
if choice_index >= 0:
|
||||
control.setCurrentIndex(choice_index)
|
||||
|
||||
# on_param_choice_changed: function definition for ScanSlicer behavior.
|
||||
def on_param_choice_changed(index, p=parameter, combo=control, param_name=name):
|
||||
value = combo.itemData(index)
|
||||
p.set(value)
|
||||
|
|
@ -216,7 +202,6 @@ class ScanSlicerUiSharedMixin:
|
|||
value_label.setAlignment(Qt.AlignRight | Qt.AlignVCenter)
|
||||
value_label.setMinimumWidth(40)
|
||||
|
||||
# on_param_slider_changed: function definition for ScanSlicer behavior.
|
||||
def on_param_slider_changed(value, p=parameter, slider=control, label=value_label, param_name=name):
|
||||
step = max(1, p.step)
|
||||
snapped = p.min + round((value - p.min) / step) * step
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue