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.
Files changed (55) hide show
  1. not1mm/__main__.py +1 -1
  2. not1mm/data/new_contest.ui +5 -0
  3. not1mm/lib/plugin_common.py +20 -1
  4. not1mm/lib/version.py +1 -1
  5. not1mm/plugins/10_10_fall_cw.py +12 -24
  6. not1mm/plugins/10_10_spring_cw.py +12 -24
  7. not1mm/plugins/10_10_summer_phone.py +12 -22
  8. not1mm/plugins/10_10_winter_phone.py +12 -24
  9. not1mm/plugins/arrl_10m.py +16 -29
  10. not1mm/plugins/arrl_dx_cw.py +11 -22
  11. not1mm/plugins/arrl_dx_ssb.py +11 -22
  12. not1mm/plugins/arrl_field_day.py +14 -22
  13. not1mm/plugins/arrl_rtty_ru.py +10 -22
  14. not1mm/plugins/arrl_ss_cw.py +14 -29
  15. not1mm/plugins/arrl_ss_phone.py +14 -29
  16. not1mm/plugins/arrl_vhf_jan.py +14 -29
  17. not1mm/plugins/arrl_vhf_jun.py +14 -29
  18. not1mm/plugins/arrl_vhf_sep.py +14 -29
  19. not1mm/plugins/canada_day.py +14 -29
  20. not1mm/plugins/cq_160_cw.py +10 -24
  21. not1mm/plugins/cq_160_ssb.py +10 -24
  22. not1mm/plugins/cq_wpx_cw.py +12 -25
  23. not1mm/plugins/cq_wpx_rtty.py +12 -25
  24. not1mm/plugins/cq_wpx_ssb.py +14 -29
  25. not1mm/plugins/cq_ww_cw.py +11 -22
  26. not1mm/plugins/cq_ww_rtty.py +12 -26
  27. not1mm/plugins/cq_ww_ssb.py +11 -22
  28. not1mm/plugins/cwt.py +12 -26
  29. not1mm/plugins/darc_xmas.py +560 -0
  30. not1mm/plugins/general_logging.py +12 -26
  31. not1mm/plugins/helvetia.py +15 -26
  32. not1mm/plugins/iaru_fieldday_r1_cw.py +12 -25
  33. not1mm/plugins/iaru_fieldday_r1_ssb.py +12 -25
  34. not1mm/plugins/iaru_hf.py +11 -22
  35. not1mm/plugins/icwc_mst.py +136 -40
  36. not1mm/plugins/jidx_cw.py +102 -23
  37. not1mm/plugins/jidx_ph.py +106 -29
  38. not1mm/plugins/k1usn_sst.py +10 -16
  39. not1mm/plugins/lz-dx.py +17 -28
  40. not1mm/plugins/naqp_cw.py +11 -17
  41. not1mm/plugins/naqp_rtty.py +11 -17
  42. not1mm/plugins/naqp_ssb.py +11 -17
  43. not1mm/plugins/phone_weekly_test.py +101 -16
  44. not1mm/plugins/raem.py +26 -25
  45. not1mm/plugins/ref_cw.py +17 -28
  46. not1mm/plugins/ref_ssb.py +32 -28
  47. not1mm/plugins/stew_perry_topband.py +102 -16
  48. not1mm/plugins/weekly_rtty.py +17 -16
  49. not1mm/plugins/winter_field_day.py +28 -24
  50. {not1mm-24.11.17.dist-info → not1mm-24.11.19.dist-info}/METADATA +9 -5
  51. {not1mm-24.11.17.dist-info → not1mm-24.11.19.dist-info}/RECORD +55 -54
  52. {not1mm-24.11.17.dist-info → not1mm-24.11.19.dist-info}/LICENSE +0 -0
  53. {not1mm-24.11.17.dist-info → not1mm-24.11.19.dist-info}/WHEEL +0 -0
  54. {not1mm-24.11.17.dist-info → not1mm-24.11.19.dist-info}/entry_points.txt +0 -0
  55. {not1mm-24.11.17.dist-info → not1mm-24.11.19.dist-info}/top_level.txt +0 -0
not1mm/plugins/jidx_ph.py CHANGED
@@ -54,12 +54,10 @@ def interface(self):
54
54
  self.field4.show()
55
55
  self.snt_label.setText("SNT")
56
56
  self.field1.setAccessibleName("RST Sent")
57
- label = self.field3.findChild(QtWidgets.QLabel)
58
- label.setText("SentNR")
59
- self.field3.setAccessibleName("Sent Number")
60
- label = self.field4.findChild(QtWidgets.QLabel)
61
- label.setText("RcvNR")
62
- self.field4.setAccessibleName("Received Number")
57
+ self.other_label.setText("SentNR")
58
+ self.other_1.setAccessibleName("Sent Number")
59
+ self.exch_label.setText("RcvNR")
60
+ self.other_2.setAccessibleName("Received Number")
63
61
 
64
62
 
65
63
  def reset_label(self): # pylint: disable=unused-argument
@@ -69,34 +67,22 @@ def reset_label(self): # pylint: disable=unused-argument
69
67
  def set_tab_next(self):
70
68
  """Set TAB Advances"""
71
69
  self.tab_next = {
72
- self.callsign: self.field1.findChild(QtWidgets.QLineEdit),
73
- self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild(
74
- QtWidgets.QLineEdit
75
- ),
76
- self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild(
77
- QtWidgets.QLineEdit
78
- ),
79
- self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild(
80
- QtWidgets.QLineEdit
81
- ),
82
- self.field4.findChild(QtWidgets.QLineEdit): self.callsign,
70
+ self.callsign: self.sent,
71
+ self.sent: self.receive,
72
+ self.receive: self.other_1,
73
+ self.other_1: self.other_2,
74
+ self.other_2: self.callsign,
83
75
  }
84
76
 
85
77
 
86
78
  def set_tab_prev(self):
87
79
  """Set TAB Advances"""
88
80
  self.tab_prev = {
89
- self.callsign: self.field4.findChild(QtWidgets.QLineEdit),
90
- self.field1.findChild(QtWidgets.QLineEdit): self.callsign,
91
- self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild(
92
- QtWidgets.QLineEdit
93
- ),
94
- self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild(
95
- QtWidgets.QLineEdit
96
- ),
97
- self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild(
98
- QtWidgets.QLineEdit
99
- ),
81
+ self.callsign: self.other_2,
82
+ self.sent: self.callsign,
83
+ self.receive: self.sent,
84
+ self.other_1: self.receive,
85
+ self.other_2: self.other_1,
100
86
  }
101
87
 
102
88
 
@@ -128,7 +114,7 @@ def prefill(self):
128
114
  serial_nr = "001"
129
115
  SentExchange.replace("#", str(serial_nr))
130
116
 
131
- field = self.field3.findChild(QtWidgets.QLineEdit)
117
+ field = self.other_1
132
118
  if len(field.text()) == 0:
133
119
  field.setText(SentExchange)
134
120
 
@@ -380,3 +366,94 @@ def recalculate_mults(self):
380
366
  else:
381
367
  contact["IsMultiplier1"] = 0
382
368
  self.database.change_contact(contact)
369
+
370
+
371
+ def process_esm(self, new_focused_widget=None, with_enter=False):
372
+ """ESM State Machine"""
373
+
374
+ # self.pref["run_state"]
375
+
376
+ # -----===== Assigned F-Keys =====-----
377
+ # self.esm_dict["CQ"]
378
+ # self.esm_dict["EXCH"]
379
+ # self.esm_dict["QRZ"]
380
+ # self.esm_dict["AGN"]
381
+ # self.esm_dict["HISCALL"]
382
+ # self.esm_dict["MYCALL"]
383
+ # self.esm_dict["QSOB4"]
384
+
385
+ # ----==== text fields ====----
386
+ # self.callsign
387
+ # self.sent
388
+ # self.receive
389
+ # self.other_1
390
+ # self.other_2
391
+
392
+ if new_focused_widget is not None:
393
+ self.current_widget = self.inputs_dict.get(new_focused_widget)
394
+
395
+ # print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
396
+
397
+ for a_button in [
398
+ self.esm_dict["CQ"],
399
+ self.esm_dict["EXCH"],
400
+ self.esm_dict["QRZ"],
401
+ self.esm_dict["AGN"],
402
+ self.esm_dict["HISCALL"],
403
+ self.esm_dict["MYCALL"],
404
+ self.esm_dict["QSOB4"],
405
+ ]:
406
+ if a_button is not None:
407
+ self.restore_button_color(a_button)
408
+
409
+ buttons_to_send = []
410
+
411
+ if self.pref.get("run_state"):
412
+ if self.current_widget == "callsign":
413
+ if len(self.callsign.text()) < 3:
414
+ self.make_button_green(self.esm_dict["CQ"])
415
+ buttons_to_send.append(self.esm_dict["CQ"])
416
+ elif len(self.callsign.text()) > 2:
417
+ self.make_button_green(self.esm_dict["HISCALL"])
418
+ self.make_button_green(self.esm_dict["EXCH"])
419
+ buttons_to_send.append(self.esm_dict["HISCALL"])
420
+ buttons_to_send.append(self.esm_dict["EXCH"])
421
+
422
+ elif self.current_widget in ["other_2"]:
423
+ if self.other_2.text() == "":
424
+ self.make_button_green(self.esm_dict["AGN"])
425
+ buttons_to_send.append(self.esm_dict["AGN"])
426
+ else:
427
+ self.make_button_green(self.esm_dict["QRZ"])
428
+ buttons_to_send.append(self.esm_dict["QRZ"])
429
+ buttons_to_send.append("LOGIT")
430
+
431
+ if with_enter is True and bool(len(buttons_to_send)):
432
+ for button in buttons_to_send:
433
+ if button:
434
+ if button == "LOGIT":
435
+ self.save_contact()
436
+ continue
437
+ self.process_function_key(button)
438
+ else:
439
+ if self.current_widget == "callsign":
440
+ if len(self.callsign.text()) > 2:
441
+ self.make_button_green(self.esm_dict["MYCALL"])
442
+ buttons_to_send.append(self.esm_dict["MYCALL"])
443
+
444
+ elif self.current_widget in ["other_2"]:
445
+ if self.other_2.text() == "":
446
+ self.make_button_green(self.esm_dict["AGN"])
447
+ buttons_to_send.append(self.esm_dict["AGN"])
448
+ else:
449
+ self.make_button_green(self.esm_dict["EXCH"])
450
+ buttons_to_send.append(self.esm_dict["EXCH"])
451
+ buttons_to_send.append("LOGIT")
452
+
453
+ if with_enter is True and bool(len(buttons_to_send)):
454
+ for button in buttons_to_send:
455
+ if button:
456
+ if button == "LOGIT":
457
+ self.save_contact()
458
+ continue
459
+ self.process_function_key(button)
@@ -69,12 +69,10 @@ def interface(self):
69
69
  self.field2.hide()
70
70
  self.field3.show()
71
71
  self.field4.show()
72
- namefield = self.field3.findChild(QtWidgets.QLabel)
73
- namefield.setText("Name")
74
- self.field3.setAccessibleName("Name")
75
- spc = self.field4.findChild(QtWidgets.QLabel)
76
- spc.setText("SPC")
77
- self.field4.setAccessibleName("SPC")
72
+ self.other_label.setText("Name")
73
+ self.other_1.setAccessibleName("Name")
74
+ self.exch_label.setText("SPC")
75
+ self.other_2.setAccessibleName("SPC")
78
76
 
79
77
 
80
78
  def reset_label(self):
@@ -84,22 +82,18 @@ def reset_label(self):
84
82
  def set_tab_next(self):
85
83
  """Set TAB Advances"""
86
84
  self.tab_next = {
87
- self.callsign: self.field3.findChild(QtWidgets.QLineEdit),
88
- self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild(
89
- QtWidgets.QLineEdit
90
- ),
91
- self.field4.findChild(QtWidgets.QLineEdit): self.callsign,
85
+ self.callsign: self.other_1,
86
+ self.other_1: self.other_2,
87
+ self.other_2: self.callsign,
92
88
  }
93
89
 
94
90
 
95
91
  def set_tab_prev(self):
96
92
  """Set TAB Advances"""
97
93
  self.tab_prev = {
98
- self.callsign: self.field4.findChild(QtWidgets.QLineEdit),
99
- self.field3.findChild(QtWidgets.QLineEdit): self.callsign,
100
- self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild(
101
- QtWidgets.QLineEdit
102
- ),
94
+ self.callsign: self.other_2,
95
+ self.other_1: self.callsign,
96
+ self.other_2: self.other_1,
103
97
  }
104
98
 
105
99
 
not1mm/plugins/lz-dx.py CHANGED
@@ -116,12 +116,10 @@ def interface(self):
116
116
  self.field2.show()
117
117
  self.field3.hide()
118
118
  self.field4.show()
119
- label = self.field3.findChild(QtWidgets.QLabel)
120
- label.setText("Sent")
121
- self.field3.setAccessibleName("Sent")
122
- label = self.field4.findChild(QtWidgets.QLabel)
123
- label.setText("District/ITU")
124
- self.field4.setAccessibleName("District or ITU")
119
+ self.other_label.setText("Sent")
120
+ self.other_1.setAccessibleName("Sent")
121
+ self.exch_label.setText("District/ITU")
122
+ self.other_2.setAccessibleName("District or ITU")
125
123
 
126
124
 
127
125
  def reset_label(self):
@@ -131,30 +129,22 @@ def reset_label(self):
131
129
  def set_tab_next(self):
132
130
  """Set TAB Advances"""
133
131
  self.tab_next = {
134
- self.callsign: self.field1.findChild(QtWidgets.QLineEdit),
135
- self.field1.findChild(QtWidgets.QLineEdit): self.field4.findChild(
136
- QtWidgets.QLineEdit
137
- ),
138
- self.field2.findChild(QtWidgets.QLineEdit): self.field4.findChild(
139
- QtWidgets.QLineEdit
140
- ),
141
- self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild(
142
- QtWidgets.QLineEdit
143
- ),
144
- self.field4.findChild(QtWidgets.QLineEdit): self.callsign,
132
+ self.callsign: self.sent,
133
+ self.sent: self.other_2,
134
+ self.receive: self.other_2,
135
+ self.other_1: self.other_2,
136
+ self.other_2: self.callsign,
145
137
  }
146
138
 
147
139
 
148
140
  def set_tab_prev(self):
149
141
  """Set TAB Advances"""
150
142
  self.tab_prev = {
151
- self.callsign: self.field4.findChild(QtWidgets.QLineEdit),
152
- self.field1.findChild(QtWidgets.QLineEdit): self.callsign,
153
- self.field2.findChild(QtWidgets.QLineEdit): self.callsign,
154
- self.field3.findChild(QtWidgets.QLineEdit): self.callsign,
155
- self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild(
156
- QtWidgets.QLineEdit
157
- ),
143
+ self.callsign: self.other_2,
144
+ self.sent: self.callsign,
145
+ self.receive: self.callsign,
146
+ self.other_1: self.callsign,
147
+ self.other_2: self.other_1,
158
148
  }
159
149
 
160
150
 
@@ -201,17 +191,16 @@ def set_contact_vars(self):
201
191
 
202
192
  def prefill(self):
203
193
  """Fill SentNR"""
204
- field = self.field3.findChild(QtWidgets.QLineEdit)
205
194
  sent_sxchange_setting = self.contest_settings.get("SentExchange", "")
206
195
  if sent_sxchange_setting.strip() == "#":
207
196
  result = self.database.get_serial()
208
197
  serial_nr = str(result.get("serial_nr", "1")).zfill(3)
209
198
  if serial_nr == "None":
210
199
  serial_nr = "001"
211
- if len(field.text()) == 0:
212
- field.setText(serial_nr)
200
+ if len(self.other_1.text()) == 0:
201
+ self.other_1.setText(serial_nr)
213
202
  else:
214
- field.setText(sent_sxchange_setting)
203
+ self.other_1.setText(sent_sxchange_setting)
215
204
 
216
205
 
217
206
  def show_mults(self):
not1mm/plugins/naqp_cw.py CHANGED
@@ -82,13 +82,11 @@ def interface(self):
82
82
  self.field3.show()
83
83
  self.field4.show()
84
84
  self.snt_label.setText("SNT")
85
- self.field1.setAccessibleName("RST Sent")
86
- namefield = self.field3.findChild(QtWidgets.QLabel)
87
- namefield.setText("Name")
88
- self.field3.setAccessibleName("Name")
89
- spc = self.field4.findChild(QtWidgets.QLabel)
90
- spc.setText("State")
91
- self.field4.setAccessibleName("State")
85
+ self.sent.setAccessibleName("RST Sent")
86
+ self.other_label.setText("Name")
87
+ self.other_1.setAccessibleName("Name")
88
+ self.exch_label.setText("State")
89
+ self.other_2.setAccessibleName("State")
92
90
 
93
91
 
94
92
  def reset_label(self):
@@ -98,22 +96,18 @@ def reset_label(self):
98
96
  def set_tab_next(self):
99
97
  """Set TAB Advances"""
100
98
  self.tab_next = {
101
- self.callsign: self.field3.findChild(QtWidgets.QLineEdit),
102
- self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild(
103
- QtWidgets.QLineEdit
104
- ),
105
- self.field4.findChild(QtWidgets.QLineEdit): self.callsign,
99
+ self.callsign: self.other_1,
100
+ self.other_1: self.other_2,
101
+ self.other_2: self.callsign,
106
102
  }
107
103
 
108
104
 
109
105
  def set_tab_prev(self):
110
106
  """Set TAB Advances"""
111
107
  self.tab_prev = {
112
- self.callsign: self.field4.findChild(QtWidgets.QLineEdit),
113
- self.field3.findChild(QtWidgets.QLineEdit): self.callsign,
114
- self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild(
115
- QtWidgets.QLineEdit
116
- ),
108
+ self.callsign: self.other_2,
109
+ self.other_1: self.callsign,
110
+ self.other_2: self.other_1,
117
111
  }
118
112
 
119
113
 
@@ -85,13 +85,11 @@ def interface(self):
85
85
  self.field3.show()
86
86
  self.field4.show()
87
87
  self.snt_label.setText("SNT")
88
- self.field1.setAccessibleName("RST Sent")
89
- namefield = self.field3.findChild(QtWidgets.QLabel)
90
- namefield.setText("Name")
91
- self.field3.setAccessibleName("Name")
92
- spc = self.field4.findChild(QtWidgets.QLabel)
93
- spc.setText("State")
94
- self.field4.setAccessibleName("State")
88
+ self.sent.setAccessibleName("RST Sent")
89
+ self.other_label.setText("Name")
90
+ self.other_1.setAccessibleName("Name")
91
+ self.exch_label.setText("State")
92
+ self.other_2.setAccessibleName("State")
95
93
 
96
94
 
97
95
  def reset_label(self):
@@ -101,22 +99,18 @@ def reset_label(self):
101
99
  def set_tab_next(self):
102
100
  """Set TAB Advances"""
103
101
  self.tab_next = {
104
- self.callsign: self.field3.findChild(QtWidgets.QLineEdit),
105
- self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild(
106
- QtWidgets.QLineEdit
107
- ),
108
- self.field4.findChild(QtWidgets.QLineEdit): self.callsign,
102
+ self.callsign: self.other_1,
103
+ self.other_1: self.other_2,
104
+ self.other_2: self.callsign,
109
105
  }
110
106
 
111
107
 
112
108
  def set_tab_prev(self):
113
109
  """Set TAB Advances"""
114
110
  self.tab_prev = {
115
- self.callsign: self.field4.findChild(QtWidgets.QLineEdit),
116
- self.field3.findChild(QtWidgets.QLineEdit): self.callsign,
117
- self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild(
118
- QtWidgets.QLineEdit
119
- ),
111
+ self.callsign: self.other_2,
112
+ self.other_1: self.callsign,
113
+ self.other_2: self.other_1,
120
114
  }
121
115
 
122
116
 
@@ -52,13 +52,11 @@ def interface(self):
52
52
  self.field3.show()
53
53
  self.field4.show()
54
54
  self.snt_label.setText("SNT")
55
- self.field1.setAccessibleName("RST Sent")
56
- namefield = self.field3.findChild(QtWidgets.QLabel)
57
- namefield.setText("Name")
58
- self.field3.setAccessibleName("Name")
59
- spc = self.field4.findChild(QtWidgets.QLabel)
60
- spc.setText("State")
61
- self.field4.setAccessibleName("State")
55
+ self.sent.setAccessibleName("RST Sent")
56
+ self.other_label.setText("Name")
57
+ self.other_1.setAccessibleName("Name")
58
+ self.exch_label.setText("State")
59
+ self.other_2.setAccessibleName("State")
62
60
 
63
61
 
64
62
  def reset_label(self):
@@ -68,22 +66,18 @@ def reset_label(self):
68
66
  def set_tab_next(self):
69
67
  """Set TAB Advances"""
70
68
  self.tab_next = {
71
- self.callsign: self.field3.findChild(QtWidgets.QLineEdit),
72
- self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild(
73
- QtWidgets.QLineEdit
74
- ),
75
- self.field4.findChild(QtWidgets.QLineEdit): self.callsign,
69
+ self.callsign: self.other_1,
70
+ self.other_1: self.other_2,
71
+ self.other_2: self.callsign,
76
72
  }
77
73
 
78
74
 
79
75
  def set_tab_prev(self):
80
76
  """Set TAB Advances"""
81
77
  self.tab_prev = {
82
- self.callsign: self.field4.findChild(QtWidgets.QLineEdit),
83
- self.field3.findChild(QtWidgets.QLineEdit): self.callsign,
84
- self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild(
85
- QtWidgets.QLineEdit
86
- ),
78
+ self.callsign: self.other_2,
79
+ self.other_1: self.callsign,
80
+ self.other_2: self.other_1,
87
81
  }
88
82
 
89
83
 
@@ -73,12 +73,10 @@ def interface(self):
73
73
  self.field2.hide()
74
74
  self.field3.show()
75
75
  self.field4.show()
76
- namefield = self.field3.findChild(QtWidgets.QLabel)
77
- namefield.setText("Name")
78
- self.field3.setAccessibleName("Name")
79
- spc = self.field4.findChild(QtWidgets.QLabel)
80
- spc.setText("State")
81
- self.field4.setAccessibleName("State")
76
+ self.other_label.setText("Name")
77
+ self.other_1.setAccessibleName("Name")
78
+ self.exch_label.setText("State")
79
+ self.other_2.setAccessibleName("State")
82
80
 
83
81
 
84
82
  def reset_label(self):
@@ -88,22 +86,18 @@ def reset_label(self):
88
86
  def set_tab_next(self):
89
87
  """Set TAB Advances"""
90
88
  self.tab_next = {
91
- self.callsign: self.field3.findChild(QtWidgets.QLineEdit),
92
- self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild(
93
- QtWidgets.QLineEdit
94
- ),
95
- self.field4.findChild(QtWidgets.QLineEdit): self.callsign,
89
+ self.callsign: self.other_1,
90
+ self.other_1: self.other_2,
91
+ self.other_2: self.callsign,
96
92
  }
97
93
 
98
94
 
99
95
  def set_tab_prev(self):
100
96
  """Set TAB Advances"""
101
97
  self.tab_prev = {
102
- self.callsign: self.field4.findChild(QtWidgets.QLineEdit),
103
- self.field3.findChild(QtWidgets.QLineEdit): self.callsign,
104
- self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild(
105
- QtWidgets.QLineEdit
106
- ),
98
+ self.callsign: self.other_2,
99
+ self.other_1: self.callsign,
100
+ self.other_2: self.other_1,
107
101
  }
108
102
 
109
103
 
@@ -408,3 +402,94 @@ def recalculate_mults(self):
408
402
  cmd["cmd"] = "UPDATELOG"
409
403
  cmd["station"] = platform.node()
410
404
  self.multicast_interface.send_as_json(cmd)
405
+
406
+
407
+ def process_esm(self, new_focused_widget=None, with_enter=False):
408
+ """ESM State Machine"""
409
+
410
+ # self.pref["run_state"]
411
+
412
+ # -----===== Assigned F-Keys =====-----
413
+ # self.esm_dict["CQ"]
414
+ # self.esm_dict["EXCH"]
415
+ # self.esm_dict["QRZ"]
416
+ # self.esm_dict["AGN"]
417
+ # self.esm_dict["HISCALL"]
418
+ # self.esm_dict["MYCALL"]
419
+ # self.esm_dict["QSOB4"]
420
+
421
+ # ----==== text fields ====----
422
+ # self.callsign
423
+ # self.sent
424
+ # self.receive
425
+ # self.other_1
426
+ # self.other_2
427
+
428
+ if new_focused_widget is not None:
429
+ self.current_widget = self.inputs_dict.get(new_focused_widget)
430
+
431
+ # print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
432
+
433
+ for a_button in [
434
+ self.esm_dict["CQ"],
435
+ self.esm_dict["EXCH"],
436
+ self.esm_dict["QRZ"],
437
+ self.esm_dict["AGN"],
438
+ self.esm_dict["HISCALL"],
439
+ self.esm_dict["MYCALL"],
440
+ self.esm_dict["QSOB4"],
441
+ ]:
442
+ if a_button is not None:
443
+ self.restore_button_color(a_button)
444
+
445
+ buttons_to_send = []
446
+
447
+ if self.pref.get("run_state"):
448
+ if self.current_widget == "callsign":
449
+ if len(self.callsign.text()) < 3:
450
+ self.make_button_green(self.esm_dict["CQ"])
451
+ buttons_to_send.append(self.esm_dict["CQ"])
452
+ elif len(self.callsign.text()) > 2:
453
+ self.make_button_green(self.esm_dict["HISCALL"])
454
+ self.make_button_green(self.esm_dict["EXCH"])
455
+ buttons_to_send.append(self.esm_dict["HISCALL"])
456
+ buttons_to_send.append(self.esm_dict["EXCH"])
457
+
458
+ elif self.current_widget in ["other_1", "other_2"]:
459
+ if self.other_1.text() == "" or self.other_2.text() == "":
460
+ self.make_button_green(self.esm_dict["AGN"])
461
+ buttons_to_send.append(self.esm_dict["AGN"])
462
+ else:
463
+ self.make_button_green(self.esm_dict["QRZ"])
464
+ buttons_to_send.append(self.esm_dict["QRZ"])
465
+ buttons_to_send.append("LOGIT")
466
+
467
+ if with_enter is True and bool(len(buttons_to_send)):
468
+ for button in buttons_to_send:
469
+ if button:
470
+ if button == "LOGIT":
471
+ self.save_contact()
472
+ continue
473
+ self.process_function_key(button)
474
+ else:
475
+ if self.current_widget == "callsign":
476
+ if len(self.callsign.text()) > 2:
477
+ self.make_button_green(self.esm_dict["MYCALL"])
478
+ buttons_to_send.append(self.esm_dict["MYCALL"])
479
+
480
+ elif self.current_widget in ["other_1", "other_2"]:
481
+ if self.other_1.text() == "" or self.other_2.text() == "":
482
+ self.make_button_green(self.esm_dict["AGN"])
483
+ buttons_to_send.append(self.esm_dict["AGN"])
484
+ else:
485
+ self.make_button_green(self.esm_dict["EXCH"])
486
+ buttons_to_send.append(self.esm_dict["EXCH"])
487
+ buttons_to_send.append("LOGIT")
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/raem.py CHANGED
@@ -28,6 +28,21 @@
28
28
  # Find rules at: https://raem.srr.ru/rules/
29
29
  # Cabrillo name: RAEM
30
30
 
31
+ # Label and field names
32
+ # callsign_label, callsign
33
+ # snt_label, sent
34
+ # rcv_label, receive
35
+ # other_label, other_1
36
+ # exch_label, other_2
37
+
38
+ # command button names
39
+ # esc_stop
40
+ # log_it
41
+ # mark
42
+ # spot_it
43
+ # wipe
44
+
45
+
31
46
  import datetime
32
47
  import logging
33
48
 
@@ -77,11 +92,11 @@ def interface(self):
77
92
  self.field3.show()
78
93
  self.field4.show()
79
94
  self.snt_label.setText("Sent S/N")
80
- self.field1.setAccessibleName("Sent Serial Number")
95
+ self.sent.setAccessibleName("Sent Serial Number")
81
96
  self.other_label.setText("Rcv S/N")
82
- self.field3.setAccessibleName("Serial Number")
97
+ self.other_1.setAccessibleName("Serial Number")
83
98
  self.exch_label.setText("Exchange")
84
- self.field4.setAccessibleName("Exchange")
99
+ self.other_2.setAccessibleName("Exchange")
85
100
  self.sent.setText("")
86
101
 
87
102
 
@@ -92,34 +107,20 @@ def reset_label(self): # pylint: disable=unused-argument
92
107
  def set_tab_next(self):
93
108
  """Set TAB Advances"""
94
109
  self.tab_next = {
95
- self.callsign: self.field1.findChild(QtWidgets.QLineEdit),
96
- self.field1.findChild(QtWidgets.QLineEdit): self.field3.findChild(
97
- QtWidgets.QLineEdit
98
- ),
99
- # self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild(
100
- # QtWidgets.QLineEdit
101
- # ),
102
- self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild(
103
- QtWidgets.QLineEdit
104
- ),
105
- self.field4.findChild(QtWidgets.QLineEdit): self.callsign,
110
+ self.callsign: self.sent,
111
+ self.sent: self.other_1,
112
+ self.other_1: self.other_2,
113
+ self.other_2: self.callsign,
106
114
  }
107
115
 
108
116
 
109
117
  def set_tab_prev(self):
110
118
  """Set TAB Advances"""
111
119
  self.tab_prev = {
112
- self.callsign: self.field4.findChild(QtWidgets.QLineEdit),
113
- self.field1.findChild(QtWidgets.QLineEdit): self.callsign,
114
- # self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild(
115
- # QtWidgets.QLineEdit
116
- # ),
117
- self.field3.findChild(QtWidgets.QLineEdit): self.field1.findChild(
118
- QtWidgets.QLineEdit
119
- ),
120
- self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild(
121
- QtWidgets.QLineEdit
122
- ),
120
+ self.callsign: self.other_2,
121
+ self.sent: self.callsign,
122
+ self.other_1: self.sent,
123
+ self.other_2: self.other_1,
123
124
  }
124
125
 
125
126