not1mm 24.11.18__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 (54) hide show
  1. not1mm/__main__.py +1 -1
  2. not1mm/lib/plugin_common.py +20 -1
  3. not1mm/lib/version.py +1 -1
  4. not1mm/plugins/10_10_fall_cw.py +12 -24
  5. not1mm/plugins/10_10_spring_cw.py +12 -24
  6. not1mm/plugins/10_10_summer_phone.py +12 -22
  7. not1mm/plugins/10_10_winter_phone.py +12 -24
  8. not1mm/plugins/arrl_10m.py +16 -29
  9. not1mm/plugins/arrl_dx_cw.py +11 -22
  10. not1mm/plugins/arrl_dx_ssb.py +11 -22
  11. not1mm/plugins/arrl_field_day.py +14 -22
  12. not1mm/plugins/arrl_rtty_ru.py +10 -22
  13. not1mm/plugins/arrl_ss_cw.py +14 -29
  14. not1mm/plugins/arrl_ss_phone.py +14 -29
  15. not1mm/plugins/arrl_vhf_jan.py +14 -29
  16. not1mm/plugins/arrl_vhf_jun.py +14 -29
  17. not1mm/plugins/arrl_vhf_sep.py +14 -29
  18. not1mm/plugins/canada_day.py +14 -29
  19. not1mm/plugins/cq_160_cw.py +10 -24
  20. not1mm/plugins/cq_160_ssb.py +10 -24
  21. not1mm/plugins/cq_wpx_cw.py +12 -25
  22. not1mm/plugins/cq_wpx_rtty.py +12 -25
  23. not1mm/plugins/cq_wpx_ssb.py +14 -29
  24. not1mm/plugins/cq_ww_cw.py +11 -22
  25. not1mm/plugins/cq_ww_rtty.py +12 -26
  26. not1mm/plugins/cq_ww_ssb.py +11 -22
  27. not1mm/plugins/cwt.py +12 -26
  28. not1mm/plugins/darc_xmas.py +15 -31
  29. not1mm/plugins/general_logging.py +12 -26
  30. not1mm/plugins/helvetia.py +15 -26
  31. not1mm/plugins/iaru_fieldday_r1_cw.py +12 -25
  32. not1mm/plugins/iaru_fieldday_r1_ssb.py +12 -25
  33. not1mm/plugins/iaru_hf.py +11 -22
  34. not1mm/plugins/icwc_mst.py +136 -40
  35. not1mm/plugins/jidx_cw.py +102 -23
  36. not1mm/plugins/jidx_ph.py +106 -29
  37. not1mm/plugins/k1usn_sst.py +10 -16
  38. not1mm/plugins/lz-dx.py +17 -28
  39. not1mm/plugins/naqp_cw.py +11 -17
  40. not1mm/plugins/naqp_rtty.py +11 -17
  41. not1mm/plugins/naqp_ssb.py +11 -17
  42. not1mm/plugins/phone_weekly_test.py +101 -16
  43. not1mm/plugins/raem.py +26 -25
  44. not1mm/plugins/ref_cw.py +17 -28
  45. not1mm/plugins/ref_ssb.py +32 -28
  46. not1mm/plugins/stew_perry_topband.py +102 -16
  47. not1mm/plugins/weekly_rtty.py +17 -16
  48. not1mm/plugins/winter_field_day.py +28 -24
  49. {not1mm-24.11.18.dist-info → not1mm-24.11.19.dist-info}/METADATA +6 -5
  50. {not1mm-24.11.18.dist-info → not1mm-24.11.19.dist-info}/RECORD +54 -54
  51. {not1mm-24.11.18.dist-info → not1mm-24.11.19.dist-info}/LICENSE +0 -0
  52. {not1mm-24.11.18.dist-info → not1mm-24.11.19.dist-info}/WHEEL +0 -0
  53. {not1mm-24.11.18.dist-info → not1mm-24.11.19.dist-info}/entry_points.txt +0 -0
  54. {not1mm-24.11.18.dist-info → not1mm-24.11.19.dist-info}/top_level.txt +0 -0
@@ -55,7 +55,7 @@ columns = [
55
55
  "PTS",
56
56
  ]
57
57
 
58
- advance_on_space = [True, 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.other_1
69
+ self.next_field = self.other_2
70
70
 
71
71
 
72
72
  def interface(self):
73
73
  """Setup user interface"""
74
- self.field1.show()
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("Name")
81
- self.field3.setAccessibleName("Name")
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.field1.findChild(QtWidgets.QLineEdit),
95
- self.field1.findChild(QtWidgets.QLineEdit): self.field3.findChild(
96
- QtWidgets.QLineEdit
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.field4.findChild(QtWidgets.QLineEdit),
112
- self.field1.findChild(QtWidgets.QLineEdit): self.callsign,
113
- # self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild(
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.sent.text()
130
- self.contact["Name"] = self.other_1.text()
131
- self.contact["NR"] = self.other_2.text()
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 = "1"
144
- field = self.sent
145
- if len(field.text()) == 0:
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.field1.findChild(QtWidgets.QLineEdit),
102
- self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild(
103
- QtWidgets.QLineEdit
104
- ),
105
- self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild(
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.field4.findChild(QtWidgets.QLineEdit),
119
- self.field1.findChild(QtWidgets.QLineEdit): self.callsign,
120
- self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild(
121
- QtWidgets.QLineEdit
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.field3.findChild(QtWidgets.QLineEdit)
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)
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):