not1mm 25.4.8__py3-none-any.whl → 25.4.11.3__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
@@ -795,12 +795,20 @@ class MainWindow(QtWidgets.QMainWindow):
795
795
  try:
796
796
  with open(filename, "rt", encoding="utf-8") as file_descriptor:
797
797
  lines = file_descriptor.readlines()
798
- if "!!Order!!" in lines[0]:
799
- item_names = lines[0].strip().split(",")
798
+ substring_to_find = "!!Order!!"
799
+ found_index = -1 # Initialize to -1 to indicate not found
800
+
801
+ for index, item in enumerate(lines):
802
+ if substring_to_find in item:
803
+ found_index = index
804
+ break # Exit the loop once found
805
+
806
+ if found_index != -1:
807
+ item_names = lines[found_index].strip().split(",")
800
808
  # ['!!Order!!', 'Call', 'Sect', 'State', 'CK', 'UserText', '']
801
809
  item_names = item_names[1:]
802
810
  # ['Call', 'Sect', 'State', 'CK', 'UserText', '']
803
- lines = lines[1:]
811
+ lines = lines[found_index + 1 :]
804
812
  group_list = []
805
813
  for line in lines:
806
814
  if line.startswith("#"):
@@ -832,6 +840,15 @@ class MainWindow(QtWidgets.QMainWindow):
832
840
  if hasattr(self.contest, "process_esm"):
833
841
  self.contest.process_esm(self, new_focused_widget=new)
834
842
 
843
+ def make_button_blue(self, the_button: QtWidgets.QPushButton) -> None:
844
+ """Takes supplied QPushButton object and turns it blue."""
845
+ if the_button is not None:
846
+ pal = QPalette()
847
+ pal.isCopyOf(self.current_palette)
848
+ blueColor = QColor(0, 0, 128)
849
+ pal.setBrush(QPalette.ColorRole.Button, blueColor)
850
+ the_button.setPalette(pal)
851
+
835
852
  def make_button_green(self, the_button: QtWidgets.QPushButton) -> None:
836
853
  """Takes supplied QPushButton object and turns it green."""
837
854
  if the_button is not None:
@@ -1026,7 +1043,6 @@ class MainWindow(QtWidgets.QMainWindow):
1026
1043
  if self.bandmap_window:
1027
1044
  self.bandmap_window.msg_from_main(cmd)
1028
1045
 
1029
-
1030
1046
  if setdarkmode:
1031
1047
  darkPalette = QPalette()
1032
1048
  darkColor = QColor(56, 56, 56)
@@ -1837,6 +1853,7 @@ class MainWindow(QtWidgets.QMainWindow):
1837
1853
  "[CTRL-SHIFT-K] Open CW text input field.\n"
1838
1854
  "[CTRL-=]\tLog the contact without sending the ESM macros.\n"
1839
1855
  "[CTRL-W]\tClears the input fields of any text.\n"
1856
+ "[CTRL-R]\tToggle the Run state.\n"
1840
1857
  )
1841
1858
 
1842
1859
  def filepicker(self, action: str) -> str:
@@ -2089,10 +2106,14 @@ class MainWindow(QtWidgets.QMainWindow):
2089
2106
  def stop_cw(self):
2090
2107
  """"""
2091
2108
  self.auto_cq = False
2109
+ self.leftdot.hide()
2092
2110
  if self.cw is not None:
2093
2111
  if self.cw.servertype == 1:
2094
2112
  self.cw.sendcw("\x1b4")
2095
2113
  return
2114
+ if self.cw.servertype == 2:
2115
+ self.cw.winkeyer_stop()
2116
+ return
2096
2117
  if self.rig_control:
2097
2118
  if self.rig_control.online:
2098
2119
  if self.pref.get("cwtype") == 3 and self.rig_control is not None:
@@ -2195,6 +2216,20 @@ class MainWindow(QtWidgets.QMainWindow):
2195
2216
  if self.bandmap_window:
2196
2217
  self.bandmap_window.msg_from_main(cmd)
2197
2218
  return
2219
+ if (
2220
+ event.key() == Qt.Key.Key_R
2221
+ and modifier == Qt.KeyboardModifier.ControlModifier
2222
+ ): # pylint: disable=no-member
2223
+ self.toggle_run_sp()
2224
+ return
2225
+ if (
2226
+ event.key() == Qt.Key.Key_T
2227
+ and modifier == Qt.KeyboardModifier.ControlModifier
2228
+ ): # pylint: disable=no-member
2229
+ if hasattr(self.contest, "add_test_data"):
2230
+ self.contest.add_test_data(self)
2231
+ return
2232
+
2198
2233
  if (
2199
2234
  event.key() == Qt.Key.Key_W
2200
2235
  and modifier == Qt.KeyboardModifier.ControlModifier
@@ -2206,16 +2241,6 @@ class MainWindow(QtWidgets.QMainWindow):
2206
2241
  and modifier != Qt.KeyboardModifier.ControlModifier
2207
2242
  ):
2208
2243
  self.stop_cw()
2209
- # if self.cw is not None:
2210
- # if self.cw.servertype == 1:
2211
- # self.cw.sendcw("\x1b4")
2212
- # return
2213
- # if self.rig_control:
2214
- # if self.rig_control.online:
2215
- # if self.pref.get("cwtype") == 3 and self.rig_control is not None:
2216
- # if self.rig_control.interface == "flrig":
2217
- # self.rig_control.cat.set_flrig_cw_send(False)
2218
- # self.rig_control.cat.set_flrig_cw_send(True)
2219
2244
  if event.key() == Qt.Key.Key_Up:
2220
2245
  cmd = {}
2221
2246
  cmd["cmd"] = "PREVSPOT"
@@ -2334,6 +2359,8 @@ class MainWindow(QtWidgets.QMainWindow):
2334
2359
  if event.modifiers() == Qt.KeyboardModifier.ShiftModifier:
2335
2360
  self.radioButton_run.setChecked(True)
2336
2361
  self.run_sp_buttons_clicked()
2362
+ # self.make_button_blue(self.F1)
2363
+ self.leftdot.show()
2337
2364
  self.auto_cq = True
2338
2365
  self.auto_cq_time = datetime.datetime.now() + datetime.timedelta(
2339
2366
  milliseconds=self.auto_cq_delay
@@ -2889,8 +2916,8 @@ class MainWindow(QtWidgets.QMainWindow):
2889
2916
 
2890
2917
  logger.debug("PTT On")
2891
2918
  if self.rig_control:
2892
- self.leftdot.setPixmap(self.greendot)
2893
- app.processEvents()
2919
+ # self.leftdot.setPixmap(self.greendot)
2920
+ # app.processEvents()
2894
2921
  self.rig_control.ptt_on()
2895
2922
 
2896
2923
  def ptt_off(self) -> None:
@@ -2908,8 +2935,8 @@ class MainWindow(QtWidgets.QMainWindow):
2908
2935
 
2909
2936
  logger.debug("PTT Off")
2910
2937
  if self.rig_control:
2911
- self.leftdot.setPixmap(self.reddot)
2912
- app.processEvents()
2938
+ # self.leftdot.setPixmap(self.reddot)
2939
+ # app.processEvents()
2913
2940
  self.rig_control.ptt_off()
2914
2941
 
2915
2942
  def process_function_key(self, function_key, rttysendrx=True) -> None:
@@ -2952,6 +2979,14 @@ class MainWindow(QtWidgets.QMainWindow):
2952
2979
  return
2953
2980
  self.cw.sendcw(self.process_macro(function_key.toolTip()))
2954
2981
 
2982
+ def toggle_run_sp(self) -> None:
2983
+ """Toggles the radioButton_run and radioButton_sp."""
2984
+ if self.radioButton_run.isChecked():
2985
+ self.radioButton_sp.setChecked(True)
2986
+ else:
2987
+ self.radioButton_run.setChecked(True)
2988
+ self.run_sp_buttons_clicked()
2989
+
2955
2990
  def run_sp_buttons_clicked(self) -> None:
2956
2991
  """
2957
2992
  Handle Run/S&P mode changes.
not1mm/data/greendot.png CHANGED
Binary file
@@ -212,6 +212,11 @@
212
212
  <string>10 10 WINTER PHONE</string>
213
213
  </property>
214
214
  </item>
215
+ <item>
216
+ <property name="text">
217
+ <string>ARI 40 80</string>
218
+ </property>
219
+ </item>
215
220
  <item>
216
221
  <property name="text">
217
222
  <string>ARRL 10M</string>
@@ -432,6 +437,16 @@
432
437
  <string>REF SSB</string>
433
438
  </property>
434
439
  </item>
440
+ <item>
441
+ <property name="text">
442
+ <string>SAC CW</string>
443
+ </property>
444
+ </item>
445
+ <item>
446
+ <property name="text">
447
+ <string>SAC SSB</string>
448
+ </property>
449
+ </item>
435
450
  <item>
436
451
  <property name="text">
437
452
  <string>SPDX</string>
@@ -442,6 +457,11 @@
442
457
  <string>STEW PERRY TOPBAND</string>
443
458
  </property>
444
459
  </item>
460
+ <item>
461
+ <property name="text">
462
+ <string>UKEIDX</string>
463
+ </property>
464
+ </item>
445
465
  <item>
446
466
  <property name="text">
447
467
  <string>WEEKLY RTTY</string>
not1mm/lib/cwinterface.py CHANGED
@@ -66,9 +66,9 @@ class CW:
66
66
  if texttosend:
67
67
  if self.servertype == 2:
68
68
  self._sendcw_xmlrpc(texttosend)
69
- if self.servertype == 1:
69
+ elif self.servertype == 1:
70
70
  self._sendcw_udp(texttosend)
71
- if self.servertype == 3:
71
+ elif self.servertype == 3:
72
72
  self._sendcwcat(texttosend)
73
73
 
74
74
  def _sendcw_xmlrpc(self, texttosend):
@@ -130,3 +130,21 @@ class CW:
130
130
  logger.info(
131
131
  "http://%s:%s, xmlrpc Connection Refused", self.host, self.port
132
132
  )
133
+
134
+ def winkeyer_stop(self):
135
+ """doc"""
136
+ if not self.__check_sane_ip(self.host):
137
+ logger.critical(f"Bad IP: {self.host}")
138
+ return
139
+ with ServerProxy(f"http://{self.host}:{self.port}") as proxy:
140
+ try:
141
+ if "clearbuffer" in self.winkeyer_functions:
142
+ proxy.clearbuffer()
143
+ except Error as exception:
144
+ logger.info(
145
+ "http://%s:%s, xmlrpc error: %s", self.host, self.port, exception
146
+ )
147
+ except ConnectionRefusedError:
148
+ logger.info(
149
+ "http://%s:%s, xmlrpc Connection Refused", self.host, self.port
150
+ )
not1mm/lib/version.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """It's the version"""
2
2
 
3
- __version__ = "25.4.8"
3
+ __version__ = "25.4.11.3"