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
|
|
@ -1,13 +1,10 @@
|
|||
from .slices import PhotoSlice
|
||||
|
||||
|
||||
# ScanSlicerCanvasActionsMixin: class definition for ScanSlicer behavior.
|
||||
class ScanSlicerCanvasActionsMixin:
|
||||
# on_active_slice_changed: function definition for ScanSlicer behavior.
|
||||
def on_active_slice_changed(self, index):
|
||||
self.refresh_active_box_toolbar(index)
|
||||
|
||||
# refresh_active_box_toolbar: function definition for ScanSlicer behavior.
|
||||
def refresh_active_box_toolbar(self, index=None):
|
||||
if index == -1:
|
||||
index = None
|
||||
|
|
@ -45,14 +42,12 @@ class ScanSlicerCanvasActionsMixin:
|
|||
self.active_box_lock_button.setChecked(active_slice.locked)
|
||||
self.active_box_lock_button.blockSignals(False)
|
||||
|
||||
# toggle_active_box_lock: function definition for ScanSlicer behavior.
|
||||
def toggle_active_box_lock(self, checked):
|
||||
if not self.slicing_canvas.set_active_slice_locked(checked):
|
||||
self.refresh_active_box_toolbar()
|
||||
return
|
||||
self.refresh_active_box_toolbar()
|
||||
|
||||
# toggle_all_boxes_lock: function definition for ScanSlicer behavior.
|
||||
def toggle_all_boxes_lock(self, checked):
|
||||
count = self.slicing_canvas.set_all_slices_locked(checked)
|
||||
self.refresh_active_box_toolbar()
|
||||
|
|
@ -64,28 +59,24 @@ class ScanSlicerCanvasActionsMixin:
|
|||
else:
|
||||
self.update_statusbar(f"Unlocked {count} box(es).")
|
||||
|
||||
# squarize_active_box: function definition for ScanSlicer behavior.
|
||||
def squarize_active_box(self):
|
||||
if not self.slicing_canvas.squarize_active_slice():
|
||||
self.update_statusbar("No active box selected.")
|
||||
return
|
||||
self.update_statusbar("Active box squarized.")
|
||||
|
||||
# swap_active_box_left_right: function definition for ScanSlicer behavior.
|
||||
def swap_active_box_left_right(self):
|
||||
if not self.slicing_canvas.swap_active_slice_left_right():
|
||||
self.update_statusbar("No active box selected.")
|
||||
return
|
||||
self.update_statusbar("Active box left/right swapped.")
|
||||
|
||||
# reset_active_box_rotation: function definition for ScanSlicer behavior.
|
||||
def reset_active_box_rotation(self):
|
||||
if not self.slicing_canvas.reset_active_slice_rotation():
|
||||
self.update_statusbar("No active box selected.")
|
||||
return
|
||||
self.update_statusbar("Active box rotation reset.")
|
||||
|
||||
# remove_active_box: function definition for ScanSlicer behavior.
|
||||
def remove_active_box(self):
|
||||
if not self.slicing_canvas.remove_active_slice():
|
||||
self.update_statusbar("No active box selected.")
|
||||
|
|
@ -93,7 +84,6 @@ class ScanSlicerCanvasActionsMixin:
|
|||
self.refresh_active_box_toolbar()
|
||||
self.update_statusbar("Active box removed.")
|
||||
|
||||
# set_preview_filter_enabled: function definition for ScanSlicer behavior.
|
||||
def set_preview_filter_enabled(self, checked):
|
||||
self.preview_filter_enabled = bool(checked)
|
||||
if self.preview_filter_enabled:
|
||||
|
|
@ -104,7 +94,6 @@ class ScanSlicerCanvasActionsMixin:
|
|||
if self.autoslicer.image_loaded():
|
||||
self.update_preview(new_image=False, run_detection=False)
|
||||
|
||||
# set_rotate_handles_mode: function definition for ScanSlicer behavior.
|
||||
def set_rotate_handles_mode(self, checked):
|
||||
self.slicing_canvas.set_rotate_handles_mode(checked)
|
||||
if checked:
|
||||
|
|
@ -112,14 +101,12 @@ class ScanSlicerCanvasActionsMixin:
|
|||
else:
|
||||
self.update_statusbar("Rotate mode disabled.")
|
||||
|
||||
# reset_canvas_view: function definition for ScanSlicer behavior.
|
||||
def reset_canvas_view(self):
|
||||
if not self.slicing_canvas.reset_view():
|
||||
self.update_statusbar("No image loaded.")
|
||||
return
|
||||
self.update_statusbar("View reset.")
|
||||
|
||||
# add_box: function definition for ScanSlicer behavior.
|
||||
def add_box(self):
|
||||
new_slice = PhotoSlice(None)
|
||||
new_slice.toggle_locked()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue