not1mm 24.10.15.1__py3-none-any.whl → 24.10.17.1__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.
not1mm/__main__.py CHANGED
@@ -654,6 +654,7 @@ class MainWindow(QtWidgets.QMainWindow):
654
654
  self.actionCheck_Window.setChecked(self.pref.get("checkwindow", False))
655
655
  if self.actionCheck_Window.isChecked():
656
656
  self.check_window.show()
657
+ self.check_window.setActive(True)
657
658
 
658
659
  self.actionVFO.setChecked(self.pref.get("vfowindow", False))
659
660
  if self.actionVFO.isChecked():
@@ -1631,8 +1632,10 @@ class MainWindow(QtWidgets.QMainWindow):
1631
1632
  self.write_preference()
1632
1633
  if self.actionCheck_Window.isChecked():
1633
1634
  self.check_window.show()
1635
+ self.check_window.setActive(True)
1634
1636
  else:
1635
1637
  self.check_window.hide()
1638
+ self.check_window.setActive(False)
1636
1639
 
1637
1640
  def launch_vfo(self) -> None:
1638
1641
  """Launch the VFO window"""
@@ -3048,7 +3051,6 @@ class MainWindow(QtWidgets.QMainWindow):
3048
3051
  -------
3049
3052
  None
3050
3053
  """
3051
-
3052
3054
  text = self.callsign.text()
3053
3055
  text = text.upper()
3054
3056
  position = self.callsign.cursorPosition()
@@ -3087,11 +3089,6 @@ class MainWindow(QtWidgets.QMainWindow):
3087
3089
  self.change_freq(stripped_text)
3088
3090
  return
3089
3091
 
3090
- self.check_callsign(stripped_text)
3091
- if self.check_dupe(stripped_text):
3092
- self.dupe_indicator.show()
3093
- else:
3094
- self.dupe_indicator.hide()
3095
3092
  cmd = {}
3096
3093
  cmd["cmd"] = "LOOKUP_CALL"
3097
3094
  cmd["station"] = platform.node()
@@ -3105,6 +3102,10 @@ class MainWindow(QtWidgets.QMainWindow):
3105
3102
  cmd["call"] = stripped_text
3106
3103
  self.multicast_interface.send_as_json(cmd)
3107
3104
  self.check_callsign(stripped_text)
3105
+ if self.check_dupe(stripped_text):
3106
+ self.dupe_indicator.show()
3107
+ else:
3108
+ self.dupe_indicator.hide()
3108
3109
 
3109
3110
  def change_freq(self, stripped_text: str) -> None:
3110
3111
  """
@@ -3160,14 +3161,14 @@ class MainWindow(QtWidgets.QMainWindow):
3160
3161
  """
3161
3162
 
3162
3163
  if mode in ("CW", "CW-U", "CW-L", "CWR"):
3163
- self.setmode("CW")
3164
- self.radio_state["mode"] = "CW"
3165
3164
  if self.rig_control and self.rig_control.online:
3166
3165
  self.rig_control.set_mode("CW")
3167
3166
  if self.pref.get("cwtype") == 3 and self.rig_control is not None:
3168
3167
  if self.rig_control.interface == "flrig":
3169
3168
  self.cwspeed_spinbox_changed()
3170
3169
  self.rig_control.cat.set_flrig_cw_send(True)
3170
+ self.setmode("CW")
3171
+ self.radio_state["mode"] = "CW"
3171
3172
  band = getband(str(self.radio_state.get("vfoa", "0.0")))
3172
3173
  self.set_band_indicator(band)
3173
3174
  self.set_window_title()
@@ -3175,11 +3176,11 @@ class MainWindow(QtWidgets.QMainWindow):
3175
3176
  self.read_cw_macros()
3176
3177
  return
3177
3178
  if mode == "RTTY":
3178
- self.setmode("RTTY")
3179
3179
  if self.rig_control and self.rig_control.online:
3180
3180
  self.rig_control.set_mode("RTTY")
3181
3181
  else:
3182
3182
  self.radio_state["mode"] = "RTTY"
3183
+ self.setmode("RTTY")
3183
3184
  band = getband(str(self.radio_state.get("vfoa", "0.0")))
3184
3185
  self.set_band_indicator(band)
3185
3186
  self.set_window_title()
@@ -3187,16 +3188,16 @@ class MainWindow(QtWidgets.QMainWindow):
3187
3188
  self.read_cw_macros()
3188
3189
  return
3189
3190
  if mode == "SSB":
3190
- self.setmode("SSB")
3191
3191
  if int(self.radio_state.get("vfoa", 0)) > 10000000:
3192
3192
  self.radio_state["mode"] = "USB"
3193
3193
  else:
3194
3194
  self.radio_state["mode"] = "LSB"
3195
+ if self.rig_control:
3196
+ self.rig_control.set_mode(self.radio_state.get("mode"))
3197
+ self.setmode("SSB")
3195
3198
  band = getband(str(self.radio_state.get("vfoa", "0.0")))
3196
3199
  self.set_band_indicator(band)
3197
3200
  self.set_window_title()
3198
- if self.rig_control:
3199
- self.rig_control.set_mode(self.radio_state.get("mode"))
3200
3201
  self.clearinputs()
3201
3202
  self.read_cw_macros()
3202
3203
 
not1mm/checkwindow.py CHANGED
@@ -47,6 +47,7 @@ class CheckWindow(QDockWidget):
47
47
 
48
48
  def __init__(self):
49
49
  super().__init__()
50
+ self.active = False
50
51
  self.load_pref()
51
52
  self.dbname = fsutils.USER_DATA_PATH / self.pref.get(
52
53
  "current_database", "ham.db"
@@ -65,6 +66,11 @@ class CheckWindow(QDockWidget):
65
66
  )
66
67
  self.multicast_interface.ready_read_connect(self.watch_udp)
67
68
 
69
+ def setActive(self, mode: bool):
70
+ self.active = bool(mode)
71
+
72
+ print(f"{self.active=}")
73
+
68
74
  def item_clicked(self, item):
69
75
  """docstring for item_clicked"""
70
76
  if item:
@@ -159,8 +165,14 @@ class CheckWindow(QDockWidget):
159
165
 
160
166
  if json_data.get("station", "") != platform.node():
161
167
  continue
168
+ if json_data.get("cmd", "") == "DARKMODE":
169
+ self.setDarkMode(json_data.get("state", False))
170
+ continue
162
171
  if json_data.get("cmd", "") == "UPDATELOG":
163
172
  self.clear_lists()
173
+ continue
174
+ if self.active is False:
175
+ continue
164
176
  if json_data.get("cmd", "") == "CALLCHANGED":
165
177
  call = json_data.get("call", "")
166
178
  self.call = call
@@ -176,9 +188,6 @@ class CheckWindow(QDockWidget):
176
188
  ...
177
189
  # self.load_new_db()
178
190
 
179
- if json_data.get("cmd", "") == "DARKMODE":
180
- self.setDarkMode(json_data.get("state", False))
181
-
182
191
  def clear_lists(self) -> None:
183
192
  """
184
193
  Clear match lists.