not1mm 23.12.20__py3-none-any.whl → 23.12.24__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
@@ -127,7 +127,7 @@ class MainWindow(QtWidgets.QMainWindow):
127
127
  "command_buttons": False,
128
128
  "cw_macros": True,
129
129
  "bands_modes": True,
130
- "bands": ["160m", "80m", "40m", "20m", "15m", "10m"],
130
+ "bands": ["160", "80", "40", "20", "15", "10"],
131
131
  "window_height": 200,
132
132
  "window_width": 600,
133
133
  "window_x": 120,
@@ -270,80 +270,148 @@ class MainWindow(QtWidgets.QMainWindow):
270
270
  self.radio_icon.setPixmap(self.radio_grey)
271
271
 
272
272
  self.F1.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
273
- self.F1.customContextMenuRequested.connect(self.edit_F1)
274
- self.F1.clicked.connect(self.sendf1)
273
+ self.F1.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F1))
274
+ self.F1.clicked.connect(lambda x: self.process_function_key(self.F1))
275
275
  self.F2.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
276
- self.F2.customContextMenuRequested.connect(self.edit_F2)
277
- self.F2.clicked.connect(self.sendf2)
276
+ self.F2.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F2))
277
+ self.F2.clicked.connect(lambda x: self.process_function_key(self.F2))
278
278
  self.F3.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
279
- self.F3.customContextMenuRequested.connect(self.edit_F3)
280
- self.F3.clicked.connect(self.sendf3)
279
+ self.F3.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F3))
280
+ self.F3.clicked.connect(lambda x: self.process_function_key(self.F3))
281
281
  self.F4.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
282
- self.F4.customContextMenuRequested.connect(self.edit_F4)
283
- self.F4.clicked.connect(self.sendf4)
282
+ self.F4.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F4))
283
+ self.F4.clicked.connect(lambda x: self.process_function_key(self.F4))
284
284
  self.F5.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
285
- self.F5.customContextMenuRequested.connect(self.edit_F5)
286
- self.F5.clicked.connect(self.sendf5)
285
+ self.F5.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F5))
286
+ self.F5.clicked.connect(lambda x: self.process_function_key(self.F5))
287
287
  self.F6.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
288
- self.F6.customContextMenuRequested.connect(self.edit_F6)
289
- self.F6.clicked.connect(self.sendf6)
288
+ self.F6.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F6))
289
+ self.F6.clicked.connect(lambda x: self.process_function_key(self.F6))
290
290
  self.F7.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
291
- self.F7.customContextMenuRequested.connect(self.edit_F7)
292
- self.F7.clicked.connect(self.sendf7)
291
+ self.F7.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F7))
292
+ self.F7.clicked.connect(lambda x: self.process_function_key(self.F7))
293
293
  self.F8.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
294
- self.F8.customContextMenuRequested.connect(self.edit_F8)
295
- self.F8.clicked.connect(self.sendf8)
294
+ self.F8.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F8))
295
+ self.F8.clicked.connect(lambda x: self.process_function_key(self.F8))
296
296
  self.F9.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
297
- self.F9.customContextMenuRequested.connect(self.edit_F9)
298
- self.F9.clicked.connect(self.sendf9)
297
+ self.F9.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F9))
298
+ self.F9.clicked.connect(lambda x: self.process_function_key(self.F9))
299
299
  self.F10.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
300
- self.F10.customContextMenuRequested.connect(self.edit_F10)
301
- self.F10.clicked.connect(self.sendf10)
300
+ self.F10.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F10))
301
+ self.F10.clicked.connect(lambda x: self.process_function_key(self.F10))
302
302
  self.F11.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
303
- self.F11.customContextMenuRequested.connect(self.edit_F11)
304
- self.F11.clicked.connect(self.sendf11)
303
+ self.F11.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F11))
304
+ self.F11.clicked.connect(lambda x: self.process_function_key(self.F11))
305
305
  self.F12.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
306
- self.F12.customContextMenuRequested.connect(self.edit_F12)
307
- self.F12.clicked.connect(self.sendf12)
308
-
309
- self.cw_band_160.mousePressEvent = self.click_160_cw
310
- self.cw_band_80.mousePressEvent = self.click_80_cw
311
- self.cw_band_40.mousePressEvent = self.click_40_cw
312
- self.cw_band_20.mousePressEvent = self.click_20_cw
313
- self.cw_band_15.mousePressEvent = self.click_15_cw
314
- self.cw_band_10.mousePressEvent = self.click_10_cw
315
- self.cw_band_6.mousePressEvent = self.click_6_cw
316
- self.cw_band_2.mousePressEvent = self.click_2_cw
317
- self.cw_band_125.mousePressEvent = self.click_125_cw
318
- self.cw_band_70cm.mousePressEvent = self.click_70cm_cw
319
- self.cw_band_33cm.mousePressEvent = self.click_33cm_cw
320
- self.cw_band_23cm.mousePressEvent = self.click_23cm_cw
321
-
322
- self.ssb_band_160.mousePressEvent = self.click_160_ssb
323
- self.ssb_band_80.mousePressEvent = self.click_80_ssb
324
- self.ssb_band_40.mousePressEvent = self.click_40_ssb
325
- self.ssb_band_20.mousePressEvent = self.click_20_ssb
326
- self.ssb_band_15.mousePressEvent = self.click_15_ssb
327
- self.ssb_band_10.mousePressEvent = self.click_10_ssb
328
- self.ssb_band_6.mousePressEvent = self.click_6_ssb
329
- self.ssb_band_2.mousePressEvent = self.click_2_ssb
330
- self.ssb_band_125.mousePressEvent = self.click_125_ssb
331
- self.ssb_band_70cm.mousePressEvent = self.click_70cm_ssb
332
- self.ssb_band_33cm.mousePressEvent = self.click_33cm_ssb
333
- self.ssb_band_23cm.mousePressEvent = self.click_23cm_ssb
334
-
335
- self.rtty_band_160.mousePressEvent = self.click_160_rtty
336
- self.rtty_band_80.mousePressEvent = self.click_80_rtty
337
- self.rtty_band_40.mousePressEvent = self.click_40_rtty
338
- self.rtty_band_20.mousePressEvent = self.click_20_rtty
339
- self.rtty_band_15.mousePressEvent = self.click_15_rtty
340
- self.rtty_band_10.mousePressEvent = self.click_10_rtty
341
- self.rtty_band_6.mousePressEvent = self.click_6_rtty
342
- self.rtty_band_2.mousePressEvent = self.click_2_rtty
343
- self.rtty_band_125.mousePressEvent = self.click_125_rtty
344
- self.rtty_band_70cm.mousePressEvent = self.click_70cm_rtty
345
- self.rtty_band_33cm.mousePressEvent = self.click_33cm_rtty
346
- self.rtty_band_23cm.mousePressEvent = self.click_23cm_rtty
306
+ self.F12.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F12))
307
+ self.F12.clicked.connect(lambda x: self.process_function_key(self.F12))
308
+
309
+ self.cw_band_160.mousePressEvent = lambda x: self.change_to_band_and_mode(
310
+ 160, "CW"
311
+ )
312
+ self.cw_band_80.mousePressEvent = lambda x: self.change_to_band_and_mode(
313
+ 80, "CW"
314
+ )
315
+ self.cw_band_40.mousePressEvent = lambda x: self.change_to_band_and_mode(
316
+ 40, "CW"
317
+ )
318
+ self.cw_band_20.mousePressEvent = lambda x: self.change_to_band_and_mode(
319
+ 20, "CW"
320
+ )
321
+ self.cw_band_15.mousePressEvent = lambda x: self.change_to_band_and_mode(
322
+ 15, "CW"
323
+ )
324
+ self.cw_band_10.mousePressEvent = lambda x: self.change_to_band_and_mode(
325
+ 10, "CW"
326
+ )
327
+ self.cw_band_6.mousePressEvent = lambda x: self.change_to_band_and_mode(6, "CW")
328
+ self.cw_band_2.mousePressEvent = lambda x: self.change_to_band_and_mode(2, "CW")
329
+ self.cw_band_125.mousePressEvent = lambda x: self.change_to_band_and_mode(
330
+ 222, "CW"
331
+ )
332
+ self.cw_band_70cm.mousePressEvent = lambda x: self.change_to_band_and_mode(
333
+ 432, "CW"
334
+ )
335
+ self.cw_band_33cm.mousePressEvent = lambda x: self.change_to_band_and_mode(
336
+ 902, "CW"
337
+ )
338
+ self.cw_band_23cm.mousePressEvent = lambda x: self.change_to_band_and_mode(
339
+ 1240, "CW"
340
+ )
341
+
342
+ self.ssb_band_160.mousePressEvent = lambda x: self.change_to_band_and_mode(
343
+ 160, "SSB"
344
+ )
345
+ self.ssb_band_80.mousePressEvent = lambda x: self.change_to_band_and_mode(
346
+ 80, "SSB"
347
+ )
348
+ self.ssb_band_40.mousePressEvent = lambda x: self.change_to_band_and_mode(
349
+ 40, "SSB"
350
+ )
351
+ self.ssb_band_20.mousePressEvent = lambda x: self.change_to_band_and_mode(
352
+ 20, "SSB"
353
+ )
354
+ self.ssb_band_15.mousePressEvent = lambda x: self.change_to_band_and_mode(
355
+ 15, "SSB"
356
+ )
357
+ self.ssb_band_10.mousePressEvent = lambda x: self.change_to_band_and_mode(
358
+ 10, "SSB"
359
+ )
360
+ self.ssb_band_6.mousePressEvent = lambda x: self.change_to_band_and_mode(
361
+ 6, "SSB"
362
+ )
363
+ self.ssb_band_2.mousePressEvent = lambda x: self.change_to_band_and_mode(
364
+ 2, "SSB"
365
+ )
366
+ self.ssb_band_125.mousePressEvent = lambda x: self.change_to_band_and_mode(
367
+ 222, "SSB"
368
+ )
369
+ self.ssb_band_70cm.mousePressEvent = lambda x: self.change_to_band_and_mode(
370
+ 432, "SSB"
371
+ )
372
+ self.ssb_band_33cm.mousePressEvent = lambda x: self.change_to_band_and_mode(
373
+ 902, "SSB"
374
+ )
375
+ self.ssb_band_23cm.mousePressEvent = lambda x: self.change_to_band_and_mode(
376
+ 1240, "SSB"
377
+ )
378
+
379
+ self.rtty_band_160.mousePressEvent = lambda x: self.change_to_band_and_mode(
380
+ 160, "RTTY"
381
+ )
382
+ self.rtty_band_80.mousePressEvent = lambda x: self.change_to_band_and_mode(
383
+ 80, "RTTY"
384
+ )
385
+ self.rtty_band_40.mousePressEvent = lambda x: self.change_to_band_and_mode(
386
+ 40, "RTTY"
387
+ )
388
+ self.rtty_band_20.mousePressEvent = lambda x: self.change_to_band_and_mode(
389
+ 20, "RTTY"
390
+ )
391
+ self.rtty_band_15.mousePressEvent = lambda x: self.change_to_band_and_mode(
392
+ 15, "RTTY"
393
+ )
394
+ self.rtty_band_10.mousePressEvent = lambda x: self.change_to_band_and_mode(
395
+ 10, "RTTY"
396
+ )
397
+ self.rtty_band_6.mousePressEvent = lambda x: self.change_to_band_and_mode(
398
+ 6, "RTTY"
399
+ )
400
+ self.rtty_band_2.mousePressEvent = lambda x: self.change_to_band_and_mode(
401
+ 2, "RTTY"
402
+ )
403
+ self.rtty_band_125.mousePressEvent = lambda x: self.change_to_band_and_mode(
404
+ 222, "RTTY"
405
+ )
406
+ self.rtty_band_70cm.mousePressEvent = lambda x: self.change_to_band_and_mode(
407
+ 432, "RTTY"
408
+ )
409
+ self.rtty_band_33cm.mousePressEvent = lambda x: self.change_to_band_and_mode(
410
+ 902, "RTTY"
411
+ )
412
+ self.rtty_band_23cm.mousePressEvent = lambda x: self.change_to_band_and_mode(
413
+ 1240, "RTTY"
414
+ )
347
415
 
348
416
  self.band_indicators_cw = {
349
417
  "160": self.cw_band_160,
@@ -454,159 +522,27 @@ class MainWindow(QtWidgets.QMainWindow):
454
522
  self.cw.sendcw(newtext[len(self.oldtext) :])
455
523
  self.oldtext = newtext
456
524
 
457
- def click_160_cw(self, _event) -> None:
458
- """Handle clicked on label"""
459
- self.change_to_band_and_mode(160, "CW")
460
-
461
- def click_80_cw(self, _event) -> None:
462
- """doc"""
463
- self.change_to_band_and_mode(80, "CW")
464
-
465
- def click_40_cw(self, _event) -> None:
466
- """doc"""
467
- self.change_to_band_and_mode(40, "CW")
468
-
469
- def click_20_cw(self, _event) -> None:
470
- """doc"""
471
- self.change_to_band_and_mode(20, "CW")
472
-
473
- def click_15_cw(self, _event) -> None:
474
- """doc"""
475
- self.change_to_band_and_mode(15, "CW")
476
-
477
- def click_10_cw(self, _event) -> None:
478
- """doc"""
479
- self.change_to_band_and_mode(10, "CW")
480
-
481
- def click_6_cw(self, _event) -> None:
482
- """doc"""
483
- self.change_to_band_and_mode(6, "CW")
484
-
485
- def click_2_cw(self, _event) -> None:
486
- """doc"""
487
- self.change_to_band_and_mode(2, "CW")
488
-
489
- def click_125_cw(self, _event) -> None:
490
- """doc"""
491
- self.change_to_band_and_mode(222, "CW")
492
-
493
- def click_70cm_cw(self, _event) -> None:
494
- """doc"""
495
- self.change_to_band_and_mode(432, "CW")
496
-
497
- def click_33cm_cw(self, _event) -> None:
498
- """doc"""
499
- self.change_to_band_and_mode(902, "CW")
500
-
501
- def click_23cm_cw(self, _event) -> None:
502
- """doc"""
503
- self.change_to_band_and_mode(1240, "CW")
504
-
505
- def click_160_ssb(self, _event) -> None:
506
- """doc"""
507
- self.change_to_band_and_mode(160, "SSB")
508
-
509
- def click_80_ssb(self, _event) -> None:
510
- """doc"""
511
- self.change_to_band_and_mode(80, "SSB")
512
-
513
- def click_40_ssb(self, _event) -> None:
514
- """doc"""
515
- self.change_to_band_and_mode(40, "SSB")
516
-
517
- def click_20_ssb(self, _event) -> None:
518
- """doc"""
519
- self.change_to_band_and_mode(20, "SSB")
520
-
521
- def click_15_ssb(self, _event) -> None:
522
- """doc"""
523
- self.change_to_band_and_mode(15, "SSB")
524
-
525
- def click_10_ssb(self, _event) -> None:
526
- """doc"""
527
- self.change_to_band_and_mode(10, "SSB")
528
-
529
- def click_6_ssb(self, _event) -> None:
530
- """doc"""
531
- self.change_to_band_and_mode(6, "SSB")
532
-
533
- def click_2_ssb(self, _event) -> None:
534
- """doc"""
535
- self.change_to_band_and_mode(2, "SSB")
536
-
537
- def click_125_ssb(self, _event) -> None:
538
- """doc"""
539
- self.change_to_band_and_mode(222, "SSB")
540
-
541
- def click_70cm_ssb(self, _event) -> None:
542
- """doc"""
543
- self.change_to_band_and_mode(432, "SSB")
544
-
545
- def click_33cm_ssb(self, _event) -> None:
546
- """doc"""
547
- self.change_to_band_and_mode(902, "SSB")
548
-
549
- def click_23cm_ssb(self, _event) -> None:
550
- """doc"""
551
- self.change_to_band_and_mode(1240, "SSB")
552
-
553
- def click_160_rtty(self, _event) -> None:
554
- """doc"""
555
- self.change_to_band_and_mode(160, "RTTY")
556
-
557
- def click_80_rtty(self, _event) -> None:
558
- """doc"""
559
- self.change_to_band_and_mode(80, "RTTY")
560
-
561
- def click_40_rtty(self, _event) -> None:
562
- """doc"""
563
- self.change_to_band_and_mode(40, "RTTY")
564
-
565
- def click_20_rtty(self, _event) -> None:
566
- """doc"""
567
- self.change_to_band_and_mode(20, "RTTY")
568
-
569
- def click_15_rtty(self, _event) -> None:
570
- """doc"""
571
- self.change_to_band_and_mode(15, "RTTY")
572
-
573
- def click_10_rtty(self, _event) -> None:
574
- """doc"""
575
- self.change_to_band_and_mode(10, "RTTY")
576
-
577
- def click_6_rtty(self, _event) -> None:
578
- """doc"""
579
- self.change_to_band_and_mode(6, "RTTY")
580
-
581
- def click_2_rtty(self, _event) -> None:
582
- """doc"""
583
- self.change_to_band_and_mode(2, "RTTY")
584
-
585
- def click_125_rtty(self, _event) -> None:
586
- """doc"""
587
- self.change_to_band_and_mode(222, "RTTY")
588
-
589
- def click_70cm_rtty(self, _event) -> None:
590
- """doc"""
591
- self.change_to_band_and_mode(432, "RTTY")
592
-
593
- def click_33cm_rtty(self, _event) -> None:
594
- """doc"""
595
- self.change_to_band_and_mode(902, "RTTY")
525
+ def change_to_band_and_mode(self, band: int, mode: str) -> None:
526
+ """
527
+ Gets a sane frequency for the chosen band and mode.
528
+ Then changes to that,
596
529
 
597
- def click_23cm_rtty(self, _event) -> None:
598
- """doc"""
599
- self.change_to_band_and_mode(1240, "RTTY")
530
+ Parameters
531
+ ----------
532
+ band : int
533
+ mode : str
600
534
 
601
- def change_to_band_and_mode(self, band, mode) -> None:
602
- """doc"""
535
+ Returns
536
+ -------
537
+ Nothing
538
+ """
603
539
  if mode in ["CW", "SSB", "RTTY"]:
604
540
  freq = fakefreq(str(band), mode)
605
541
  self.change_freq(freq)
606
542
  self.change_mode(mode)
607
543
 
608
544
  def quit_app(self) -> None:
609
- """doc"""
545
+ """Send multicast quit message, then quit the program."""
610
546
  cmd = {}
611
547
  cmd["cmd"] = "HALT"
612
548
  cmd["station"] = platform.node()
@@ -1298,29 +1234,29 @@ class MainWindow(QtWidgets.QMainWindow):
1298
1234
  next_tab.end(False)
1299
1235
  return
1300
1236
  if event.key() == Qt.Key_F1:
1301
- self.sendf1()
1237
+ self.process_function_key(self.F1)
1302
1238
  if event.key() == Qt.Key_F2:
1303
- self.sendf2()
1239
+ self.process_function_key(self.F2)
1304
1240
  if event.key() == Qt.Key_F3:
1305
- self.sendf3()
1241
+ self.process_function_key(self.F3)
1306
1242
  if event.key() == Qt.Key_F4:
1307
- self.sendf4()
1243
+ self.process_function_key(self.F4)
1308
1244
  if event.key() == Qt.Key_F5:
1309
- self.sendf5()
1245
+ self.process_function_key(self.F5)
1310
1246
  if event.key() == Qt.Key_F6:
1311
- self.sendf6()
1247
+ self.process_function_key(self.F6)
1312
1248
  if event.key() == Qt.Key_F7:
1313
- self.sendf7()
1249
+ self.process_function_key(self.F7)
1314
1250
  if event.key() == Qt.Key_F8:
1315
- self.sendf8()
1251
+ self.process_function_key(self.F8)
1316
1252
  if event.key() == Qt.Key_F9:
1317
- self.sendf9()
1253
+ self.process_function_key(self.F9)
1318
1254
  if event.key() == Qt.Key_F10:
1319
- self.sendf10()
1255
+ self.process_function_key(self.F10)
1320
1256
  if event.key() == Qt.Key_F11:
1321
- self.sendf11()
1257
+ self.process_function_key(self.F11)
1322
1258
  if event.key() == Qt.Key_F12:
1323
- self.sendf12()
1259
+ self.process_function_key(self.F12)
1324
1260
 
1325
1261
  def set_window_title(self) -> None:
1326
1262
  """Set window title"""
@@ -1461,12 +1397,6 @@ class MainWindow(QtWidgets.QMainWindow):
1461
1397
  self.n1mm.contact_info["zn"] = self.contact["ZN"]
1462
1398
  self.n1mm.contact_info["power"] = self.contact["Power"]
1463
1399
  self.n1mm.contact_info["band"] = self.contact["Band"]
1464
- # self.n1mm.contact_info['']
1465
- # self.n1mm.contact_info['']
1466
- # self.n1mm.contact_info['']
1467
- # self.n1mm.contact_info['']
1468
- # self.n1mm.contact_info['']
1469
- # self.n1mm.contact_info['']
1470
1400
  logger.debug("%s", f"{self.n1mm.contact_info}")
1471
1401
  self.n1mm.send_contact_info()
1472
1402
 
@@ -1480,39 +1410,6 @@ class MainWindow(QtWidgets.QMainWindow):
1480
1410
  cmd["station"] = platform.node()
1481
1411
  self.multicast_interface.send_as_json(cmd)
1482
1412
 
1483
- # self.contact["ContestName"] = self.contest.name
1484
- # self.contact["SNT"] = self.sent.text()
1485
- # self.contact["RCV"] = self.receive.text()
1486
- # self.contact["CountryPrefix"]
1487
- # self.contact["StationPrefix"] = self.pref.get("callsign", "")
1488
- # self.contact["QTH"]
1489
- # self.contact["Name"] = self.other_1.text()
1490
- # self.contact["Comment"] = self.other_2.text()
1491
- # self.contact["NR"]
1492
- # self.contact["Sect"]
1493
- # self.contact["Prec"]
1494
- # self.contact["CK"]
1495
- # self.contact["ZN"]
1496
- # self.contact["SentNr"]
1497
- # self.contact["Points"]
1498
- # self.contact["IsMultiplier1"]
1499
- # self.contact["IsMultiplier2"]
1500
- # self.contact["Power"]
1501
- # self.contact["Band"]
1502
- # self.contact["WPXPrefix"] = calculate_wpx_prefix(self.callsign.text())
1503
- # self.contact["Exchange1"]
1504
- # self.contact["RadioNR"]
1505
- # self.contact["isMultiplier3"]
1506
- # self.contact["MiscText"]
1507
- # self.contact["ContactType"]
1508
- # self.contact["Run1Run2"]
1509
- # self.contact["GridSquare"]
1510
- # self.contact["Continent"]
1511
- # self.contact["RoverLocation"]
1512
- # self.contact["RadioInterfaced"]
1513
- # self.contact["NetworkedCompNr"]
1514
- # self.contact["CLAIMEDQSO"]
1515
-
1516
1413
  def new_contest_dialog(self) -> None:
1517
1414
  """Show new contest dialog"""
1518
1415
  logger.debug("New contest Dialog")
@@ -1638,66 +1535,6 @@ class MainWindow(QtWidgets.QMainWindow):
1638
1535
  )
1639
1536
  self.edit_macro_dialog.close()
1640
1537
 
1641
- def edit_F1(self) -> None:
1642
- """stub"""
1643
- logger.debug("F1 Right Clicked.")
1644
- self.edit_macro(self.F1)
1645
-
1646
- def edit_F2(self) -> None:
1647
- """stub"""
1648
- logger.debug("F2 Right Clicked.")
1649
- self.edit_macro(self.F2)
1650
-
1651
- def edit_F3(self) -> None:
1652
- """stub"""
1653
- logger.debug("F3 Right Clicked.")
1654
- self.edit_macro(self.F3)
1655
-
1656
- def edit_F4(self) -> None:
1657
- """stub"""
1658
- logger.debug("F4 Right Clicked.")
1659
- self.edit_macro(self.F4)
1660
-
1661
- def edit_F5(self) -> None:
1662
- """stub"""
1663
- logger.debug("F5 Right Clicked.")
1664
- self.edit_macro(self.F5)
1665
-
1666
- def edit_F6(self) -> None:
1667
- """stub"""
1668
- logger.debug("F6 Right Clicked.")
1669
- self.edit_macro(self.F6)
1670
-
1671
- def edit_F7(self) -> None:
1672
- """stub"""
1673
- logger.debug("F7 Right Clicked.")
1674
- self.edit_macro(self.F7)
1675
-
1676
- def edit_F8(self) -> None:
1677
- """stub"""
1678
- logger.debug("F8 Right Clicked.")
1679
- self.edit_macro(self.F8)
1680
-
1681
- def edit_F9(self) -> None:
1682
- """stub"""
1683
- logger.debug("F9 Right Clicked.")
1684
- self.edit_macro(self.F9)
1685
-
1686
- def edit_F10(self) -> None:
1687
- """stub"""
1688
- logger.debug("F10 Right Clicked.")
1689
- self.edit_macro(self.F10)
1690
-
1691
- def edit_F11(self) -> None:
1692
- """stub"""
1693
- logger.debug("F11 Right Clicked.")
1694
- self.edit_macro(self.F11)
1695
-
1696
- def edit_F12(self) -> None:
1697
- """stub"""
1698
- logger.debug("F12 Right Clicked.")
1699
- self.edit_macro(self.F12)
1700
-
1701
1538
  def process_macro(self, macro: str) -> str:
1702
1539
  """Process CW macro substitutions"""
1703
1540
  result = self.database.get_serial()
@@ -1772,137 +1609,16 @@ class MainWindow(QtWidgets.QMainWindow):
1772
1609
  app.processEvents()
1773
1610
  self.rig_control.ptt_off()
1774
1611
 
1775
- def sendf1(self) -> None:
1776
- """stub"""
1612
+ def process_function_key(self, function_key) -> None:
1613
+ """Called when a function key is clicked."""
1777
1614
  logger.debug("F1 Clicked")
1778
1615
  if self.n1mm:
1779
- self.n1mm.radio_info["FunctionKeyCaption"] = self.F1.text()
1780
- if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
1781
- self.voice_string(self.process_macro(self.F1.toolTip()))
1782
- return
1783
- if self.cw:
1784
- self.cw.sendcw(self.process_macro(self.F1.toolTip()))
1785
-
1786
- def sendf2(self) -> None:
1787
- """stub"""
1788
- logger.debug("F2 Clicked")
1789
- if self.n1mm:
1790
- self.n1mm.radio_info["FunctionKeyCaption"] = self.F2.text()
1791
- if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
1792
- self.voice_string(self.process_macro(self.F2.toolTip()))
1793
- return
1794
- if self.cw:
1795
- self.cw.sendcw(self.process_macro(self.F2.toolTip()))
1796
-
1797
- def sendf3(self) -> None:
1798
- """stub"""
1799
- logger.debug("F3 Clicked")
1800
- if self.n1mm:
1801
- self.n1mm.radio_info["FunctionKeyCaption"] = self.F3.text()
1802
- if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
1803
- self.voice_string(self.process_macro(self.F3.toolTip()))
1804
- return
1805
- if self.cw:
1806
- self.cw.sendcw(self.process_macro(self.F3.toolTip()))
1807
-
1808
- def sendf4(self) -> None:
1809
- """stub"""
1810
- logger.debug("F4 Clicked")
1811
- if self.n1mm:
1812
- self.n1mm.radio_info["FunctionKeyCaption"] = self.F4.text()
1813
- if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
1814
- self.voice_string(self.process_macro(self.F4.toolTip()))
1815
- return
1816
- if self.cw:
1817
- self.cw.sendcw(self.process_macro(self.F4.toolTip()))
1818
-
1819
- def sendf5(self) -> None:
1820
- """stub"""
1821
- logger.debug("F5 Clicked")
1822
- if self.n1mm:
1823
- self.n1mm.radio_info["FunctionKeyCaption"] = self.F5.text()
1824
- if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
1825
- self.voice_string(self.process_macro(self.F5.toolTip()))
1826
- return
1827
- if self.cw:
1828
- self.cw.sendcw(self.process_macro(self.F5.toolTip()))
1829
-
1830
- def sendf6(self) -> None:
1831
- """stub"""
1832
- logger.debug("F6 Clicked")
1833
- if self.n1mm:
1834
- self.n1mm.radio_info["FunctionKeyCaption"] = self.F6.text()
1835
- if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
1836
- self.voice_string(self.process_macro(self.F6.toolTip()))
1837
- return
1838
- if self.cw:
1839
- self.cw.sendcw(self.process_macro(self.F6.toolTip()))
1840
-
1841
- def sendf7(self) -> None:
1842
- """stub"""
1843
- logger.debug("F7 Clicked")
1844
- if self.n1mm:
1845
- self.n1mm.radio_info["FunctionKeyCaption"] = self.F7.text()
1846
- if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
1847
- self.voice_string(self.process_macro(self.F7.toolTip()))
1848
- return
1849
- if self.cw:
1850
- self.cw.sendcw(self.process_macro(self.F7.toolTip()))
1851
-
1852
- def sendf8(self) -> None:
1853
- """stub"""
1854
- logger.debug("F8 Clicked")
1855
- if self.n1mm:
1856
- self.n1mm.radio_info["FunctionKeyCaption"] = self.F8.text()
1857
- if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
1858
- self.voice_string(self.process_macro(self.F8.toolTip()))
1859
- return
1860
- if self.cw:
1861
- self.cw.sendcw(self.process_macro(self.F8.toolTip()))
1862
-
1863
- def sendf9(self) -> None:
1864
- """stub"""
1865
- logger.debug("F9 Clicked")
1866
- if self.n1mm:
1867
- self.n1mm.radio_info["FunctionKeyCaption"] = self.F9.text()
1616
+ self.n1mm.radio_info["FunctionKeyCaption"] = function_key.text()
1868
1617
  if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
1869
- self.voice_string(self.process_macro(self.F9.toolTip()))
1618
+ self.voice_string(self.process_macro(function_key.toolTip()))
1870
1619
  return
1871
1620
  if self.cw:
1872
- self.cw.sendcw(self.process_macro(self.F9.toolTip()))
1873
-
1874
- def sendf10(self) -> None:
1875
- """stub"""
1876
- logger.debug("F10 Clicked")
1877
- if self.n1mm:
1878
- self.n1mm.radio_info["FunctionKeyCaption"] = self.F10.text()
1879
- if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
1880
- self.voice_string(self.process_macro(self.F10.toolTip()))
1881
- return
1882
- if self.cw:
1883
- self.cw.sendcw(self.process_macro(self.F10.toolTip()))
1884
-
1885
- def sendf11(self) -> None:
1886
- """stub"""
1887
- logger.debug("F11 Clicked")
1888
- if self.n1mm:
1889
- self.n1mm.radio_info["FunctionKeyCaption"] = self.F11.text()
1890
- if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
1891
- self.voice_string(self.process_macro(self.F11.toolTip()))
1892
- return
1893
- if self.cw:
1894
- self.cw.sendcw(self.process_macro(self.F11.toolTip()))
1895
-
1896
- def sendf12(self) -> None:
1897
- """stub"""
1898
- logger.debug("F12 Clicked")
1899
- if self.n1mm:
1900
- self.n1mm.radio_info["FunctionKeyCaption"] = self.F12.text()
1901
- if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
1902
- self.voice_string(self.process_macro(self.F12.toolTip()))
1903
- return
1904
- if self.cw:
1905
- self.cw.sendcw(self.process_macro(self.F12.toolTip()))
1621
+ self.cw.sendcw(self.process_macro(function_key.toolTip()))
1906
1622
 
1907
1623
  def run_sp_buttons_clicked(self) -> None:
1908
1624
  """Handle run/s&p mode"""
@@ -2399,7 +2115,7 @@ class MainWindow(QtWidgets.QMainWindow):
2399
2115
  return result.get("isdupe", False)
2400
2116
 
2401
2117
  def setmode(self, mode: str) -> None:
2402
- """stub for when the mode changes."""
2118
+ """Call when the mode changes."""
2403
2119
  if mode == "CW":
2404
2120
  if self.current_mode != "CW":
2405
2121
  self.current_mode = "CW"
@@ -2455,7 +2171,10 @@ class MainWindow(QtWidgets.QMainWindow):
2455
2171
  destination_file.write_bytes(child.read_bytes())
2456
2172
 
2457
2173
  def poll_radio(self) -> None:
2458
- """stub"""
2174
+ """
2175
+ Poll radio for VFO, mode, bandwidth.
2176
+ Send state via multicast.
2177
+ """
2459
2178
  self.set_radio_icon(0)
2460
2179
  if self.rig_control:
2461
2180
  if self.rig_control.online is False:
not1mm/lib/version.py CHANGED
@@ -1,2 +1,2 @@
1
1
  """It's the version"""
2
- __version__ = "23.12.20"
2
+ __version__ = "23.12.24"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: not1mm
3
- Version: 23.12.20
3
+ Version: 23.12.24
4
4
  Summary: NOT1MM Logger
5
5
  Author-email: Michael Bridak <michael.bridak@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/mbridak/not1mm
@@ -163,6 +163,8 @@ I wish to thank those who've contributed to the project.
163
163
 
164
164
  ## Recent Changes
165
165
 
166
+ - [23-12-24] Fixed bug where no bands showed onscreen during initial launch.
167
+ - [23-12-22] Refactored a bunch of code.
166
168
  - [23-12-20] Add ARRL VHF Jun and Sep.
167
169
  - [23-12-19] Add ARRL VHF contest. Add VHF frequencies. Add Bands TAB to configuration dialog to select active bands you want displayed.
168
170
  - [23-12-17] Add ARRL 10M contest. Fixed crash in RAC Canada Day
@@ -1,5 +1,5 @@
1
1
  not1mm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- not1mm/__main__.py,sha256=xqXClbUKw1kN2J6cNhtipRU-yVkHQMRmtMvUDIjM9oU,106935
2
+ not1mm/__main__.py,sha256=-5tC2r82VbzfBPIlFbw_dhlNFWyqLyRb2kfezzDRrtI,98409
3
3
  not1mm/bandmap.py,sha256=WBCy3erbsmDTNQ5e3H7e1Fl1iQcYljeJRvW5Yqg32sc,28917
4
4
  not1mm/checkwindow.py,sha256=CbdE_q2Ozo3mL04R18gSwjrP2Tr3pFRFXcCkr92IH60,7249
5
5
  not1mm/logwindow.py,sha256=Rw2393HcyXvP5MQXI0nPxEoD0eCT_PiD3S2Ni9dJS38,41889
@@ -102,7 +102,7 @@ not1mm/lib/plugin_common.py,sha256=5IWIy24NpAuuzzPEjmaqeKyFHllkOgVN1gEu8vkCZsg,7
102
102
  not1mm/lib/select_contest.py,sha256=XQdRUkPAIHIMVsilm82M54b_v9yWpYrZ1nfInJrtZoo,363
103
103
  not1mm/lib/settings.py,sha256=t_JLJPnDBtMGAvJMAF1AL1eVB7MyucqlksVTU47yxvk,8933
104
104
  not1mm/lib/super_check_partial.py,sha256=GlXgtIblL602iW-V6Mmdf5S4FxtzJ95TbPMMa9xXUfg,1692
105
- not1mm/lib/version.py,sha256=yutKiLqpElTLpXV05cIZkNlqZqTS_YWHci05JjIyUng,48
105
+ not1mm/lib/version.py,sha256=3WnTu2qu8QdFaxkHJJ9eZvjyCrfoPEspL1IZ_vQOy1k,48
106
106
  not1mm/lib/versiontest.py,sha256=8vDNptuBBunn-1IGkjNaquehqBYUJyjrPSF8Igmd4_Y,1286
107
107
  not1mm/plugins/10_10_fall_cw.py,sha256=yGMRxMXE6NW2Qie4olq1E9YziHOLCXp4_ZP7LXvbYf0,10307
108
108
  not1mm/plugins/10_10_spring_cw.py,sha256=J3FrRQbkA3dMEQiY7-cWJ0lGCakT1hhl8yynNszQ9qI,10313
@@ -139,9 +139,9 @@ not1mm/testing/n1mm_listener.py,sha256=UD-qyKEnppQua330WEFKMvMJaNjnYKi7dDuX_RGB5
139
139
  not1mm/testing/test.py,sha256=wGblvMlyOCVkEiHbxE6wvLsorim15ehL72_EZLQeWkk,1660
140
140
  testing/test.py,sha256=q7socQaMu46q-I-1fYgmQhnygrrC5NjAUM5yuySo4fA,249
141
141
  usb_vfo_knob/code.py,sha256=h59iPPlcYbkXmRcYPQHDBP0yfLEl7fY3VkiIszdQeyI,1057
142
- not1mm-23.12.20.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
143
- not1mm-23.12.20.dist-info/METADATA,sha256=oLFBE9CpHNPS80SGF2WGdO5F5XGXlD8LxRTF7_5jnNk,25772
144
- not1mm-23.12.20.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
145
- not1mm-23.12.20.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
146
- not1mm-23.12.20.dist-info/top_level.txt,sha256=PBUZJeDgW5ta7ghk__UYh_ygOFIhe9ymJDaxEuVumFU,28
147
- not1mm-23.12.20.dist-info/RECORD,,
142
+ not1mm-23.12.24.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
143
+ not1mm-23.12.24.dist-info/METADATA,sha256=QJ2imQYe9VIapjvSkVSnQiRmFKs42Zne_X_uySJNVwI,25890
144
+ not1mm-23.12.24.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
145
+ not1mm-23.12.24.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
146
+ not1mm-23.12.24.dist-info/top_level.txt,sha256=PBUZJeDgW5ta7ghk__UYh_ygOFIhe9ymJDaxEuVumFU,28
147
+ not1mm-23.12.24.dist-info/RECORD,,