not1mm 24.10.13__py3-none-any.whl → 24.10.15__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/data/cwmacros.txt +6 -6
- not1mm/data/new_contest.ui +5 -0
- not1mm/data/rttymacros.txt +6 -6
- not1mm/lib/version.py +1 -1
- not1mm/plugins/cq_wpx_cw.py +101 -0
- not1mm/plugins/cq_wpx_rtty.py +106 -0
- not1mm/plugins/cq_wpx_ssb.py +101 -0
- not1mm/plugins/naqp_cw.py +132 -6
- not1mm/plugins/naqp_rtty.py +628 -0
- not1mm/plugins/naqp_ssb.py +126 -0
- {not1mm-24.10.13.dist-info → not1mm-24.10.15.dist-info}/METADATA +5 -3
- {not1mm-24.10.13.dist-info → not1mm-24.10.15.dist-info}/RECORD +16 -15
- {not1mm-24.10.13.dist-info → not1mm-24.10.15.dist-info}/LICENSE +0 -0
- {not1mm-24.10.13.dist-info → not1mm-24.10.15.dist-info}/WHEEL +0 -0
- {not1mm-24.10.13.dist-info → not1mm-24.10.15.dist-info}/entry_points.txt +0 -0
- {not1mm-24.10.13.dist-info → not1mm-24.10.15.dist-info}/top_level.txt +0 -0
not1mm/data/cwmacros.txt
CHANGED
@@ -1,18 +1,18 @@
|
|
1
|
-
S|F1|
|
2
|
-
S|F2|
|
3
|
-
S|F3|
|
1
|
+
S|F1|CQ|cq test {MYCALL} {MYCALL} test
|
2
|
+
S|F2|HisCall|{HISCALL}
|
3
|
+
S|F3|Exch|{SNT} {EXCH}
|
4
4
|
S|F4|empty|
|
5
|
-
S|F5|
|
5
|
+
S|F5|MyCall|{MYCALL}
|
6
6
|
S|F6|?|?
|
7
7
|
S|F7|Roger|rr
|
8
8
|
S|F8|73|73
|
9
|
-
S|F9
|
9
|
+
S|F9|AGN|agn
|
10
10
|
S|F10|Call?|cl?
|
11
11
|
S|F11|NR??|NR?
|
12
12
|
S|F12|TU|tu
|
13
13
|
R|F1|Run CQ|cq test {MYCALL} {MYCALL} test
|
14
14
|
R|F2|HisCall|{HISCALL}
|
15
|
-
R|F3|Run Exch|{
|
15
|
+
R|F3|Run Exch|{SNT} {EXCH}
|
16
16
|
R|F4|Run TU|tu {MYCALL} qrz
|
17
17
|
R|F5|MyCall|{MYCALL}
|
18
18
|
R|F6|MyNR|{SENTNR}
|
not1mm/data/new_contest.ui
CHANGED
not1mm/data/rttymacros.txt
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
S|F1|MyCall|{MYCALL}
|
2
|
-
S|F2|
|
3
|
-
S|F3|
|
2
|
+
S|F2|HisCall|{HISCALL}
|
3
|
+
S|F3|Exch|{SNT} {EXCH}
|
4
4
|
S|F4|empty|
|
5
|
-
S|F5|
|
5
|
+
S|F5|MyCall|{MYCALL}
|
6
6
|
S|F6|?|?
|
7
7
|
S|F7|Roger|rr
|
8
8
|
S|F8|73|73
|
9
|
-
S|F9
|
9
|
+
S|F9|AGN|agn
|
10
10
|
S|F10|Call?|cl?
|
11
11
|
S|F11|NR??|NR?
|
12
12
|
S|F12|TU|tu
|
13
13
|
R|F1|Run CQ|cq test {MYCALL} {MYCALL} test
|
14
14
|
R|F2|HisCall|{HISCALL}
|
15
|
-
R|F3|Run Exch|{
|
15
|
+
R|F3|Run Exch|{SNT} {EXCH}
|
16
16
|
R|F4|Run TU|tu {MYCALL} qrz
|
17
17
|
R|F5|MyCall|{MYCALL}
|
18
18
|
R|F6|MyNR|{SENTNR}
|
@@ -21,4 +21,4 @@ R|F8|Roger|rr
|
|
21
21
|
R|F9|AGN|agn
|
22
22
|
R|F10|Call?|cl?
|
23
23
|
R|F11|NR?|NR?
|
24
|
-
R|F12|Ack Call?|{HISCALL} rr tu
|
24
|
+
R|F12|Ack Call?|{HISCALL} rr tu
|
not1mm/lib/version.py
CHANGED
not1mm/plugins/cq_wpx_cw.py
CHANGED
@@ -429,3 +429,104 @@ def recalculate_mults(self):
|
|
429
429
|
else:
|
430
430
|
contact["IsMultiplier1"] = 0
|
431
431
|
self.database.change_contact(contact)
|
432
|
+
|
433
|
+
|
434
|
+
def process_esm(self, new_focused_widget=None, with_enter=False):
|
435
|
+
"""ESM State Machine"""
|
436
|
+
|
437
|
+
# self.pref["run_state"]
|
438
|
+
|
439
|
+
# -----===== Assigned F-Keys =====-----
|
440
|
+
# self.esm_dict["CQ"]
|
441
|
+
# self.esm_dict["EXCH"]
|
442
|
+
# self.esm_dict["QRZ"]
|
443
|
+
# self.esm_dict["AGN"]
|
444
|
+
# self.esm_dict["HISCALL"]
|
445
|
+
# self.esm_dict["MYCALL"]
|
446
|
+
# self.esm_dict["QSOB4"]
|
447
|
+
|
448
|
+
# ----==== text fields ====----
|
449
|
+
# self.callsign
|
450
|
+
# self.sent
|
451
|
+
# self.receive
|
452
|
+
# self.other_1
|
453
|
+
# self.other_2
|
454
|
+
|
455
|
+
if new_focused_widget is not None:
|
456
|
+
self.current_widget = self.inputs_dict.get(new_focused_widget)
|
457
|
+
|
458
|
+
# print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
|
459
|
+
|
460
|
+
for a_button in [
|
461
|
+
self.F1,
|
462
|
+
self.F2,
|
463
|
+
self.F3,
|
464
|
+
self.F4,
|
465
|
+
self.F5,
|
466
|
+
self.F6,
|
467
|
+
self.F7,
|
468
|
+
self.F8,
|
469
|
+
self.F9,
|
470
|
+
self.F10,
|
471
|
+
self.F11,
|
472
|
+
self.F12,
|
473
|
+
]:
|
474
|
+
self.restore_button_color(a_button)
|
475
|
+
|
476
|
+
buttons_to_send = []
|
477
|
+
|
478
|
+
if self.pref.get("run_state"):
|
479
|
+
if self.current_widget == "callsign":
|
480
|
+
if len(self.callsign.text()) < 3:
|
481
|
+
self.make_button_green(self.esm_dict["CQ"])
|
482
|
+
buttons_to_send.append(self.esm_dict["CQ"])
|
483
|
+
elif len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
|
484
|
+
self.make_button_green(self.esm_dict["HISCALL"])
|
485
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
486
|
+
buttons_to_send.append(self.esm_dict["HISCALL"])
|
487
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
488
|
+
|
489
|
+
elif self.current_widget == "other_2":
|
490
|
+
if self.other_2.text() == "":
|
491
|
+
self.make_button_green(self.esm_dict["AGN"])
|
492
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
493
|
+
elif self.other_2.text().isnumeric():
|
494
|
+
self.make_button_green(self.esm_dict["QRZ"])
|
495
|
+
buttons_to_send.append(self.esm_dict["QRZ"])
|
496
|
+
buttons_to_send.append("LOGIT")
|
497
|
+
else:
|
498
|
+
self.make_button_green(self.esm_dict["AGN"])
|
499
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
500
|
+
|
501
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
502
|
+
for button in buttons_to_send:
|
503
|
+
if button:
|
504
|
+
if button == "LOGIT":
|
505
|
+
self.save_contact()
|
506
|
+
continue
|
507
|
+
self.process_function_key(button)
|
508
|
+
else:
|
509
|
+
if self.current_widget == "callsign":
|
510
|
+
if len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
|
511
|
+
self.make_button_green(self.esm_dict["MYCALL"])
|
512
|
+
buttons_to_send.append(self.esm_dict["MYCALL"])
|
513
|
+
|
514
|
+
elif self.current_widget == "other_2":
|
515
|
+
if self.other_2.text() == "":
|
516
|
+
self.make_button_green(self.esm_dict["AGN"])
|
517
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
518
|
+
elif self.other_2.text().isnumeric():
|
519
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
520
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
521
|
+
buttons_to_send.append("LOGIT")
|
522
|
+
else:
|
523
|
+
self.make_button_green(self.esm_dict["AGN"])
|
524
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
525
|
+
|
526
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
527
|
+
for button in buttons_to_send:
|
528
|
+
if button:
|
529
|
+
if button == "LOGIT":
|
530
|
+
self.save_contact()
|
531
|
+
continue
|
532
|
+
self.process_function_key(button)
|
not1mm/plugins/cq_wpx_rtty.py
CHANGED
@@ -429,6 +429,7 @@ def recalculate_mults(self):
|
|
429
429
|
contact["IsMultiplier1"] = 0
|
430
430
|
self.database.change_contact(contact)
|
431
431
|
|
432
|
+
|
432
433
|
def set_self(the_outie):
|
433
434
|
"""..."""
|
434
435
|
globals()["ALTEREGO"] = the_outie
|
@@ -505,3 +506,108 @@ def ft8_handler(the_packet: dict):
|
|
505
506
|
ALTEREGO.other_1.setText(f'{the_packet.get("STX", "")}'.strip())
|
506
507
|
ALTEREGO.other_2.setText(f'{the_packet.get("SRX", "")}'.strip())
|
507
508
|
ALTEREGO.save_contact()
|
509
|
+
|
510
|
+
|
511
|
+
def process_esm(self, new_focused_widget=None, with_enter=False):
|
512
|
+
"""ESM State Machine"""
|
513
|
+
|
514
|
+
# self.pref["run_state"]
|
515
|
+
|
516
|
+
# -----===== Assigned F-Keys =====-----
|
517
|
+
# self.esm_dict["CQ"]
|
518
|
+
# self.esm_dict["EXCH"]
|
519
|
+
# self.esm_dict["QRZ"]
|
520
|
+
# self.esm_dict["AGN"]
|
521
|
+
# self.esm_dict["HISCALL"]
|
522
|
+
# self.esm_dict["MYCALL"]
|
523
|
+
# self.esm_dict["QSOB4"]
|
524
|
+
|
525
|
+
# ----==== text fields ====----
|
526
|
+
# self.callsign
|
527
|
+
# self.sent
|
528
|
+
# self.receive
|
529
|
+
# self.other_1
|
530
|
+
# self.other_2
|
531
|
+
|
532
|
+
if new_focused_widget is not None:
|
533
|
+
self.current_widget = self.inputs_dict.get(new_focused_widget)
|
534
|
+
|
535
|
+
# print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
|
536
|
+
|
537
|
+
for a_button in [
|
538
|
+
self.F1,
|
539
|
+
self.F2,
|
540
|
+
self.F3,
|
541
|
+
self.F4,
|
542
|
+
self.F5,
|
543
|
+
self.F6,
|
544
|
+
self.F7,
|
545
|
+
self.F8,
|
546
|
+
self.F9,
|
547
|
+
self.F10,
|
548
|
+
self.F11,
|
549
|
+
self.F12,
|
550
|
+
]:
|
551
|
+
self.restore_button_color(a_button)
|
552
|
+
|
553
|
+
buttons_to_send = []
|
554
|
+
|
555
|
+
if self.pref.get("run_state"):
|
556
|
+
if self.current_widget == "callsign":
|
557
|
+
if len(self.callsign.text()) < 3:
|
558
|
+
self.make_button_green(self.esm_dict["CQ"])
|
559
|
+
buttons_to_send.append(self.esm_dict["CQ"])
|
560
|
+
elif len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
|
561
|
+
self.make_button_green(self.esm_dict["HISCALL"])
|
562
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
563
|
+
buttons_to_send.append(self.esm_dict["HISCALL"])
|
564
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
565
|
+
|
566
|
+
elif self.current_widget in ["other_1", "other_2"]:
|
567
|
+
if self.other_2.text() == "" or self.other_1.text() == "":
|
568
|
+
self.make_button_green(self.esm_dict["AGN"])
|
569
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
570
|
+
elif self.other_1.text().isnumeric() and self.other_2.text().isalpha():
|
571
|
+
self.make_button_green(self.esm_dict["QRZ"])
|
572
|
+
buttons_to_send.append(self.esm_dict["QRZ"])
|
573
|
+
buttons_to_send.append("LOGIT")
|
574
|
+
else:
|
575
|
+
self.make_button_green(self.esm_dict["AGN"])
|
576
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
577
|
+
|
578
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
579
|
+
sendstring = ""
|
580
|
+
for button in buttons_to_send:
|
581
|
+
if button:
|
582
|
+
if button == "LOGIT":
|
583
|
+
self.save_contact()
|
584
|
+
continue
|
585
|
+
sendstring = f"{sendstring}{self.process_macro(button.toolTip())} "
|
586
|
+
self.fldigi_util.send_string(sendstring)
|
587
|
+
else:
|
588
|
+
if self.current_widget == "callsign":
|
589
|
+
if len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
|
590
|
+
self.make_button_green(self.esm_dict["MYCALL"])
|
591
|
+
buttons_to_send.append(self.esm_dict["MYCALL"])
|
592
|
+
|
593
|
+
elif self.current_widget in ["other_1", "other_2"]:
|
594
|
+
if self.other_2.text() == "" or self.other_1.text() == "":
|
595
|
+
self.make_button_green(self.esm_dict["AGN"])
|
596
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
597
|
+
elif self.other_1.text().isnumeric() and self.other_2.text().isalpha():
|
598
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
599
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
600
|
+
buttons_to_send.append("LOGIT")
|
601
|
+
else:
|
602
|
+
self.make_button_green(self.esm_dict["AGN"])
|
603
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
604
|
+
|
605
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
606
|
+
sendstring = ""
|
607
|
+
for button in buttons_to_send:
|
608
|
+
if button:
|
609
|
+
if button == "LOGIT":
|
610
|
+
self.save_contact()
|
611
|
+
continue
|
612
|
+
sendstring = f"{sendstring}{self.process_macro(button.toolTip())} "
|
613
|
+
self.fldigi_util.send_string(sendstring)
|
not1mm/plugins/cq_wpx_ssb.py
CHANGED
@@ -392,3 +392,104 @@ def recalculate_mults(self):
|
|
392
392
|
else:
|
393
393
|
contact["IsMultiplier1"] = 0
|
394
394
|
self.database.change_contact(contact)
|
395
|
+
|
396
|
+
|
397
|
+
def process_esm(self, new_focused_widget=None, with_enter=False):
|
398
|
+
"""ESM State Machine"""
|
399
|
+
|
400
|
+
# self.pref["run_state"]
|
401
|
+
|
402
|
+
# -----===== Assigned F-Keys =====-----
|
403
|
+
# self.esm_dict["CQ"]
|
404
|
+
# self.esm_dict["EXCH"]
|
405
|
+
# self.esm_dict["QRZ"]
|
406
|
+
# self.esm_dict["AGN"]
|
407
|
+
# self.esm_dict["HISCALL"]
|
408
|
+
# self.esm_dict["MYCALL"]
|
409
|
+
# self.esm_dict["QSOB4"]
|
410
|
+
|
411
|
+
# ----==== text fields ====----
|
412
|
+
# self.callsign
|
413
|
+
# self.sent
|
414
|
+
# self.receive
|
415
|
+
# self.other_1
|
416
|
+
# self.other_2
|
417
|
+
|
418
|
+
if new_focused_widget is not None:
|
419
|
+
self.current_widget = self.inputs_dict.get(new_focused_widget)
|
420
|
+
|
421
|
+
# print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
|
422
|
+
|
423
|
+
for a_button in [
|
424
|
+
self.F1,
|
425
|
+
self.F2,
|
426
|
+
self.F3,
|
427
|
+
self.F4,
|
428
|
+
self.F5,
|
429
|
+
self.F6,
|
430
|
+
self.F7,
|
431
|
+
self.F8,
|
432
|
+
self.F9,
|
433
|
+
self.F10,
|
434
|
+
self.F11,
|
435
|
+
self.F12,
|
436
|
+
]:
|
437
|
+
self.restore_button_color(a_button)
|
438
|
+
|
439
|
+
buttons_to_send = []
|
440
|
+
|
441
|
+
if self.pref.get("run_state"):
|
442
|
+
if self.current_widget == "callsign":
|
443
|
+
if len(self.callsign.text()) < 3:
|
444
|
+
self.make_button_green(self.esm_dict["CQ"])
|
445
|
+
buttons_to_send.append(self.esm_dict["CQ"])
|
446
|
+
elif len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
|
447
|
+
self.make_button_green(self.esm_dict["HISCALL"])
|
448
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
449
|
+
buttons_to_send.append(self.esm_dict["HISCALL"])
|
450
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
451
|
+
|
452
|
+
elif self.current_widget == "other_2":
|
453
|
+
if self.other_2.text() == "":
|
454
|
+
self.make_button_green(self.esm_dict["AGN"])
|
455
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
456
|
+
elif self.other_2.text().isnumeric():
|
457
|
+
self.make_button_green(self.esm_dict["QRZ"])
|
458
|
+
buttons_to_send.append(self.esm_dict["QRZ"])
|
459
|
+
buttons_to_send.append("LOGIT")
|
460
|
+
else:
|
461
|
+
self.make_button_green(self.esm_dict["AGN"])
|
462
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
463
|
+
|
464
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
465
|
+
for button in buttons_to_send:
|
466
|
+
if button:
|
467
|
+
if button == "LOGIT":
|
468
|
+
self.save_contact()
|
469
|
+
continue
|
470
|
+
self.process_function_key(button)
|
471
|
+
else:
|
472
|
+
if self.current_widget == "callsign":
|
473
|
+
if len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
|
474
|
+
self.make_button_green(self.esm_dict["MYCALL"])
|
475
|
+
buttons_to_send.append(self.esm_dict["MYCALL"])
|
476
|
+
|
477
|
+
elif self.current_widget == "other_2":
|
478
|
+
if self.other_2.text() == "":
|
479
|
+
self.make_button_green(self.esm_dict["AGN"])
|
480
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
481
|
+
elif self.other_2.text().isnumeric():
|
482
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
483
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
484
|
+
buttons_to_send.append("LOGIT")
|
485
|
+
else:
|
486
|
+
self.make_button_green(self.esm_dict["AGN"])
|
487
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
488
|
+
|
489
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
490
|
+
for button in buttons_to_send:
|
491
|
+
if button:
|
492
|
+
if button == "LOGIT":
|
493
|
+
self.save_contact()
|
494
|
+
continue
|
495
|
+
self.process_function_key(button)
|
not1mm/plugins/naqp_cw.py
CHANGED
@@ -13,12 +13,12 @@
|
|
13
13
|
# Single Op Assisted (QRP/Low)
|
14
14
|
# Single Op Overlay: Youth
|
15
15
|
# Multi-Two (Low)
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
# QRP:
|
20
|
-
#
|
21
|
-
#
|
16
|
+
# Max operating hours: Single Op: 10 hours
|
17
|
+
# Multi-Two: 12 hours
|
18
|
+
# Max power: LP: 100 watts
|
19
|
+
# QRP: 5 watts
|
20
|
+
# Exchange: NA: Name + (state/DC/province/country)
|
21
|
+
# non-NA: Name
|
22
22
|
# Work stations: Once per band
|
23
23
|
# QSO Points: NA station: 1 point per QSO
|
24
24
|
# non-NA station: 1 point per QSO with an NA station
|
@@ -391,3 +391,129 @@ def recalculate_mults(self):
|
|
391
391
|
cmd["cmd"] = "UPDATELOG"
|
392
392
|
cmd["station"] = platform.node()
|
393
393
|
self.multicast_interface.send_as_json(cmd)
|
394
|
+
|
395
|
+
|
396
|
+
def process_esm(self, new_focused_widget=None, with_enter=False):
|
397
|
+
"""ESM State Machine"""
|
398
|
+
|
399
|
+
# self.pref["run_state"]
|
400
|
+
|
401
|
+
# -----===== Assigned F-Keys =====-----
|
402
|
+
# self.esm_dict["CQ"]
|
403
|
+
# self.esm_dict["EXCH"]
|
404
|
+
# self.esm_dict["QRZ"]
|
405
|
+
# self.esm_dict["AGN"]
|
406
|
+
# self.esm_dict["HISCALL"]
|
407
|
+
# self.esm_dict["MYCALL"]
|
408
|
+
# self.esm_dict["QSOB4"]
|
409
|
+
|
410
|
+
# ----==== text fields ====----
|
411
|
+
# self.callsign
|
412
|
+
# self.sent
|
413
|
+
# self.receive
|
414
|
+
# self.other_1
|
415
|
+
# self.other_2
|
416
|
+
|
417
|
+
if new_focused_widget is not None:
|
418
|
+
self.current_widget = self.inputs_dict.get(new_focused_widget)
|
419
|
+
|
420
|
+
# print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
|
421
|
+
|
422
|
+
for a_button in [
|
423
|
+
self.F1,
|
424
|
+
self.F2,
|
425
|
+
self.F3,
|
426
|
+
self.F4,
|
427
|
+
self.F5,
|
428
|
+
self.F6,
|
429
|
+
self.F7,
|
430
|
+
self.F8,
|
431
|
+
self.F9,
|
432
|
+
self.F10,
|
433
|
+
self.F11,
|
434
|
+
self.F12,
|
435
|
+
]:
|
436
|
+
self.restore_button_color(a_button)
|
437
|
+
|
438
|
+
buttons_to_send = []
|
439
|
+
|
440
|
+
if self.pref.get("run_state"):
|
441
|
+
if self.current_widget == "callsign":
|
442
|
+
if len(self.callsign.text()) < 3:
|
443
|
+
self.make_button_green(self.esm_dict["CQ"])
|
444
|
+
buttons_to_send.append(self.esm_dict["CQ"])
|
445
|
+
elif len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
|
446
|
+
self.make_button_green(self.esm_dict["HISCALL"])
|
447
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
448
|
+
buttons_to_send.append(self.esm_dict["HISCALL"])
|
449
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
450
|
+
|
451
|
+
elif self.current_widget == "other_1" or self.current_widget == "other_2":
|
452
|
+
continent = self.contact.get("Continent")
|
453
|
+
print(
|
454
|
+
f"{self.current_widget=} {self.other_1.text().isalpha()=} {self.other_2.text().isalpha()=} {continent=}"
|
455
|
+
)
|
456
|
+
if self.other_1.text() == "" or (
|
457
|
+
self.other_2.text() == "" and continent == "NA"
|
458
|
+
):
|
459
|
+
self.make_button_green(self.esm_dict["AGN"])
|
460
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
461
|
+
elif (
|
462
|
+
self.other_1.text().isalpha()
|
463
|
+
and self.other_2.text().isalpha()
|
464
|
+
and continent == "NA"
|
465
|
+
):
|
466
|
+
self.make_button_green(self.esm_dict["QRZ"])
|
467
|
+
buttons_to_send.append(self.esm_dict["QRZ"])
|
468
|
+
buttons_to_send.append("LOGIT")
|
469
|
+
elif self.other_1.text().isalpha() and continent != "NA":
|
470
|
+
self.make_button_green(self.esm_dict["QRZ"])
|
471
|
+
buttons_to_send.append(self.esm_dict["QRZ"])
|
472
|
+
buttons_to_send.append("LOGIT")
|
473
|
+
else:
|
474
|
+
self.make_button_green(self.esm_dict["AGN"])
|
475
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
476
|
+
|
477
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
478
|
+
for button in buttons_to_send:
|
479
|
+
if button:
|
480
|
+
if button == "LOGIT":
|
481
|
+
self.save_contact()
|
482
|
+
continue
|
483
|
+
self.process_function_key(button)
|
484
|
+
else:
|
485
|
+
if self.current_widget == "callsign":
|
486
|
+
if len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
|
487
|
+
self.make_button_green(self.esm_dict["MYCALL"])
|
488
|
+
buttons_to_send.append(self.esm_dict["MYCALL"])
|
489
|
+
|
490
|
+
elif self.current_widget == "other_1" or self.current_widget == "other_2":
|
491
|
+
continent = self.contact.get("Continent")
|
492
|
+
if self.other_1.text() == "" or (
|
493
|
+
self.other_2.text() == "" and continent == "NA"
|
494
|
+
):
|
495
|
+
self.make_button_green(self.esm_dict["AGN"])
|
496
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
497
|
+
elif (
|
498
|
+
self.other_1.text().isalpha()
|
499
|
+
and self.other_2.text().isalpha()
|
500
|
+
and continent == "NA"
|
501
|
+
):
|
502
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
503
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
504
|
+
buttons_to_send.append("LOGIT")
|
505
|
+
elif self.other_1.text().isalpha() and continent != "NA":
|
506
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
507
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
508
|
+
buttons_to_send.append("LOGIT")
|
509
|
+
else:
|
510
|
+
self.make_button_green(self.esm_dict["AGN"])
|
511
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
512
|
+
|
513
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
514
|
+
for button in buttons_to_send:
|
515
|
+
if button:
|
516
|
+
if button == "LOGIT":
|
517
|
+
self.save_contact()
|
518
|
+
continue
|
519
|
+
self.process_function_key(button)
|