setiastrosuitepro 1.6.2__py3-none-any.whl → 1.6.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. setiastro/images/rotatearbitrary.png +0 -0
  2. setiastro/saspro/_generated/build_info.py +2 -2
  3. setiastro/saspro/backgroundneutral.py +10 -1
  4. setiastro/saspro/blink_comparator_pro.py +474 -251
  5. setiastro/saspro/crop_dialog_pro.py +11 -1
  6. setiastro/saspro/doc_manager.py +1 -1
  7. setiastro/saspro/function_bundle.py +16 -16
  8. setiastro/saspro/gui/main_window.py +93 -64
  9. setiastro/saspro/gui/mixins/dock_mixin.py +31 -18
  10. setiastro/saspro/gui/mixins/geometry_mixin.py +105 -5
  11. setiastro/saspro/gui/mixins/menu_mixin.py +1 -0
  12. setiastro/saspro/gui/mixins/toolbar_mixin.py +33 -10
  13. setiastro/saspro/multiscale_decomp.py +710 -256
  14. setiastro/saspro/remove_stars_preset.py +55 -13
  15. setiastro/saspro/resources.py +30 -11
  16. setiastro/saspro/selective_color.py +79 -20
  17. setiastro/saspro/shortcuts.py +94 -21
  18. setiastro/saspro/stacking_suite.py +296 -107
  19. setiastro/saspro/star_alignment.py +275 -330
  20. setiastro/saspro/status_log_dock.py +1 -1
  21. setiastro/saspro/swap_manager.py +77 -42
  22. setiastro/saspro/translations/all_source_strings.json +1588 -516
  23. setiastro/saspro/translations/ar_translations.py +915 -684
  24. setiastro/saspro/translations/de_translations.py +442 -463
  25. setiastro/saspro/translations/es_translations.py +277 -47
  26. setiastro/saspro/translations/fr_translations.py +279 -47
  27. setiastro/saspro/translations/hi_translations.py +253 -21
  28. setiastro/saspro/translations/integrate_translations.py +3 -2
  29. setiastro/saspro/translations/it_translations.py +1211 -161
  30. setiastro/saspro/translations/ja_translations.py +3340 -3107
  31. setiastro/saspro/translations/pt_translations.py +3315 -3337
  32. setiastro/saspro/translations/ru_translations.py +351 -117
  33. setiastro/saspro/translations/saspro_ar.qm +0 -0
  34. setiastro/saspro/translations/saspro_ar.ts +15902 -138
  35. setiastro/saspro/translations/saspro_de.qm +0 -0
  36. setiastro/saspro/translations/saspro_de.ts +14428 -133
  37. setiastro/saspro/translations/saspro_es.qm +0 -0
  38. setiastro/saspro/translations/saspro_es.ts +11503 -7821
  39. setiastro/saspro/translations/saspro_fr.qm +0 -0
  40. setiastro/saspro/translations/saspro_fr.ts +11168 -7812
  41. setiastro/saspro/translations/saspro_hi.qm +0 -0
  42. setiastro/saspro/translations/saspro_hi.ts +14733 -135
  43. setiastro/saspro/translations/saspro_it.qm +0 -0
  44. setiastro/saspro/translations/saspro_it.ts +14347 -7821
  45. setiastro/saspro/translations/saspro_ja.qm +0 -0
  46. setiastro/saspro/translations/saspro_ja.ts +14860 -137
  47. setiastro/saspro/translations/saspro_pt.qm +0 -0
  48. setiastro/saspro/translations/saspro_pt.ts +14904 -137
  49. setiastro/saspro/translations/saspro_ru.qm +0 -0
  50. setiastro/saspro/translations/saspro_ru.ts +11766 -168
  51. setiastro/saspro/translations/saspro_sw.qm +0 -0
  52. setiastro/saspro/translations/saspro_sw.ts +15115 -135
  53. setiastro/saspro/translations/saspro_uk.qm +0 -0
  54. setiastro/saspro/translations/saspro_uk.ts +11206 -6729
  55. setiastro/saspro/translations/saspro_zh.qm +0 -0
  56. setiastro/saspro/translations/saspro_zh.ts +10581 -7812
  57. setiastro/saspro/translations/sw_translations.py +282 -56
  58. setiastro/saspro/translations/uk_translations.py +264 -35
  59. setiastro/saspro/translations/zh_translations.py +282 -47
  60. setiastro/saspro/view_bundle.py +17 -17
  61. setiastro/saspro/widgets/minigame/game.js +11 -6
  62. setiastro/saspro/widgets/resource_monitor.py +26 -0
  63. setiastro/saspro/widgets/spinboxes.py +18 -0
  64. setiastro/saspro/wimi.py +65 -65
  65. setiastro/saspro/wims.py +33 -33
  66. setiastro/saspro/window_shelf.py +2 -2
  67. {setiastrosuitepro-1.6.2.dist-info → setiastrosuitepro-1.6.4.dist-info}/METADATA +7 -7
  68. {setiastrosuitepro-1.6.2.dist-info → setiastrosuitepro-1.6.4.dist-info}/RECORD +72 -71
  69. {setiastrosuitepro-1.6.2.dist-info → setiastrosuitepro-1.6.4.dist-info}/WHEEL +0 -0
  70. {setiastrosuitepro-1.6.2.dist-info → setiastrosuitepro-1.6.4.dist-info}/entry_points.txt +0 -0
  71. {setiastrosuitepro-1.6.2.dist-info → setiastrosuitepro-1.6.4.dist-info}/licenses/LICENSE +0 -0
  72. {setiastrosuitepro-1.6.2.dist-info → setiastrosuitepro-1.6.4.dist-info}/licenses/license.txt +0 -0
@@ -235,3 +235,29 @@ class SystemMonitorWidget(QQuickWidget):
235
235
  root.setProperty("ramUsage", self.backend.ramUsage)
236
236
  root.setProperty("gpuUsage", self.backend.gpuUsage)
237
237
  root.setProperty("appRamString", self.backend.appRamString)
238
+
239
+ # --- Drag & Drop Support ---
240
+ def mousePressEvent(self, event):
241
+ if event.button() == Qt.MouseButton.LeftButton:
242
+ self._drag_start_pos = event.globalPosition().toPoint() - self.frameGeometry().topLeft()
243
+ event.accept()
244
+ else:
245
+ super().mousePressEvent(event)
246
+
247
+ def mouseMoveEvent(self, event):
248
+ if event.buttons() & Qt.MouseButton.LeftButton:
249
+ if hasattr(self, "_drag_start_pos"):
250
+ self.move(event.globalPosition().toPoint() - self._drag_start_pos)
251
+ event.accept()
252
+ else:
253
+ super().mouseMoveEvent(event)
254
+
255
+ def mouseReleaseEvent(self, event):
256
+ if event.button() == Qt.MouseButton.LeftButton:
257
+ from PyQt6.QtCore import QSettings
258
+ settings = QSettings("SetiAstro", "SetiAstroSuitePro")
259
+ pos = self.pos()
260
+ settings.setValue("ui/resource_monitor_pos_x", pos.x())
261
+ settings.setValue("ui/resource_monitor_pos_y", pos.y())
262
+ event.accept()
263
+ super().mouseReleaseEvent(event)
@@ -134,6 +134,15 @@ class CustomSpinBox(QWidget):
134
134
  """Decrease value by step."""
135
135
  self.setValue(self._value - self.step)
136
136
 
137
+ def value(self) -> int:
138
+ """
139
+ Qt-compatible getter (QSpinBox uses value()).
140
+
141
+ Note: we also have @property value for convenience,
142
+ but code that expects QSpinBox calls value().
143
+ """
144
+ return self._value
145
+
137
146
  def _update_button_states(self) -> None:
138
147
  """Enable/disable buttons at limits."""
139
148
  self.upButton.setEnabled(self._value < self.maximum)
@@ -228,6 +237,15 @@ class CustomDoubleSpinBox(QWidget):
228
237
  self.setValue(minimum)
229
238
  self._update_button_states()
230
239
 
240
+ def value(self) -> float:
241
+ """
242
+ Qt-compatible getter (QDoubleSpinBox uses value()).
243
+
244
+ Note: we also have @property value for convenience,
245
+ but code that expects QDoubleSpinBox calls value().
246
+ """
247
+ return self._value
248
+
231
249
  def setMaximum(self, maximum: float) -> None:
232
250
  """Set the maximum value."""
233
251
  self.maximum = maximum
setiastro/saspro/wimi.py CHANGED
@@ -2596,12 +2596,12 @@ class WIMIDialog(QDialog):
2596
2596
  button_layout = QHBoxLayout()
2597
2597
 
2598
2598
  # Load button
2599
- self.load_button = QPushButton("Load Image File")
2599
+ self.load_button = QPushButton(self.tr("Load Image File"))
2600
2600
  self.load_button.setIcon(QApplication.style().standardIcon(QStyle.StandardPixmap.SP_FileDialogStart))
2601
2601
  self.load_button.clicked.connect(self.open_image)
2602
2602
 
2603
2603
  self.load_from_view_btn = QToolButton()
2604
- self.load_from_view_btn.setText("Load from View")
2604
+ self.load_from_view_btn.setText(self.tr("Load from View"))
2605
2605
  self.load_from_view_btn.setToolButtonStyle(Qt.ToolButtonStyle.ToolButtonTextBesideIcon)
2606
2606
  self.load_from_view_btn.setIcon(QApplication.style().standardIcon(QStyle.StandardPixmap.SP_DirOpenIcon))
2607
2607
  self.load_from_view_menu = QMenu(self)
@@ -2611,7 +2611,7 @@ class WIMIDialog(QDialog):
2611
2611
  button_layout.addWidget(self.load_from_view_btn)
2612
2612
 
2613
2613
  # AutoStretch button
2614
- self.auto_stretch_button = QPushButton("AutoStretch")
2614
+ self.auto_stretch_button = QPushButton(self.tr("AutoStretch"))
2615
2615
  self.auto_stretch_button.clicked.connect(self.toggle_autostretch)
2616
2616
 
2617
2617
  # Add both buttons to the horizontal layout
@@ -2622,7 +2622,7 @@ class WIMIDialog(QDialog):
2622
2622
  left_panel.addLayout(button_layout)
2623
2623
 
2624
2624
  # Create the instruction QLabel for search region
2625
- search_region_instruction_label = QLabel("Shift+Click to define a search region")
2625
+ search_region_instruction_label = QLabel(self.tr("Shift+Click to define a search region"))
2626
2626
  search_region_instruction_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
2627
2627
  search_region_instruction_label.setStyleSheet("font-size: 15px; color: gray;")
2628
2628
 
@@ -2632,12 +2632,12 @@ class WIMIDialog(QDialog):
2632
2632
 
2633
2633
 
2634
2634
  # Query Simbad button
2635
- self.query_button = QPushButton("Query Simbad")
2635
+ self.query_button = QPushButton(self.tr("Query Simbad"))
2636
2636
  self.query_button.setIcon(QApplication.style().standardIcon(QStyle.StandardPixmap.SP_DialogApplyButton))
2637
2637
  left_panel.addWidget(self.query_button)
2638
2638
  self.query_button.clicked.connect(lambda: self.query_simbad(self.get_defined_radius()))
2639
2639
 
2640
- self.legend_button = QPushButton("Legend")
2640
+ self.legend_button = QPushButton(self.tr("Legend"))
2641
2641
  self.legend_button.clicked.connect(self.show_legend)
2642
2642
  left_panel.addWidget(self.legend_button)
2643
2643
 
@@ -2645,12 +2645,12 @@ class WIMIDialog(QDialog):
2645
2645
  show_clear_layout = QHBoxLayout()
2646
2646
 
2647
2647
  # Create the Show Object Names checkbox
2648
- self.show_names_checkbox = QCheckBox("Show Object Names")
2648
+ self.show_names_checkbox = QCheckBox(self.tr("Show Object Names"))
2649
2649
  self.show_names_checkbox.stateChanged.connect(self.toggle_object_names) # Connect to a function to toggle names
2650
2650
  show_clear_layout.addWidget(self.show_names_checkbox)
2651
2651
 
2652
2652
  # Create the Clear Results button
2653
- self.clear_results_button = QPushButton("Clear Results")
2653
+ self.clear_results_button = QPushButton(self.tr("Clear Results"))
2654
2654
  self.clear_results_button.setIcon(QApplication.style().standardIcon(QStyle.StandardPixmap.SP_DialogCloseButton))
2655
2655
  self.clear_results_button.clicked.connect(self.clear_search_results) # Connect to a function to clear results
2656
2656
  show_clear_layout.addWidget(self.clear_results_button)
@@ -2662,7 +2662,7 @@ class WIMIDialog(QDialog):
2662
2662
  button_layout = QHBoxLayout()
2663
2663
 
2664
2664
  # Show Visible Objects Only button
2665
- self.toggle_visible_objects_button = QPushButton("Show Visible Objects Only")
2665
+ self.toggle_visible_objects_button = QPushButton(self.tr("Show Visible Objects Only"))
2666
2666
  self.toggle_visible_objects_button.setCheckable(True) # Toggle button state
2667
2667
  self.toggle_visible_objects_button.setIcon(QIcon(eye_icon_path))
2668
2668
  self.toggle_visible_objects_button.clicked.connect(self.filter_visible_objects)
@@ -2670,7 +2670,7 @@ class WIMIDialog(QDialog):
2670
2670
  button_layout.addWidget(self.toggle_visible_objects_button)
2671
2671
 
2672
2672
  # Save CSV button
2673
- self.save_csv_button = QPushButton("Save CSV")
2673
+ self.save_csv_button = QPushButton(self.tr("Save CSV"))
2674
2674
  self.save_csv_button.setIcon(QIcon(csv_icon_path))
2675
2675
  self.save_csv_button.clicked.connect(self.save_results_as_csv)
2676
2676
  button_layout.addWidget(self.save_csv_button)
@@ -2679,7 +2679,7 @@ class WIMIDialog(QDialog):
2679
2679
  left_panel.addLayout(button_layout)
2680
2680
 
2681
2681
  # Advanced Search Button
2682
- self.advanced_search_button = QPushButton("Advanced Search")
2682
+ self.advanced_search_button = QPushButton(self.tr("Advanced Search"))
2683
2683
  self.advanced_search_button.setIcon(QApplication.style().standardIcon(QStyle.StandardPixmap.SP_FileDialogDetailedView))
2684
2684
  self.advanced_search_button.setCheckable(True)
2685
2685
  self.advanced_search_button.clicked.connect(self.toggle_advanced_search)
@@ -2693,14 +2693,14 @@ class WIMIDialog(QDialog):
2693
2693
  self.advanced_search_panel_widget.setVisible(False) # Hide initially
2694
2694
 
2695
2695
  # Status label
2696
- self.status_label = QLabel("Status: Ready")
2696
+ self.status_label = QLabel(self.tr("Status: Ready"))
2697
2697
  left_panel.addWidget(self.status_label)
2698
2698
 
2699
2699
  # Create a horizontal layout
2700
2700
  button_layout = QHBoxLayout()
2701
2701
 
2702
2702
  # Copy RA/Dec to Clipboard button
2703
- self.copy_button = QPushButton("Copy RA/Dec to Clipboard", self)
2703
+ self.copy_button = QPushButton(self.tr("Copy RA/Dec to Clipboard"), self)
2704
2704
  self.copy_button.setIcon(QApplication.style().standardIcon(QStyle.StandardPixmap.SP_CommandLink))
2705
2705
  self.copy_button.clicked.connect(self.copy_ra_dec_to_clipboard)
2706
2706
  button_layout.addWidget(self.copy_button)
@@ -2715,23 +2715,23 @@ class WIMIDialog(QDialog):
2715
2715
  left_panel.addLayout(button_layout)
2716
2716
 
2717
2717
  # Save Plate Solved Fits Button
2718
- self.save_plate_solved_button = QPushButton("Save Plate Solved Fits")
2718
+ self.save_plate_solved_button = QPushButton(self.tr("Save Plate Solved Fits"))
2719
2719
  self.save_plate_solved_button.setIcon(QIcon(disk_icon_path))
2720
2720
  self.save_plate_solved_button.clicked.connect(self.save_plate_solved_fits)
2721
2721
  left_panel.addWidget(self.save_plate_solved_button)
2722
2722
 
2723
2723
  # RA/Dec Labels
2724
2724
  ra_dec_layout = QHBoxLayout()
2725
- self.ra_label = QLabel("RA: N/A")
2726
- self.dec_label = QLabel("Dec: N/A")
2727
- self.orientation_label = QLabel("Orientation: N/A°")
2725
+ self.ra_label = QLabel(self.tr("RA: N/A"))
2726
+ self.dec_label = QLabel(self.tr("Dec: N/A"))
2727
+ self.orientation_label = QLabel(self.tr("Orientation: N/A°"))
2728
2728
  ra_dec_layout.addWidget(self.ra_label)
2729
2729
  ra_dec_layout.addWidget(self.dec_label)
2730
2730
  ra_dec_layout.addWidget(self.orientation_label)
2731
2731
  left_panel.addLayout(ra_dec_layout)
2732
2732
 
2733
2733
  # Mini Preview
2734
- self.mini_preview = QLabel("Mini Preview")
2734
+ self.mini_preview = QLabel(self.tr("Mini Preview"))
2735
2735
  self.mini_preview.setMaximumSize(300, 300)
2736
2736
  self.mini_preview.mousePressEvent = self.on_mini_preview_press
2737
2737
  self.mini_preview.mouseMoveEvent = self.on_mini_preview_drag
@@ -2746,9 +2746,9 @@ class WIMIDialog(QDialog):
2746
2746
 
2747
2747
  # Zoom buttons above the main preview
2748
2748
  zoom_controls_layout = QHBoxLayout()
2749
- self.zoom_in_button = QPushButton("Zoom In")
2749
+ self.zoom_in_button = QPushButton(self.tr("Zoom In"))
2750
2750
  self.zoom_in_button.clicked.connect(self.zoom_in)
2751
- self.zoom_out_button = QPushButton("Zoom Out")
2751
+ self.zoom_out_button = QPushButton(self.tr("Zoom Out"))
2752
2752
  self.zoom_out_button.clicked.connect(self.zoom_out)
2753
2753
  zoom_controls_layout.addWidget(self.zoom_in_button)
2754
2754
  zoom_controls_layout.addWidget(self.zoom_out_button)
@@ -2783,28 +2783,28 @@ class WIMIDialog(QDialog):
2783
2783
  save_buttons_layout = QHBoxLayout()
2784
2784
 
2785
2785
  # Button to toggle annotation tools section
2786
- self.show_annotations_button = QPushButton("Show Annotation Tools")
2786
+ self.show_annotations_button = QPushButton(self.tr("Show Annotation Tools"))
2787
2787
  self.show_annotations_button.setIcon(QApplication.style().standardIcon(QStyle.StandardPixmap.SP_DialogResetButton))
2788
2788
  self.show_annotations_button.clicked.connect(self.toggle_annotation_tools)
2789
2789
  save_buttons_layout.addWidget(self.show_annotations_button)
2790
2790
 
2791
- self.save_annotated_button = QPushButton("Save Annotated Image")
2791
+ self.save_annotated_button = QPushButton(self.tr("Save Annotated Image"))
2792
2792
  self.save_annotated_button.setIcon(QIcon(annotated_path))
2793
2793
  self.save_annotated_button.clicked.connect(self.save_annotated_image)
2794
2794
  save_buttons_layout.addWidget(self.save_annotated_button)
2795
2795
 
2796
- self.save_collage_button = QPushButton("Save Collage of Objects")
2796
+ self.save_collage_button = QPushButton(self.tr("Save Collage of Objects"))
2797
2797
  self.save_collage_button.setIcon(QIcon(collage_path))
2798
2798
  self.save_collage_button.clicked.connect(self.save_collage_of_objects)
2799
2799
  save_buttons_layout.addWidget(self.save_collage_button)
2800
2800
 
2801
2801
  # New 3D View Button
2802
- self.show_3d_view_button = QPushButton("3D Distance Model")
2802
+ self.show_3d_view_button = QPushButton(self.tr("3D Distance Model"))
2803
2803
  self.show_3d_view_button.clicked.connect(self.show_3d_model_view)
2804
2804
  self.show_3d_view_button.setIcon( QApplication.style().standardIcon(QStyle.StandardPixmap.SP_TitleBarNormalButton))
2805
2805
  save_buttons_layout.addWidget(self.show_3d_view_button)
2806
2806
 
2807
- self.show_hr_button = QPushButton("H-R Diagram")
2807
+ self.show_hr_button = QPushButton(self.tr("H-R Diagram"))
2808
2808
  # Optionally give it an icon:
2809
2809
  self.show_hr_button.setIcon(QApplication.style().standardIcon(
2810
2810
  QStyle.StandardPixmap.SP_DesktopIcon))
@@ -2821,10 +2821,10 @@ class WIMIDialog(QDialog):
2821
2821
  label_layout = QHBoxLayout()
2822
2822
 
2823
2823
  # Create the label to display the count of objects
2824
- self.object_count_label = QLabel("Objects Found: 0")
2824
+ self.object_count_label = QLabel(self.tr("Objects Found: 0"))
2825
2825
 
2826
2826
  # Create the label with instructions
2827
- self.instructions_label = QLabel("Right Click a Row for More Options")
2827
+ self.instructions_label = QLabel(self.tr("Right Click a Row for More Options"))
2828
2828
 
2829
2829
  # Add both labels to the horizontal layout
2830
2830
  label_layout.addWidget(self.object_count_label)
@@ -2850,61 +2850,61 @@ class WIMIDialog(QDialog):
2850
2850
  self.annotation_tools_section = QWidget()
2851
2851
  annotation_tools_layout = QGridLayout(self.annotation_tools_section)
2852
2852
 
2853
- annotation_instruction_label = QLabel("Ctrl+Click to add items, Alt+Click to measure distance")
2853
+ annotation_instruction_label = QLabel(self.tr("Ctrl+Click to add items, Alt+Click to measure distance"))
2854
2854
  annotation_instruction_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
2855
2855
  annotation_instruction_label.setStyleSheet("font-size: 10px; color: gray;")
2856
2856
 
2857
- self.draw_ellipse_button = QPushButton("Draw Ellipse")
2857
+ self.draw_ellipse_button = QPushButton(self.tr("Draw Ellipse"))
2858
2858
  self.draw_ellipse_button.tool_name = "Ellipse"
2859
2859
  self.draw_ellipse_button.clicked.connect(lambda: self.set_tool("Ellipse"))
2860
2860
  self.annotation_buttons.append(self.draw_ellipse_button)
2861
2861
 
2862
- self.freehand_button = QPushButton("Freehand (Lasso)")
2862
+ self.freehand_button = QPushButton(self.tr("Freehand (Lasso)"))
2863
2863
  self.freehand_button.tool_name = "Freehand"
2864
2864
  self.freehand_button.clicked.connect(lambda: self.set_tool("Freehand"))
2865
2865
  self.annotation_buttons.append(self.freehand_button)
2866
2866
 
2867
- self.draw_rectangle_button = QPushButton("Draw Rectangle")
2867
+ self.draw_rectangle_button = QPushButton(self.tr("Draw Rectangle"))
2868
2868
  self.draw_rectangle_button.tool_name = "Rectangle"
2869
2869
  self.draw_rectangle_button.clicked.connect(lambda: self.set_tool("Rectangle"))
2870
2870
  self.annotation_buttons.append(self.draw_rectangle_button)
2871
2871
 
2872
- self.draw_arrow_button = QPushButton("Draw Arrow")
2872
+ self.draw_arrow_button = QPushButton(self.tr("Draw Arrow"))
2873
2873
  self.draw_arrow_button.tool_name = "Arrow"
2874
2874
  self.draw_arrow_button.clicked.connect(lambda: self.set_tool("Arrow"))
2875
2875
  self.annotation_buttons.append(self.draw_arrow_button)
2876
2876
 
2877
- self.place_compass_button = QPushButton("Place Celestial Compass")
2877
+ self.place_compass_button = QPushButton(self.tr("Place Celestial Compass"))
2878
2878
  self.place_compass_button.tool_name = "Compass"
2879
2879
  self.place_compass_button.clicked.connect(lambda: self.set_tool("Compass"))
2880
2880
  self.annotation_buttons.append(self.place_compass_button)
2881
2881
 
2882
- self.add_text_button = QPushButton("Add Text")
2882
+ self.add_text_button = QPushButton(self.tr("Add Text"))
2883
2883
  self.add_text_button.tool_name = "Text"
2884
2884
  self.add_text_button.clicked.connect(lambda: self.set_tool("Text"))
2885
2885
  self.annotation_buttons.append(self.add_text_button)
2886
2886
 
2887
2887
  # Add Color and Font buttons
2888
- self.color_button = QPushButton("Select Color")
2888
+ self.color_button = QPushButton(self.tr("Select Color"))
2889
2889
  self.color_button.setIcon(QIcon(colorwheel_path))
2890
2890
  self.color_button.clicked.connect(self.select_color)
2891
2891
 
2892
- self.font_button = QPushButton("Select Font")
2892
+ self.font_button = QPushButton(self.tr("Select Font"))
2893
2893
  self.font_button.setIcon(QIcon(font_path))
2894
2894
  self.font_button.clicked.connect(self.select_font)
2895
2895
 
2896
2896
  # Undo button
2897
- self.undo_button = QPushButton("Undo")
2897
+ self.undo_button = QPushButton(self.tr("Undo"))
2898
2898
  self.undo_button.setIcon(QApplication.style().standardIcon(QStyle.StandardPixmap.SP_ArrowLeft)) # Left arrow icon for undo
2899
2899
  self.undo_button.clicked.connect(self.main_preview.undo_annotation) # Connect to undo_annotation in CustomGraphicsView
2900
2900
 
2901
2901
  # Clear Annotations button
2902
- self.clear_annotations_button = QPushButton("Clear Annotations")
2902
+ self.clear_annotations_button = QPushButton(self.tr("Clear Annotations"))
2903
2903
  self.clear_annotations_button.setIcon(QApplication.style().standardIcon(QStyle.StandardPixmap.SP_TrashIcon)) # Trash icon
2904
2904
  self.clear_annotations_button.clicked.connect(self.main_preview.clear_annotations) # Connect to clear_annotations in CustomGraphicsView
2905
2905
 
2906
2906
  # Delete Selected Object button
2907
- self.delete_selected_object_button = QPushButton("Delete Selected Object(s)")
2907
+ self.delete_selected_object_button = QPushButton(self.tr("Delete Selected Items"))
2908
2908
  self.delete_selected_object_button.setIcon(QApplication.style().standardIcon(QStyle.StandardPixmap.SP_DialogCloseButton)) # Trash icon
2909
2909
  self.delete_selected_object_button.clicked.connect(self.main_preview.delete_selected_objects)
2910
2910
 
@@ -2928,12 +2928,12 @@ class WIMIDialog(QDialog):
2928
2928
  right_panel.addWidget(self.annotation_tools_section)
2929
2929
 
2930
2930
  # Advanced Search Panel
2931
- self.advanced_param_label = QLabel("Advanced Search Parameters")
2931
+ self.advanced_param_label = QLabel(self.tr("Advanced Search Parameters"))
2932
2932
  self.advanced_search_panel.addWidget(self.advanced_param_label)
2933
2933
 
2934
2934
  # TreeWidget for object types
2935
2935
  self.object_tree = QTreeWidget()
2936
- self.object_tree.setHeaderLabels(["Object Type", "Description"])
2936
+ self.object_tree.setHeaderLabels([self.tr("Object Type"), self.tr("Description")])
2937
2937
  self.object_tree.setColumnWidth(0, 150)
2938
2938
  self.object_tree.setSortingEnabled(True)
2939
2939
 
@@ -2949,17 +2949,17 @@ class WIMIDialog(QDialog):
2949
2949
  toggle_buttons_layout = QHBoxLayout()
2950
2950
 
2951
2951
  # Toggle All
2952
- self.toggle_all_button = QPushButton("Toggle All")
2952
+ self.toggle_all_button = QPushButton(self.tr("Toggle All"))
2953
2953
  self.toggle_all_button.clicked.connect(self.toggle_all_items)
2954
2954
  toggle_buttons_layout.addWidget(self.toggle_all_button)
2955
2955
 
2956
2956
  # Save Custom List
2957
- self.save_list_button = QPushButton("Save List…")
2957
+ self.save_list_button = QPushButton(self.tr("Save List…"))
2958
2958
  self.save_list_button.clicked.connect(self.save_custom_list)
2959
2959
  toggle_buttons_layout.addWidget(self.save_list_button)
2960
2960
 
2961
2961
  # Load Custom List
2962
- self.load_list_button = QPushButton("Load List…")
2962
+ self.load_list_button = QPushButton(self.tr("Load List…"))
2963
2963
  self.load_list_button.clicked.connect(self.load_custom_list)
2964
2964
  toggle_buttons_layout.addWidget(self.load_list_button)
2965
2965
 
@@ -2968,11 +2968,11 @@ class WIMIDialog(QDialog):
2968
2968
  # Add Simbad Search buttons below the toggle buttons
2969
2969
  search_button_layout = QHBoxLayout()
2970
2970
 
2971
- self.simbad_defined_region_button = QPushButton("Search Defined Region")
2971
+ self.simbad_defined_region_button = QPushButton(self.tr("Search Defined Region"))
2972
2972
  self.simbad_defined_region_button.clicked.connect(self.search_defined_region)
2973
2973
  search_button_layout.addWidget(self.simbad_defined_region_button)
2974
2974
 
2975
- self.simbad_entire_image_button = QPushButton("Search Entire Image")
2975
+ self.simbad_entire_image_button = QPushButton(self.tr("Search Entire Image"))
2976
2976
  self.simbad_entire_image_button.clicked.connect(self.search_entire_image)
2977
2977
  search_button_layout.addWidget(self.simbad_entire_image_button)
2978
2978
 
@@ -2981,17 +2981,17 @@ class WIMIDialog(QDialog):
2981
2981
  # ─────────────────────────────
2982
2982
  # Minor Planets / Comets block
2983
2983
  # ─────────────────────────────
2984
- self.minor_group = QGroupBox("Minor Planets / Comets")
2984
+ self.minor_group = QGroupBox(self.tr("Minor Planets / Comets"))
2985
2985
  minor_layout = QGridLayout(self.minor_group)
2986
2986
 
2987
2987
  # --- DB info + buttons ---
2988
- self.minor_db_label = QLabel("Database: not downloaded")
2988
+ self.minor_db_label = QLabel(self.tr("Database: not downloaded"))
2989
2989
  self.minor_db_label.setStyleSheet("font-size: 10px; color: gray;")
2990
2990
 
2991
- self.btn_minor_download = QPushButton("Download Catalog")
2991
+ self.btn_minor_download = QPushButton(self.tr("Download Catalog"))
2992
2992
  self.btn_minor_download.clicked.connect(self.download_minor_body_catalog)
2993
2993
 
2994
- self.btn_minor_search = QPushButton("Search Minor Bodies")
2994
+ self.btn_minor_search = QPushButton(self.tr("Search Minor Bodies"))
2995
2995
  self.btn_minor_search.clicked.connect(self.perform_minor_body_search)
2996
2996
 
2997
2997
  # Row 0: status label across full width
@@ -3002,18 +3002,18 @@ class WIMIDialog(QDialog):
3002
3002
  minor_layout.addWidget(self.btn_minor_search, 1, 2, 1, 2)
3003
3003
 
3004
3004
  # --- Search scope (Defined Circle vs Entire Image) ---
3005
- scope_label = QLabel("Search scope:")
3005
+ scope_label = QLabel(self.tr("Search scope:"))
3006
3006
  self.minor_scope_combo = QComboBox()
3007
3007
  self.minor_scope_combo.addItems([
3008
- "Defined Region",
3009
- "Entire Image",
3008
+ self.tr("Defined Region"),
3009
+ self.tr("Entire Image"),
3010
3010
  ])
3011
3011
 
3012
3012
  minor_layout.addWidget(scope_label, 2, 0)
3013
3013
  minor_layout.addWidget(self.minor_scope_combo, 2, 1, 1, 3)
3014
3014
 
3015
3015
  # --- Limits row 1: asteroid H_max + max count ---
3016
- ast_H_label = QLabel("Asteroid H \u2264")
3016
+ ast_H_label = QLabel(self.tr("Asteroid H \u2264"))
3017
3017
  self.minor_ast_H_spin = QDoubleSpinBox()
3018
3018
  self.minor_ast_H_spin.setRange(0.0, 40.0)
3019
3019
  self.minor_ast_H_spin.setDecimals(1)
@@ -3022,7 +3022,7 @@ class WIMIDialog(QDialog):
3022
3022
  float(self.settings.value("wimi/minor/asteroid_H_max", 20.0))
3023
3023
  )
3024
3024
 
3025
- ast_max_label = QLabel("Max asteroids:")
3025
+ ast_max_label = QLabel(self.tr("Max asteroids:"))
3026
3026
  self.minor_ast_max_spin = QSpinBox()
3027
3027
  self.minor_ast_max_spin.setRange(100, 2000000)
3028
3028
  self.minor_ast_max_spin.setSingleStep(1000)
@@ -3036,7 +3036,7 @@ class WIMIDialog(QDialog):
3036
3036
  minor_layout.addWidget(self.minor_ast_max_spin, 3, 3)
3037
3037
 
3038
3038
  # --- Limits row 2: comet H_max + max count ---
3039
- com_H_label = QLabel("Comet H \u2264")
3039
+ com_H_label = QLabel(self.tr("Comet H \u2264"))
3040
3040
  self.minor_com_H_spin = QDoubleSpinBox()
3041
3041
  self.minor_com_H_spin.setRange(0.0, 40.0)
3042
3042
  self.minor_com_H_spin.setDecimals(1)
@@ -3045,7 +3045,7 @@ class WIMIDialog(QDialog):
3045
3045
  float(self.settings.value("wimi/minor/comet_H_max", 15.0))
3046
3046
  )
3047
3047
 
3048
- com_max_label = QLabel("Max comets:")
3048
+ com_max_label = QLabel(self.tr("Max comets:"))
3049
3049
  self.minor_com_max_spin = QSpinBox()
3050
3050
  self.minor_com_max_spin.setRange(100, 100000)
3051
3051
  self.minor_com_max_spin.setSingleStep(500)
@@ -3059,14 +3059,14 @@ class WIMIDialog(QDialog):
3059
3059
  minor_layout.addWidget(self.minor_com_max_spin, 4, 3)
3060
3060
 
3061
3061
  # --- Optional specific target (designation / name) ---
3062
- target_label = QLabel("Target (optional):")
3062
+ target_label = QLabel(self.tr("Target (optional):"))
3063
3063
  self.minor_target_edit = QLineEdit()
3064
3064
  self.minor_target_edit.setPlaceholderText("e.g. 584, Semiramis, C/2023 A3...")
3065
3065
 
3066
3066
  minor_layout.addWidget(target_label, 5, 0)
3067
3067
  minor_layout.addWidget(self.minor_target_edit, 5, 1, 1, 3)
3068
3068
 
3069
- self.minor_count_button = QPushButton("Count Objects Brighter Than Limits")
3069
+ self.minor_count_button = QPushButton(self.tr("Count Objects Brighter Than Limits"))
3070
3070
  self.minor_count_button.setToolTip(
3071
3071
  "Show how many catalog objects are brighter than the selected H limits."
3072
3072
  )
@@ -3075,7 +3075,7 @@ class WIMIDialog(QDialog):
3075
3075
  minor_layout.addWidget(self.minor_count_button, 6, 0, 1, 4)
3076
3076
 
3077
3077
  # --- Time offset (hours) for ephemerides ---
3078
- time_offset_label = QLabel("Time offset (hours):")
3078
+ time_offset_label = QLabel(self.tr("Time offset (hours):"))
3079
3079
  self.minor_time_offset_spin = QDoubleSpinBox()
3080
3080
  self.minor_time_offset_spin.setRange(-24.0, 24.0)
3081
3081
  self.minor_time_offset_spin.setDecimals(2)
@@ -3099,7 +3099,7 @@ class WIMIDialog(QDialog):
3099
3099
  self._load_minor_db_path()
3100
3100
 
3101
3101
  # Adding the "Deep Vizier Search" button below the other search buttons
3102
- self.deep_vizier_button = QPushButton("Caution - Deep Vizier Search")
3102
+ self.deep_vizier_button = QPushButton(self.tr("Caution - Deep Vizier Search"))
3103
3103
  self.deep_vizier_button.setIcon(QIcon(nuke_path)) # Assuming `nuke_path` is the correct path for the icon
3104
3104
  self.deep_vizier_button.setToolTip("Perform a deep search with Vizier. Caution: May return large datasets.")
3105
3105
 
@@ -3109,7 +3109,7 @@ class WIMIDialog(QDialog):
3109
3109
  # Add the Deep Vizier button to the advanced search layout
3110
3110
  self.advanced_search_panel.addWidget(self.deep_vizier_button)
3111
3111
 
3112
- self.mast_search_button = QPushButton("Search M.A.S.T Database")
3112
+ self.mast_search_button = QPushButton(self.tr("Search M.A.S.T Database"))
3113
3113
  self.mast_search_button.setIcon(QIcon(hubble_path))
3114
3114
  self.mast_search_button.clicked.connect(self.perform_mast_search)
3115
3115
  self.mast_search_button.setToolTip("Search Hubble, JWST, Spitzer, TESS and More.")
@@ -3604,15 +3604,15 @@ class WIMIDialog(QDialog):
3604
3604
  menu = QMenu(self)
3605
3605
 
3606
3606
  # Define actions
3607
- open_website_action = QAction("Open Website", self)
3607
+ open_website_action = QAction(self.tr("Open Website"), self)
3608
3608
  open_website_action.triggered.connect(lambda: self.results_tree.itemDoubleClicked.emit(item, 0))
3609
3609
  menu.addAction(open_website_action)
3610
3610
 
3611
- zoom_to_object_action = QAction("Zoom to Object", self)
3611
+ zoom_to_object_action = QAction(self.tr("Zoom to Object"), self)
3612
3612
  zoom_to_object_action.triggered.connect(lambda: self.zoom_to_object(item))
3613
3613
  menu.addAction(zoom_to_object_action)
3614
3614
 
3615
- copy_info_action = QAction("Copy Object Information", self)
3615
+ copy_info_action = QAction(self.tr("Copy Object Information"), self)
3616
3616
  copy_info_action.triggered.connect(lambda: self.copy_object_information(item))
3617
3617
  menu.addAction(copy_info_action)
3618
3618