not1mm 24.11.17__py3-none-any.whl → 24.11.19__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 +1 -1
- not1mm/data/new_contest.ui +5 -0
- not1mm/lib/plugin_common.py +20 -1
- not1mm/lib/version.py +1 -1
- not1mm/plugins/10_10_fall_cw.py +12 -24
- not1mm/plugins/10_10_spring_cw.py +12 -24
- not1mm/plugins/10_10_summer_phone.py +12 -22
- not1mm/plugins/10_10_winter_phone.py +12 -24
- not1mm/plugins/arrl_10m.py +16 -29
- not1mm/plugins/arrl_dx_cw.py +11 -22
- not1mm/plugins/arrl_dx_ssb.py +11 -22
- not1mm/plugins/arrl_field_day.py +14 -22
- not1mm/plugins/arrl_rtty_ru.py +10 -22
- not1mm/plugins/arrl_ss_cw.py +14 -29
- not1mm/plugins/arrl_ss_phone.py +14 -29
- not1mm/plugins/arrl_vhf_jan.py +14 -29
- not1mm/plugins/arrl_vhf_jun.py +14 -29
- not1mm/plugins/arrl_vhf_sep.py +14 -29
- not1mm/plugins/canada_day.py +14 -29
- not1mm/plugins/cq_160_cw.py +10 -24
- not1mm/plugins/cq_160_ssb.py +10 -24
- not1mm/plugins/cq_wpx_cw.py +12 -25
- not1mm/plugins/cq_wpx_rtty.py +12 -25
- not1mm/plugins/cq_wpx_ssb.py +14 -29
- not1mm/plugins/cq_ww_cw.py +11 -22
- not1mm/plugins/cq_ww_rtty.py +12 -26
- not1mm/plugins/cq_ww_ssb.py +11 -22
- not1mm/plugins/cwt.py +12 -26
- not1mm/plugins/darc_xmas.py +560 -0
- not1mm/plugins/general_logging.py +12 -26
- not1mm/plugins/helvetia.py +15 -26
- not1mm/plugins/iaru_fieldday_r1_cw.py +12 -25
- not1mm/plugins/iaru_fieldday_r1_ssb.py +12 -25
- not1mm/plugins/iaru_hf.py +11 -22
- not1mm/plugins/icwc_mst.py +136 -40
- not1mm/plugins/jidx_cw.py +102 -23
- not1mm/plugins/jidx_ph.py +106 -29
- not1mm/plugins/k1usn_sst.py +10 -16
- not1mm/plugins/lz-dx.py +17 -28
- not1mm/plugins/naqp_cw.py +11 -17
- not1mm/plugins/naqp_rtty.py +11 -17
- not1mm/plugins/naqp_ssb.py +11 -17
- not1mm/plugins/phone_weekly_test.py +101 -16
- not1mm/plugins/raem.py +26 -25
- not1mm/plugins/ref_cw.py +17 -28
- not1mm/plugins/ref_ssb.py +32 -28
- not1mm/plugins/stew_perry_topband.py +102 -16
- not1mm/plugins/weekly_rtty.py +17 -16
- not1mm/plugins/winter_field_day.py +28 -24
- {not1mm-24.11.17.dist-info → not1mm-24.11.19.dist-info}/METADATA +9 -5
- {not1mm-24.11.17.dist-info → not1mm-24.11.19.dist-info}/RECORD +55 -54
- {not1mm-24.11.17.dist-info → not1mm-24.11.19.dist-info}/LICENSE +0 -0
- {not1mm-24.11.17.dist-info → not1mm-24.11.19.dist-info}/WHEEL +0 -0
- {not1mm-24.11.17.dist-info → not1mm-24.11.19.dist-info}/entry_points.txt +0 -0
- {not1mm-24.11.17.dist-info → not1mm-24.11.19.dist-info}/top_level.txt +0 -0
@@ -97,34 +97,22 @@ def reset_label(self): # pylint: disable=unused-argument
|
|
97
97
|
def set_tab_next(self):
|
98
98
|
"""Set TAB Advances"""
|
99
99
|
self.tab_next = {
|
100
|
-
self.callsign: self.
|
101
|
-
self.
|
102
|
-
|
103
|
-
|
104
|
-
self.
|
105
|
-
QtWidgets.QLineEdit
|
106
|
-
),
|
107
|
-
self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild(
|
108
|
-
QtWidgets.QLineEdit
|
109
|
-
),
|
110
|
-
self.field4.findChild(QtWidgets.QLineEdit): self.callsign,
|
100
|
+
self.callsign: self.sent,
|
101
|
+
self.sent: self.receive,
|
102
|
+
self.receive: self.other_1,
|
103
|
+
self.other_1: self.other_2,
|
104
|
+
self.other_2: self.callsign,
|
111
105
|
}
|
112
106
|
|
113
107
|
|
114
108
|
def set_tab_prev(self):
|
115
109
|
"""Set TAB Advances"""
|
116
110
|
self.tab_prev = {
|
117
|
-
self.callsign: self.
|
118
|
-
self.
|
119
|
-
self.
|
120
|
-
|
121
|
-
|
122
|
-
self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild(
|
123
|
-
QtWidgets.QLineEdit
|
124
|
-
),
|
125
|
-
self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild(
|
126
|
-
QtWidgets.QLineEdit
|
127
|
-
),
|
111
|
+
self.callsign: self.other_2,
|
112
|
+
self.sent: self.callsign,
|
113
|
+
self.receive: self.sent,
|
114
|
+
self.other_1: self.receive,
|
115
|
+
self.other_2: self.other_1,
|
128
116
|
}
|
129
117
|
|
130
118
|
|
@@ -152,9 +140,8 @@ def prefill(self):
|
|
152
140
|
serial_nr = str(result.get("serial_nr", "1")).zfill(3)
|
153
141
|
if serial_nr == "None":
|
154
142
|
serial_nr = "001"
|
155
|
-
|
156
|
-
|
157
|
-
field.setText(serial_nr)
|
143
|
+
if len(self.other_1.text()) == 0:
|
144
|
+
self.other_1.setText(serial_nr)
|
158
145
|
|
159
146
|
|
160
147
|
def points(self):
|
@@ -97,34 +97,22 @@ def reset_label(self): # pylint: disable=unused-argument
|
|
97
97
|
def set_tab_next(self):
|
98
98
|
"""Set TAB Advances"""
|
99
99
|
self.tab_next = {
|
100
|
-
self.callsign: self.
|
101
|
-
self.
|
102
|
-
|
103
|
-
|
104
|
-
self.
|
105
|
-
QtWidgets.QLineEdit
|
106
|
-
),
|
107
|
-
self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild(
|
108
|
-
QtWidgets.QLineEdit
|
109
|
-
),
|
110
|
-
self.field4.findChild(QtWidgets.QLineEdit): self.callsign,
|
100
|
+
self.callsign: self.sent,
|
101
|
+
self.sent: self.receive,
|
102
|
+
self.receive: self.other_1,
|
103
|
+
self.other_1: self.other_2,
|
104
|
+
self.other_2: self.callsign,
|
111
105
|
}
|
112
106
|
|
113
107
|
|
114
108
|
def set_tab_prev(self):
|
115
109
|
"""Set TAB Advances"""
|
116
110
|
self.tab_prev = {
|
117
|
-
self.callsign: self.
|
118
|
-
self.
|
119
|
-
self.
|
120
|
-
|
121
|
-
|
122
|
-
self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild(
|
123
|
-
QtWidgets.QLineEdit
|
124
|
-
),
|
125
|
-
self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild(
|
126
|
-
QtWidgets.QLineEdit
|
127
|
-
),
|
111
|
+
self.callsign: self.other_2,
|
112
|
+
self.sent: self.callsign,
|
113
|
+
self.receive: self.sent,
|
114
|
+
self.other_1: self.receive,
|
115
|
+
self.other_2: self.other_1,
|
128
116
|
}
|
129
117
|
|
130
118
|
|
@@ -152,9 +140,8 @@ def prefill(self):
|
|
152
140
|
serial_nr = str(result.get("serial_nr", "1")).zfill(3)
|
153
141
|
if serial_nr == "None":
|
154
142
|
serial_nr = "001"
|
155
|
-
|
156
|
-
|
157
|
-
field.setText(serial_nr)
|
143
|
+
if len(self.other_1.text()) == 0:
|
144
|
+
self.other_1.setText(serial_nr)
|
158
145
|
|
159
146
|
|
160
147
|
def points(self):
|
not1mm/plugins/iaru_hf.py
CHANGED
@@ -69,8 +69,7 @@ def interface(self):
|
|
69
69
|
self.field4.show()
|
70
70
|
self.snt_label.setText("SNT")
|
71
71
|
self.field1.setAccessibleName("RST Sent")
|
72
|
-
|
73
|
-
label.setText("ITU Zone")
|
72
|
+
self.exch_label.setText("ITU Zone")
|
74
73
|
self.field4.setAccessibleName("I T U Zone")
|
75
74
|
|
76
75
|
|
@@ -81,32 +80,22 @@ def reset_label(self):
|
|
81
80
|
def set_tab_next(self):
|
82
81
|
"""Set TAB Advances"""
|
83
82
|
self.tab_next = {
|
84
|
-
self.callsign: self.
|
85
|
-
self.
|
86
|
-
|
87
|
-
|
88
|
-
self.
|
89
|
-
QtWidgets.QLineEdit
|
90
|
-
),
|
91
|
-
self.field3.findChild(QtWidgets.QLineEdit): self.callsign,
|
92
|
-
self.field4.findChild(QtWidgets.QLineEdit): self.callsign,
|
83
|
+
self.callsign: self.sent,
|
84
|
+
self.sent: self.receive,
|
85
|
+
self.receive: self.other_2,
|
86
|
+
self.other_1: self.callsign,
|
87
|
+
self.other_2: self.callsign,
|
93
88
|
}
|
94
89
|
|
95
90
|
|
96
91
|
def set_tab_prev(self):
|
97
92
|
"""Set TAB Advances"""
|
98
93
|
self.tab_prev = {
|
99
|
-
self.callsign: self.
|
100
|
-
self.
|
101
|
-
self.
|
102
|
-
|
103
|
-
|
104
|
-
self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild(
|
105
|
-
QtWidgets.QLineEdit
|
106
|
-
),
|
107
|
-
self.field4.findChild(QtWidgets.QLineEdit): self.field2.findChild(
|
108
|
-
QtWidgets.QLineEdit
|
109
|
-
),
|
94
|
+
self.callsign: self.other_2,
|
95
|
+
self.sent: self.callsign,
|
96
|
+
self.receive: self.sent,
|
97
|
+
self.other_1: self.receive,
|
98
|
+
self.other_2: self.receive,
|
110
99
|
}
|
111
100
|
|
112
101
|
|
not1mm/plugins/icwc_mst.py
CHANGED
@@ -55,7 +55,7 @@ columns = [
|
|
55
55
|
"PTS",
|
56
56
|
]
|
57
57
|
|
58
|
-
advance_on_space = [True, True, True, True,
|
58
|
+
advance_on_space = [True, True, True, True, False]
|
59
59
|
|
60
60
|
# 1 once per contest, 2 work each band, 3 each band/mode, 4 no dupe checking
|
61
61
|
dupe_type = 2
|
@@ -66,22 +66,22 @@ def init_contest(self):
|
|
66
66
|
set_tab_next(self)
|
67
67
|
set_tab_prev(self)
|
68
68
|
interface(self)
|
69
|
-
self.next_field = self.
|
69
|
+
self.next_field = self.other_2
|
70
70
|
|
71
71
|
|
72
72
|
def interface(self):
|
73
73
|
"""Setup user interface"""
|
74
|
-
self.field1.
|
74
|
+
self.field1.hide()
|
75
75
|
self.field2.hide()
|
76
76
|
self.field3.show()
|
77
77
|
self.field4.show()
|
78
|
-
self.snt_label.setText("Sent S/N")
|
79
|
-
self.field1.setAccessibleName("Sent Serial Number")
|
80
|
-
self.other_label.setText("
|
81
|
-
self.field3.setAccessibleName("
|
82
|
-
self.exch_label.setText("S/N")
|
83
|
-
self.field4.setAccessibleName("Serial Number")
|
84
|
-
self.sent.setText("")
|
78
|
+
# self.snt_label.setText("Sent S/N")
|
79
|
+
# self.field1.setAccessibleName("Sent Serial Number")
|
80
|
+
self.other_label.setText("Sent S/N")
|
81
|
+
self.field3.setAccessibleName("Sent Serial Number")
|
82
|
+
self.exch_label.setText("Name + S/N")
|
83
|
+
self.field4.setAccessibleName("Name and Serial Number")
|
84
|
+
# self.sent.setText("")
|
85
85
|
|
86
86
|
|
87
87
|
def reset_label(self): # pylint: disable=unused-argument
|
@@ -91,34 +91,18 @@ def reset_label(self): # pylint: disable=unused-argument
|
|
91
91
|
def set_tab_next(self):
|
92
92
|
"""Set TAB Advances"""
|
93
93
|
self.tab_next = {
|
94
|
-
self.callsign: self.
|
95
|
-
self.
|
96
|
-
|
97
|
-
),
|
98
|
-
# self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild(
|
99
|
-
# QtWidgets.QLineEdit
|
100
|
-
# ),
|
101
|
-
self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild(
|
102
|
-
QtWidgets.QLineEdit
|
103
|
-
),
|
104
|
-
self.field4.findChild(QtWidgets.QLineEdit): self.callsign,
|
94
|
+
self.callsign: self.other_1,
|
95
|
+
self.other_1: self.other_2,
|
96
|
+
self.other_2: self.callsign,
|
105
97
|
}
|
106
98
|
|
107
99
|
|
108
100
|
def set_tab_prev(self):
|
109
101
|
"""Set TAB Advances"""
|
110
102
|
self.tab_prev = {
|
111
|
-
self.callsign: self.
|
112
|
-
self.
|
113
|
-
|
114
|
-
# QtWidgets.QLineEdit
|
115
|
-
# ),
|
116
|
-
self.field3.findChild(QtWidgets.QLineEdit): self.field1.findChild(
|
117
|
-
QtWidgets.QLineEdit
|
118
|
-
),
|
119
|
-
self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild(
|
120
|
-
QtWidgets.QLineEdit
|
121
|
-
),
|
103
|
+
self.callsign: self.other_2,
|
104
|
+
self.other_1: self.callsign,
|
105
|
+
self.other_2: self.other_1,
|
122
106
|
}
|
123
107
|
|
124
108
|
|
@@ -126,9 +110,12 @@ def set_contact_vars(self):
|
|
126
110
|
"""Contest Specific"""
|
127
111
|
self.contact["SNT"] = "599"
|
128
112
|
self.contact["RCV"] = "599"
|
129
|
-
self.contact["SentNr"] = self.
|
130
|
-
|
131
|
-
|
113
|
+
self.contact["SentNr"] = self.other_1.text()
|
114
|
+
exch = self.other_2.text().upper()
|
115
|
+
if " " in exch:
|
116
|
+
self.contact["Name"], self.contact["NR"] = exch.split(" ")
|
117
|
+
else:
|
118
|
+
self.contact["Name"] = exch
|
132
119
|
|
133
120
|
|
134
121
|
def predupe(self): # pylint: disable=unused-argument
|
@@ -138,12 +125,11 @@ def predupe(self): # pylint: disable=unused-argument
|
|
138
125
|
def prefill(self):
|
139
126
|
"""Fill SentNR"""
|
140
127
|
result = self.database.get_serial()
|
141
|
-
serial_nr = str(result.get("serial_nr", "1"))
|
128
|
+
serial_nr = str(result.get("serial_nr", "1")).zfill(3)
|
142
129
|
if serial_nr == "None":
|
143
|
-
serial_nr = "
|
144
|
-
|
145
|
-
|
146
|
-
field.setText(serial_nr)
|
130
|
+
serial_nr = "001"
|
131
|
+
if len(self.other_1.text()) == 0:
|
132
|
+
self.other_1.setText(serial_nr)
|
147
133
|
|
148
134
|
|
149
135
|
def points(self):
|
@@ -397,3 +383,113 @@ def recalculate_mults(self):
|
|
397
383
|
# else:
|
398
384
|
# contact["IsMultiplier1"] = 0
|
399
385
|
# self.database.change_contact(contact)
|
386
|
+
|
387
|
+
|
388
|
+
def process_esm(self, new_focused_widget=None, with_enter=False):
|
389
|
+
"""ESM State Machine"""
|
390
|
+
|
391
|
+
# self.pref["run_state"]
|
392
|
+
|
393
|
+
# -----===== Assigned F-Keys =====-----
|
394
|
+
# self.esm_dict["CQ"]
|
395
|
+
# self.esm_dict["EXCH"]
|
396
|
+
# self.esm_dict["QRZ"]
|
397
|
+
# self.esm_dict["AGN"]
|
398
|
+
# self.esm_dict["HISCALL"]
|
399
|
+
# self.esm_dict["MYCALL"]
|
400
|
+
# self.esm_dict["QSOB4"]
|
401
|
+
|
402
|
+
# ----==== text fields ====----
|
403
|
+
# self.callsign
|
404
|
+
# self.sent
|
405
|
+
# self.receive
|
406
|
+
# self.other_1
|
407
|
+
# self.other_2
|
408
|
+
|
409
|
+
if new_focused_widget is not None:
|
410
|
+
self.current_widget = self.inputs_dict.get(new_focused_widget)
|
411
|
+
|
412
|
+
# print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
|
413
|
+
|
414
|
+
for a_button in [
|
415
|
+
self.esm_dict["CQ"],
|
416
|
+
self.esm_dict["EXCH"],
|
417
|
+
self.esm_dict["QRZ"],
|
418
|
+
self.esm_dict["AGN"],
|
419
|
+
self.esm_dict["HISCALL"],
|
420
|
+
self.esm_dict["MYCALL"],
|
421
|
+
self.esm_dict["QSOB4"],
|
422
|
+
]:
|
423
|
+
if a_button is not None:
|
424
|
+
self.restore_button_color(a_button)
|
425
|
+
|
426
|
+
buttons_to_send = []
|
427
|
+
|
428
|
+
if self.pref.get("run_state"):
|
429
|
+
if self.current_widget == "callsign":
|
430
|
+
if len(self.callsign.text()) < 3:
|
431
|
+
self.make_button_green(self.esm_dict["CQ"])
|
432
|
+
buttons_to_send.append(self.esm_dict["CQ"])
|
433
|
+
elif len(self.callsign.text()) > 2:
|
434
|
+
self.make_button_green(self.esm_dict["HISCALL"])
|
435
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
436
|
+
buttons_to_send.append(self.esm_dict["HISCALL"])
|
437
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
438
|
+
|
439
|
+
elif self.current_widget in ["other_2"]:
|
440
|
+
if self.other_2.text() == "":
|
441
|
+
self.make_button_green(self.esm_dict["AGN"])
|
442
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
443
|
+
else:
|
444
|
+
self.make_button_green(self.esm_dict["QRZ"])
|
445
|
+
buttons_to_send.append(self.esm_dict["QRZ"])
|
446
|
+
buttons_to_send.append("LOGIT")
|
447
|
+
|
448
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
449
|
+
for button in buttons_to_send:
|
450
|
+
if button:
|
451
|
+
if button == "LOGIT":
|
452
|
+
self.save_contact()
|
453
|
+
continue
|
454
|
+
self.process_function_key(button)
|
455
|
+
else:
|
456
|
+
if self.current_widget == "callsign":
|
457
|
+
if len(self.callsign.text()) > 2:
|
458
|
+
self.make_button_green(self.esm_dict["MYCALL"])
|
459
|
+
buttons_to_send.append(self.esm_dict["MYCALL"])
|
460
|
+
|
461
|
+
elif self.current_widget in ["other_2"]:
|
462
|
+
if self.other_2.text() == "":
|
463
|
+
self.make_button_green(self.esm_dict["AGN"])
|
464
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
465
|
+
else:
|
466
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
467
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
468
|
+
buttons_to_send.append("LOGIT")
|
469
|
+
|
470
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
471
|
+
for button in buttons_to_send:
|
472
|
+
if button:
|
473
|
+
if button == "LOGIT":
|
474
|
+
self.save_contact()
|
475
|
+
continue
|
476
|
+
self.process_function_key(button)
|
477
|
+
|
478
|
+
|
479
|
+
def populate_history_info_line(self):
|
480
|
+
result = self.database.fetch_call_history(self.callsign.text())
|
481
|
+
if result:
|
482
|
+
self.history_info.setText(
|
483
|
+
f"{result.get('Call', '')}, {result.get('Name', '')}, {result.get('UserText','...')}"
|
484
|
+
)
|
485
|
+
else:
|
486
|
+
self.history_info.setText("")
|
487
|
+
|
488
|
+
|
489
|
+
def check_call_history(self):
|
490
|
+
""""""
|
491
|
+
result = self.database.fetch_call_history(self.callsign.text())
|
492
|
+
if result:
|
493
|
+
self.history_info.setText(f"{result.get('UserText','')}")
|
494
|
+
if self.other_2.text() == "":
|
495
|
+
self.other_2.setText(f"{result.get('Name', '')}")
|
not1mm/plugins/jidx_cw.py
CHANGED
@@ -98,34 +98,22 @@ def reset_label(self): # pylint: disable=unused-argument
|
|
98
98
|
def set_tab_next(self):
|
99
99
|
"""Set TAB Advances"""
|
100
100
|
self.tab_next = {
|
101
|
-
self.callsign: self.
|
102
|
-
self.
|
103
|
-
|
104
|
-
|
105
|
-
self.
|
106
|
-
QtWidgets.QLineEdit
|
107
|
-
),
|
108
|
-
self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild(
|
109
|
-
QtWidgets.QLineEdit
|
110
|
-
),
|
111
|
-
self.field4.findChild(QtWidgets.QLineEdit): self.callsign,
|
101
|
+
self.callsign: self.sent,
|
102
|
+
self.sent: self.receive,
|
103
|
+
self.receive: self.other_1,
|
104
|
+
self.other_1: self.other_2,
|
105
|
+
self.other_2: self.callsign,
|
112
106
|
}
|
113
107
|
|
114
108
|
|
115
109
|
def set_tab_prev(self):
|
116
110
|
"""Set TAB Advances"""
|
117
111
|
self.tab_prev = {
|
118
|
-
self.callsign: self.
|
119
|
-
self.
|
120
|
-
self.
|
121
|
-
|
122
|
-
|
123
|
-
self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild(
|
124
|
-
QtWidgets.QLineEdit
|
125
|
-
),
|
126
|
-
self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild(
|
127
|
-
QtWidgets.QLineEdit
|
128
|
-
),
|
112
|
+
self.callsign: self.other_2,
|
113
|
+
self.sent: self.callsign,
|
114
|
+
self.receive: self.sent,
|
115
|
+
self.other_1: self.receive,
|
116
|
+
self.other_2: self.other_1,
|
129
117
|
}
|
130
118
|
|
131
119
|
|
@@ -157,7 +145,7 @@ def prefill(self):
|
|
157
145
|
serial_nr = "001"
|
158
146
|
SentExchange.replace("#", str(serial_nr))
|
159
147
|
|
160
|
-
field = self.
|
148
|
+
field = self.other_1
|
161
149
|
if len(field.text()) == 0:
|
162
150
|
field.setText(SentExchange)
|
163
151
|
|
@@ -409,3 +397,94 @@ def recalculate_mults(self):
|
|
409
397
|
else:
|
410
398
|
contact["IsMultiplier1"] = 0
|
411
399
|
self.database.change_contact(contact)
|
400
|
+
|
401
|
+
|
402
|
+
def process_esm(self, new_focused_widget=None, with_enter=False):
|
403
|
+
"""ESM State Machine"""
|
404
|
+
|
405
|
+
# self.pref["run_state"]
|
406
|
+
|
407
|
+
# -----===== Assigned F-Keys =====-----
|
408
|
+
# self.esm_dict["CQ"]
|
409
|
+
# self.esm_dict["EXCH"]
|
410
|
+
# self.esm_dict["QRZ"]
|
411
|
+
# self.esm_dict["AGN"]
|
412
|
+
# self.esm_dict["HISCALL"]
|
413
|
+
# self.esm_dict["MYCALL"]
|
414
|
+
# self.esm_dict["QSOB4"]
|
415
|
+
|
416
|
+
# ----==== text fields ====----
|
417
|
+
# self.callsign
|
418
|
+
# self.sent
|
419
|
+
# self.receive
|
420
|
+
# self.other_1
|
421
|
+
# self.other_2
|
422
|
+
|
423
|
+
if new_focused_widget is not None:
|
424
|
+
self.current_widget = self.inputs_dict.get(new_focused_widget)
|
425
|
+
|
426
|
+
# print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
|
427
|
+
|
428
|
+
for a_button in [
|
429
|
+
self.esm_dict["CQ"],
|
430
|
+
self.esm_dict["EXCH"],
|
431
|
+
self.esm_dict["QRZ"],
|
432
|
+
self.esm_dict["AGN"],
|
433
|
+
self.esm_dict["HISCALL"],
|
434
|
+
self.esm_dict["MYCALL"],
|
435
|
+
self.esm_dict["QSOB4"],
|
436
|
+
]:
|
437
|
+
if a_button is not None:
|
438
|
+
self.restore_button_color(a_button)
|
439
|
+
|
440
|
+
buttons_to_send = []
|
441
|
+
|
442
|
+
if self.pref.get("run_state"):
|
443
|
+
if self.current_widget == "callsign":
|
444
|
+
if len(self.callsign.text()) < 3:
|
445
|
+
self.make_button_green(self.esm_dict["CQ"])
|
446
|
+
buttons_to_send.append(self.esm_dict["CQ"])
|
447
|
+
elif len(self.callsign.text()) > 2:
|
448
|
+
self.make_button_green(self.esm_dict["HISCALL"])
|
449
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
450
|
+
buttons_to_send.append(self.esm_dict["HISCALL"])
|
451
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
452
|
+
|
453
|
+
elif self.current_widget in ["other_2"]:
|
454
|
+
if self.other_2.text() == "":
|
455
|
+
self.make_button_green(self.esm_dict["AGN"])
|
456
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
457
|
+
else:
|
458
|
+
self.make_button_green(self.esm_dict["QRZ"])
|
459
|
+
buttons_to_send.append(self.esm_dict["QRZ"])
|
460
|
+
buttons_to_send.append("LOGIT")
|
461
|
+
|
462
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
463
|
+
for button in buttons_to_send:
|
464
|
+
if button:
|
465
|
+
if button == "LOGIT":
|
466
|
+
self.save_contact()
|
467
|
+
continue
|
468
|
+
self.process_function_key(button)
|
469
|
+
else:
|
470
|
+
if self.current_widget == "callsign":
|
471
|
+
if len(self.callsign.text()) > 2:
|
472
|
+
self.make_button_green(self.esm_dict["MYCALL"])
|
473
|
+
buttons_to_send.append(self.esm_dict["MYCALL"])
|
474
|
+
|
475
|
+
elif self.current_widget in ["other_2"]:
|
476
|
+
if self.other_2.text() == "":
|
477
|
+
self.make_button_green(self.esm_dict["AGN"])
|
478
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
479
|
+
else:
|
480
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
481
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
482
|
+
buttons_to_send.append("LOGIT")
|
483
|
+
|
484
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
485
|
+
for button in buttons_to_send:
|
486
|
+
if button:
|
487
|
+
if button == "LOGIT":
|
488
|
+
self.save_contact()
|
489
|
+
continue
|
490
|
+
self.process_function_key(button)
|