setiastrosuitepro 1.7.4__py3-none-any.whl → 1.7.5.post1__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.
@@ -196,7 +196,7 @@ from setiastro.saspro.resources import (
196
196
  colorwheel_path, font_path, csv_icon_path, spinner_path, wims_path, narrowbandnormalization_path,
197
197
  wimi_path, linearfit_path, debayer_path, aberration_path, acv_icon_path,
198
198
  functionbundles_path, viewbundles_path, selectivecolor_path, rgbalign_path, planetarystacker_path,
199
- background_path, script_icon_path, planetprojection_path,
199
+ background_path, script_icon_path, planetprojection_path,clonestampicon_path,
200
200
  )
201
201
 
202
202
  import faulthandler
@@ -3560,6 +3560,27 @@ class AstroSuiteProMainWindow(
3560
3560
  dlg.resize(900, 650)
3561
3561
  dlg.show()
3562
3562
 
3563
+ def _open_clone_stamp(self):
3564
+ from setiastro.saspro.clone_stamp import CloneStampDialogPro
3565
+ sw = self.mdi.activeSubWindow()
3566
+ if not sw:
3567
+ QMessageBox.information(self, "Clone Stamp", "No active image window.")
3568
+ return
3569
+ view = sw.widget()
3570
+ doc = getattr(view, "document", None)
3571
+ if doc is None or getattr(doc, "image", None) is None:
3572
+ QMessageBox.information(self, "Clone Stamp", "Active document has no image.")
3573
+ return
3574
+
3575
+ dlg = CloneStampDialogPro(self, doc)
3576
+ try:
3577
+ dlg.setWindowIcon(QIcon(clonestampicon_path))
3578
+ except Exception:
3579
+ pass
3580
+ dlg.resize(900, 650)
3581
+ dlg.show()
3582
+
3583
+
3563
3584
  def _open_wavescale_hdr(self):
3564
3585
  from setiastro.saspro.wavescale_hdr import WaveScaleHDRDialogPro
3565
3586
  sw = self.mdi.activeSubWindow()
@@ -134,6 +134,7 @@ class MenuMixin:
134
134
  m_fn.addAction(self.act_background_neutral)
135
135
  m_fn.addAction(self.act_blemish)
136
136
  m_fn.addAction(self.act_clahe)
137
+ m_fn.addAction(self.act_clone_stamp)
137
138
  m_fn.addAction(self.act_convo)
138
139
  m_fn.addAction(self.act_crop)
139
140
  m_fn.addAction(self.act_curves)
@@ -36,7 +36,7 @@ from setiastro.saspro.resources import (
36
36
  nbtorgb_path, freqsep_path, multiscale_decomp_path, contsub_path, halo_path, cosmic_path,
37
37
  satellite_path, imagecombine_path, wims_path, wimi_path, linearfit_path,
38
38
  debayer_path, aberration_path, functionbundles_path, viewbundles_path, planetarystacker_path,
39
- selectivecolor_path, rgbalign_path, planetprojection_path,
39
+ selectivecolor_path, rgbalign_path, planetprojection_path, clonestampicon_path,
40
40
  )
41
41
 
42
42
  # Import shortcuts module
@@ -204,22 +204,11 @@ class ToolbarMixin:
204
204
  tb_fn.addAction(self.act_remove_green)
205
205
  tb_fn.addAction(self.act_convo)
206
206
  tb_fn.addAction(self.act_extract_luma)
207
-
208
- #btn_luma = tb_fn.widgetForAction(self.act_extract_luma)
209
- #if isinstance(btn_luma, QToolButton):
210
- # luma_menu = QMenu(btn_luma)
211
- # luma_menu.addActions(self._luma_group.actions())
212
- # btn_luma.setMenu(luma_menu)
213
- # btn_luma.setPopupMode(QToolButton.ToolButtonPopupMode.MenuButtonPopup)
214
- # btn_luma.setStyleSheet("""
215
- # QToolButton { color: #dcdcdc; }
216
- # QToolButton:pressed, QToolButton:checked { color: #DAA520; font-weight: 600; }
217
- # """)
218
-
219
207
  tb_fn.addAction(self.act_recombine_luma)
220
208
  tb_fn.addAction(self.act_rgb_extract)
221
209
  tb_fn.addAction(self.act_rgb_combine)
222
210
  tb_fn.addAction(self.act_blemish)
211
+ tb_fn.addAction(self.act_clone_stamp)
223
212
  tb_fn.addAction(self.act_wavescale_hdr)
224
213
  tb_fn.addAction(self.act_wavescale_de)
225
214
  tb_fn.addAction(self.act_clahe)
@@ -1005,6 +994,11 @@ class ToolbarMixin:
1005
994
  self.act_blemish.setStatusTip(self.tr("Interactive blemish removal on the active view"))
1006
995
  self.act_blemish.triggered.connect(self._open_blemish_blaster)
1007
996
 
997
+ self.act_clone_stamp = QAction(QIcon(clonestampicon_path), self.tr("Clone Stamp..."), self)
998
+ self.act_clone_stamp.setIconVisibleInMenu(True)
999
+ self.act_clone_stamp.setStatusTip(self.tr("Interactive clone stamp on the active view"))
1000
+ self.act_clone_stamp.triggered.connect(self._open_clone_stamp)
1001
+
1008
1002
  self.act_wavescale_hdr = QAction(QIcon(hdr_path), self.tr("WaveScale HDR..."), self)
1009
1003
  self.act_wavescale_hdr.setStatusTip(self.tr("Wave-scale HDR with luminance-masked starlet"))
1010
1004
  self.act_wavescale_hdr.setIconVisibleInMenu(True)
@@ -1416,6 +1410,7 @@ class ToolbarMixin:
1416
1410
  reg("rgb_extract", self.act_rgb_extract)
1417
1411
  reg("rgb_combine", self.act_rgb_combine)
1418
1412
  reg("blemish_blaster", self.act_blemish)
1413
+ reg("clone_stamp", self.act_clone_stamp)
1419
1414
  reg("wavescale_hdr", self.act_wavescale_hdr)
1420
1415
  reg("wavescale_dark_enhance", self.act_wavescale_de)
1421
1416
  reg("clahe", self.act_clahe)
@@ -214,6 +214,7 @@ class Icons:
214
214
  OPEN_FILE = property(lambda self: _resource_path('openfile.png'))
215
215
  ABE = property(lambda self: _resource_path('abeicon.png'))
216
216
  BLASTER = property(lambda self: _resource_path('blaster.png'))
217
+ CLONESTAMP = property(lambda self: _resource_path('clonestamp.png'))
217
218
 
218
219
  # Undo/Redo
219
220
  UNDO = property(lambda self: _resource_path('undoicon.png'))
@@ -475,6 +476,7 @@ def _init_legacy_paths():
475
476
  'undoicon_path': get_icon_path('undoicon.png'),
476
477
  'redoicon_path': get_icon_path('redoicon.png'),
477
478
  'blastericon_path': get_icon_path('blaster.png'),
479
+ 'clonestampicon_path': get_icon_path('clonestamp.png'),
478
480
  'hdr_path': get_icon_path('hdr.png'),
479
481
  'invert_path': get_icon_path('invert.png'),
480
482
  'fliphorizontal_path': get_icon_path('fliphorizontal.png'),