From 566abbd561a0cb13cd835c2b05d6cc9753c09687 Mon Sep 17 00:00:00 2001 From: mbridak Date: Mon, 18 Nov 2024 11:28:13 -0800 Subject: [PATCH] @mbridak removed un-needed findchild calls. --- not1mm/plugins/10_10_fall_cw.py | 36 ++++++---------- not1mm/plugins/10_10_spring_cw.py | 36 ++++++---------- not1mm/plugins/10_10_summer_phone.py | 34 ++++++--------- not1mm/plugins/10_10_winter_phone.py | 36 ++++++---------- not1mm/plugins/arrl_10m.py | 45 +++++++------------ not1mm/plugins/arrl_dx_cw.py | 33 +++++--------- not1mm/plugins/arrl_dx_ssb.py | 33 +++++--------- not1mm/plugins/arrl_field_day.py | 36 ++++++---------- not1mm/plugins/arrl_rtty_ru.py | 32 +++++--------- not1mm/plugins/arrl_ss_cw.py | 43 ++++++------------ not1mm/plugins/arrl_ss_phone.py | 43 ++++++------------ not1mm/plugins/arrl_vhf_jan.py | 43 ++++++------------ not1mm/plugins/arrl_vhf_jun.py | 43 ++++++------------ not1mm/plugins/arrl_vhf_sep.py | 43 ++++++------------ not1mm/plugins/canada_day.py | 43 ++++++------------ not1mm/plugins/cq_160_cw.py | 34 +++++---------- not1mm/plugins/cq_160_ssb.py | 34 +++++---------- not1mm/plugins/cq_wpx_cw.py | 37 ++++++---------- not1mm/plugins/cq_wpx_rtty.py | 37 ++++++---------- not1mm/plugins/cq_wpx_ssb.py | 43 ++++++------------ not1mm/plugins/cq_ww_cw.py | 33 +++++--------- not1mm/plugins/cq_ww_rtty.py | 38 ++++++---------- not1mm/plugins/cq_ww_ssb.py | 33 +++++--------- not1mm/plugins/cwt.py | 38 ++++++---------- not1mm/plugins/darc_xmas.py | 46 +++++++------------- not1mm/plugins/general_logging.py | 38 ++++++---------- not1mm/plugins/helvetia.py | 41 +++++++----------- not1mm/plugins/iaru_fieldday_r1_cw.py | 37 ++++++---------- not1mm/plugins/iaru_fieldday_r1_ssb.py | 37 ++++++---------- not1mm/plugins/iaru_hf.py | 33 +++++--------- not1mm/plugins/icwc_mst.py | 30 ++++--------- not1mm/plugins/jidx_cw.py | 34 +++++---------- not1mm/plugins/jidx_ph.py | 44 +++++++------------ not1mm/plugins/k1usn_sst.py | 26 +++++------ not1mm/plugins/lz-dx.py | 45 ++++++++----------- not1mm/plugins/naqp_cw.py | 28 +++++------- not1mm/plugins/naqp_rtty.py | 28 +++++------- not1mm/plugins/naqp_ssb.py | 28 +++++------- not1mm/plugins/phone_weekly_test.py | 26 +++++------ not1mm/plugins/raem.py | 51 +++++++++++----------- not1mm/plugins/ref_cw.py | 45 ++++++++----------- not1mm/plugins/ref_ssb.py | 60 ++++++++++++++------------ not1mm/plugins/stew_perry_topband.py | 27 +++++------- not1mm/plugins/weekly_rtty.py | 33 +++++++------- not1mm/plugins/winter_field_day.py | 52 +++++++++++----------- 45 files changed, 610 insertions(+), 1085 deletions(-) diff --git a/not1mm/plugins/10_10_fall_cw.py b/not1mm/plugins/10_10_fall_cw.py index 218b993c..1f2d8069 100644 --- a/not1mm/plugins/10_10_fall_cw.py +++ b/not1mm/plugins/10_10_fall_cw.py @@ -50,8 +50,8 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("Name 1010# SPC") + # label = self.field4.findChild(QtWidgets.QLabel) + self.exch_label.setText("Name 1010# SPC") self.field4.setAccessibleName("Name 10 10 # SPC") @@ -62,32 +62,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_2, + self.other_1: self.callsign, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.receive, } @@ -120,8 +110,6 @@ def predupe(self): def prefill(self): """Fill sentnr""" - # if len(self.other_2.text()) == 0: - # self.other_2.setText(str(self.contact.get("ZN", ""))) self.other_1.setText(str(self.contest_settings.get("SentExchange", 0))) diff --git a/not1mm/plugins/10_10_spring_cw.py b/not1mm/plugins/10_10_spring_cw.py index 5be6d7d9..2421247a 100644 --- a/not1mm/plugins/10_10_spring_cw.py +++ b/not1mm/plugins/10_10_spring_cw.py @@ -49,8 +49,8 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("Name 1010# SPC") + # label = self.field4.findChild(QtWidgets.QLabel) + self.exch_label.setText("Name 1010# SPC") self.field4.setAccessibleName("Name 10 10 # SPC") @@ -61,32 +61,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_2, + self.other_1: self.callsign, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.receive, } @@ -119,8 +109,6 @@ def predupe(self): def prefill(self): """Fill sentnr""" - # if len(self.other_2.text()) == 0: - # self.other_2.setText(str(self.contact.get("ZN", ""))) self.other_1.setText(str(self.contest_settings.get("SentExchange", 0))) diff --git a/not1mm/plugins/10_10_summer_phone.py b/not1mm/plugins/10_10_summer_phone.py index c6256ebc..36805f2d 100644 --- a/not1mm/plugins/10_10_summer_phone.py +++ b/not1mm/plugins/10_10_summer_phone.py @@ -51,8 +51,8 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("Name 1010# SPC") + # label = self.field4.findChild(QtWidgets.QLabel) + self.exch_label.setText("Name 1010# SPC") self.field4.setAccessibleName("Name 10 10 # SPC") @@ -63,32 +63,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_2, + self.other_1: self.callsign, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.receive, } diff --git a/not1mm/plugins/10_10_winter_phone.py b/not1mm/plugins/10_10_winter_phone.py index 0a0d3ee2..8495f5bb 100644 --- a/not1mm/plugins/10_10_winter_phone.py +++ b/not1mm/plugins/10_10_winter_phone.py @@ -51,8 +51,8 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("Name 1010# SPC") + # label = self.field4.findChild(QtWidgets.QLabel) + self.exch_label.setText("Name 1010# SPC") self.field4.setAccessibleName("Name 10 10 # SPC") @@ -63,32 +63,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_2, + self.other_1: self.callsign, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.receive, } @@ -121,8 +111,6 @@ def predupe(self): def prefill(self): """Fill sentnr""" - # if len(self.other_2.text()) == 0: - # self.other_2.setText(str(self.contact.get("ZN", ""))) self.other_1.setText(str(self.contest_settings.get("SentExchange", 0))) diff --git a/not1mm/plugins/arrl_10m.py b/not1mm/plugins/arrl_10m.py index c62818c4..5d3a215f 100644 --- a/not1mm/plugins/arrl_10m.py +++ b/not1mm/plugins/arrl_10m.py @@ -96,11 +96,11 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - label = self.field3.findChild(QtWidgets.QLabel) - label.setText("SentNR") + # label = self.field3.findChild(QtWidgets.QLabel) + self.other_label.setText("SentNR") self.field3.setAccessibleName("Sent Number") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("State|Prov|SN|ITU") + # label = self.field4.findChild(QtWidgets.QLabel) + self.exch_label.setText("State|Prov|SN|ITU") self.field4.setAccessibleName("State Province Serial Number or I T U Section") @@ -111,34 +111,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.other_1, } @@ -172,9 +160,8 @@ def prefill(self): serial_nr = "001" exchange = self.contest_settings.get("SentExchange", "").replace("#", serial_nr) - field = self.field3.findChild(QtWidgets.QLineEdit) - if len(field.text()) == 0: - field.setText(exchange) + if len(self.other_1.text()) == 0: + self.other_1.setText(exchange) def points(self): diff --git a/not1mm/plugins/arrl_dx_cw.py b/not1mm/plugins/arrl_dx_cw.py index 0f7de387..79cae763 100644 --- a/not1mm/plugins/arrl_dx_cw.py +++ b/not1mm/plugins/arrl_dx_cw.py @@ -55,8 +55,7 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("Power/State/Province") + self.exch_label.setText("Power/State/Province") self.field4.setAccessibleName("Power or state or province") @@ -67,32 +66,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_2, + self.other_1: self.callsign, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.receive, } diff --git a/not1mm/plugins/arrl_dx_ssb.py b/not1mm/plugins/arrl_dx_ssb.py index 3f906e56..3ece426d 100644 --- a/not1mm/plugins/arrl_dx_ssb.py +++ b/not1mm/plugins/arrl_dx_ssb.py @@ -55,8 +55,7 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("Power/State/Province") + self.exch_label.setText("Power/State/Province") self.field4.setAccessibleName("Power or state or province") @@ -67,32 +66,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_2, + self.other_1: self.callsign, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.receive, } diff --git a/not1mm/plugins/arrl_field_day.py b/not1mm/plugins/arrl_field_day.py index 43c006df..497dc4e2 100644 --- a/not1mm/plugins/arrl_field_day.py +++ b/not1mm/plugins/arrl_field_day.py @@ -52,11 +52,11 @@ def interface(self): self.field2.hide() self.field3.show() self.field4.show() - label = self.field3.findChild(QtWidgets.QLabel) - label.setText("Class") + # label = self.field3.findChild(QtWidgets.QLabel) + self.other_label.setText("Class") self.field3.setAccessibleName("Class") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("Section") + # label = self.field4.findChild(QtWidgets.QLabel) + self.exch_label.setText("Section") self.field4.setAccessibleName("Section") @@ -67,30 +67,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field3.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.other_1, + self.sent: self.other_1, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.callsign, - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.callsign, + self.other_1: self.callsign, + self.other_2: self.other_1, } diff --git a/not1mm/plugins/arrl_rtty_ru.py b/not1mm/plugins/arrl_rtty_ru.py index d0b5f2a6..794ae3dd 100644 --- a/not1mm/plugins/arrl_rtty_ru.py +++ b/not1mm/plugins/arrl_rtty_ru.py @@ -58,34 +58,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.other_1, } diff --git a/not1mm/plugins/arrl_ss_cw.py b/not1mm/plugins/arrl_ss_cw.py index 08ea3f3a..0440c526 100644 --- a/not1mm/plugins/arrl_ss_cw.py +++ b/not1mm/plugins/arrl_ss_cw.py @@ -54,11 +54,9 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - label = self.field3.findChild(QtWidgets.QLabel) - label.setText("SentNR") + self.other_label.setText("SentNR") self.field3.setAccessibleName("Sent Number") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("sn prec ck sec") + self.exch_label.setText("sn prec ck sec") self.field4.setAccessibleName("Serial Number Precident check section") @@ -70,34 +68,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.other_1, } @@ -129,9 +115,8 @@ def prefill(self): serial_nr = str(result.get("serial_nr", "1")).zfill(3) if serial_nr == "None": serial_nr = "001" - field = self.field3.findChild(QtWidgets.QLineEdit) - if len(field.text()) == 0: - field.setText(serial_nr) + if len(self.other_1.text()) == 0: + self.other_1.setText(serial_nr) def populate_history_info_line(self): diff --git a/not1mm/plugins/arrl_ss_phone.py b/not1mm/plugins/arrl_ss_phone.py index c488bd8a..6f3e4428 100644 --- a/not1mm/plugins/arrl_ss_phone.py +++ b/not1mm/plugins/arrl_ss_phone.py @@ -54,11 +54,9 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - label = self.field3.findChild(QtWidgets.QLabel) - label.setText("SentNR") + self.other_label.setText("SentNR") self.field3.setAccessibleName("Sent Number") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("sn prec ck sec") + self.exch_label.setText("sn prec ck sec") self.field4.setAccessibleName("Serial Number Precident Check Section") @@ -70,34 +68,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.other_1, } @@ -129,9 +115,8 @@ def prefill(self): serial_nr = str(result.get("serial_nr", "1")).zfill(3) if serial_nr == "None": serial_nr = "001" - field = self.field3.findChild(QtWidgets.QLineEdit) - if len(field.text()) == 0: - field.setText(serial_nr) + if len(self.other_1.text()) == 0: + self.other_1.setText(serial_nr) def points(self): diff --git a/not1mm/plugins/arrl_vhf_jan.py b/not1mm/plugins/arrl_vhf_jan.py index d2704b47..0a02f127 100644 --- a/not1mm/plugins/arrl_vhf_jan.py +++ b/not1mm/plugins/arrl_vhf_jan.py @@ -88,11 +88,9 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - label = self.field3.findChild(QtWidgets.QLabel) - label.setText("SentNR") + self.other_label.setText("SentNR") self.field3.setAccessibleName("Sent Grid") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("Grid") + self.exch_label.setText("Grid") self.field4.setAccessibleName("Gridsquare") @@ -103,34 +101,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.other_1, } @@ -164,9 +150,8 @@ def prefill(self): serial_nr = "001" exchange = self.contest_settings.get("SentExchange", "").replace("#", serial_nr) - field = self.field3.findChild(QtWidgets.QLineEdit) - if len(field.text()) == 0: - field.setText(exchange) + if len(self.other_1.text()) == 0: + self.other_1.setText(exchange) def points(self): diff --git a/not1mm/plugins/arrl_vhf_jun.py b/not1mm/plugins/arrl_vhf_jun.py index 9a868598..8ca9e6fe 100644 --- a/not1mm/plugins/arrl_vhf_jun.py +++ b/not1mm/plugins/arrl_vhf_jun.py @@ -56,11 +56,9 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - label = self.field3.findChild(QtWidgets.QLabel) - label.setText("SentNR") + self.other_label.setText("SentNR") self.field3.setAccessibleName("Sent Grid") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("Grid") + self.exch_label.setText("Grid") self.field4.setAccessibleName("Gridsquare") @@ -71,34 +69,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.other_1, } @@ -132,9 +118,8 @@ def prefill(self): serial_nr = "001" exchange = self.contest_settings.get("SentExchange", "").replace("#", serial_nr) - field = self.field3.findChild(QtWidgets.QLineEdit) - if len(field.text()) == 0: - field.setText(exchange) + if len(self.other_1.text()) == 0: + self.other_1.setText(exchange) def points(self): diff --git a/not1mm/plugins/arrl_vhf_sep.py b/not1mm/plugins/arrl_vhf_sep.py index 19b4f517..42782799 100644 --- a/not1mm/plugins/arrl_vhf_sep.py +++ b/not1mm/plugins/arrl_vhf_sep.py @@ -56,11 +56,9 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - label = self.field3.findChild(QtWidgets.QLabel) - label.setText("SentNR") + self.other_label.setText("SentNR") self.field3.setAccessibleName("Sent Grid") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("Grid") + self.exch_label.setText("Grid") self.field4.setAccessibleName("Gridsquare") @@ -71,34 +69,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.other_1, } @@ -132,9 +118,8 @@ def prefill(self): serial_nr = "001" exchange = self.contest_settings.get("SentExchange", "").replace("#", serial_nr) - field = self.field3.findChild(QtWidgets.QLineEdit) - if len(field.text()) == 0: - field.setText(exchange) + if len(self.other_1.text()) == 0: + self.other_1.setText(exchange) def points(self): diff --git a/not1mm/plugins/canada_day.py b/not1mm/plugins/canada_day.py index cd34a5bd..cebbe7d9 100644 --- a/not1mm/plugins/canada_day.py +++ b/not1mm/plugins/canada_day.py @@ -87,11 +87,9 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - label = self.field3.findChild(QtWidgets.QLabel) - label.setText("SentNR") + self.other_label.setText("SentNR") self.field3.setAccessibleName("Sent Number") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("Prov/territory or SN") + self.exch_label.setText("Prov/territory or SN") self.field4.setAccessibleName("Province Territory or Serial Number") @@ -102,34 +100,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.other_1, } @@ -158,9 +144,8 @@ def prefill(self): serial_nr = "001" exchange = self.contest_settings.get("SentExchange", "").replace("#", serial_nr) - field = self.field3.findChild(QtWidgets.QLineEdit) - if len(field.text()) == 0: - field.setText(exchange) + if len(self.other_1.text()) == 0: + self.other_1.setText(exchange) def points(self): diff --git a/not1mm/plugins/cq_160_cw.py b/not1mm/plugins/cq_160_cw.py index 84f20657..5d37535b 100644 --- a/not1mm/plugins/cq_160_cw.py +++ b/not1mm/plugins/cq_160_cw.py @@ -55,8 +55,6 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - # self.other_label.setText("SentNR") - # self.field3.setAccessibleName("Sent Number") self.exch_label.setText("ST/Prov/CQ Zone") self.field4.setAccessibleName("Received Exchange") @@ -68,34 +66,22 @@ def reset_label(self): # pylint: disable=unused-argument def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_2, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.receive, } diff --git a/not1mm/plugins/cq_160_ssb.py b/not1mm/plugins/cq_160_ssb.py index 56af6837..c718042d 100644 --- a/not1mm/plugins/cq_160_ssb.py +++ b/not1mm/plugins/cq_160_ssb.py @@ -55,8 +55,6 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - # self.other_label.setText("SentNR") - # self.field3.setAccessibleName("Sent Number") self.exch_label.setText("ST/Prov/CQ Zone") self.field4.setAccessibleName("Received Exchange") @@ -68,34 +66,22 @@ def reset_label(self): # pylint: disable=unused-argument def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_2, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.receive, } diff --git a/not1mm/plugins/cq_wpx_cw.py b/not1mm/plugins/cq_wpx_cw.py index 14cd7ab7..bec1bf01 100644 --- a/not1mm/plugins/cq_wpx_cw.py +++ b/not1mm/plugins/cq_wpx_cw.py @@ -105,34 +105,22 @@ def reset_label(self): # pylint: disable=unused-argument def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.other_1, } @@ -160,9 +148,8 @@ def prefill(self): serial_nr = str(result.get("serial_nr", "1")).zfill(3) if serial_nr == "None": serial_nr = "001" - field = self.field3.findChild(QtWidgets.QLineEdit) - if len(field.text()) == 0: - field.setText(serial_nr) + if len(self.other_1.text()) == 0: + self.other_1.setText(serial_nr) def points(self): diff --git a/not1mm/plugins/cq_wpx_rtty.py b/not1mm/plugins/cq_wpx_rtty.py index 083f8a20..dcc680be 100644 --- a/not1mm/plugins/cq_wpx_rtty.py +++ b/not1mm/plugins/cq_wpx_rtty.py @@ -107,34 +107,22 @@ def reset_label(self): # pylint: disable=unused-argument def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.other_1, } @@ -162,9 +150,8 @@ def prefill(self): serial_nr = str(result.get("serial_nr", "1")).zfill(3) if serial_nr == "None": serial_nr = "001" - field = self.field3.findChild(QtWidgets.QLineEdit) - if len(field.text()) == 0: - field.setText(serial_nr) + if len(self.other_1.text()) == 0: + self.other_1.setText(serial_nr) def points(self): diff --git a/not1mm/plugins/cq_wpx_ssb.py b/not1mm/plugins/cq_wpx_ssb.py index 4bcd4d8c..19c28c6d 100644 --- a/not1mm/plugins/cq_wpx_ssb.py +++ b/not1mm/plugins/cq_wpx_ssb.py @@ -55,11 +55,9 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - label = self.field3.findChild(QtWidgets.QLabel) - label.setText("SentNR") + self.other_label.setText("SentNR") self.field3.setAccessibleName("Sent Number") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("RcvNR") + self.exch_label.setText("RcvNR") self.field4.setAccessibleName("Received Number") @@ -70,34 +68,22 @@ def reset_label(self): # pylint: disable=unused-argument def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.other_1, } @@ -125,9 +111,8 @@ def prefill(self): serial_nr = str(result.get("serial_nr", "1")).zfill(3) if serial_nr == "None": serial_nr = "001" - field = self.field3.findChild(QtWidgets.QLineEdit) - if len(field.text()) == 0: - field.setText(serial_nr) + if len(self.other_1.text()) == 0: + self.other_1.setText(serial_nr) def points(self): diff --git a/not1mm/plugins/cq_ww_cw.py b/not1mm/plugins/cq_ww_cw.py index 9d9598f3..66e7f035 100644 --- a/not1mm/plugins/cq_ww_cw.py +++ b/not1mm/plugins/cq_ww_cw.py @@ -88,8 +88,7 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("CQ Zone") + self.exch_label.setText("CQ Zone") self.field4.setAccessibleName("C Q Zone") @@ -100,32 +99,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_2, + self.other_1: self.callsign, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.receive, } diff --git a/not1mm/plugins/cq_ww_rtty.py b/not1mm/plugins/cq_ww_rtty.py index e5e9b9b1..2c8eee54 100644 --- a/not1mm/plugins/cq_ww_rtty.py +++ b/not1mm/plugins/cq_ww_rtty.py @@ -93,11 +93,9 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - label = self.field3.findChild(QtWidgets.QLabel) - label.setText("CQ Zone") + self.other_label.setText("CQ Zone") self.field3.setAccessibleName("C Q Zone") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("State/Prov") + self.exch_label.setText("State/Prov") self.field4.setAccessibleName("U S State or Providence") @@ -108,34 +106,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.other_1, } diff --git a/not1mm/plugins/cq_ww_ssb.py b/not1mm/plugins/cq_ww_ssb.py index b4818e43..896bab2c 100644 --- a/not1mm/plugins/cq_ww_ssb.py +++ b/not1mm/plugins/cq_ww_ssb.py @@ -87,8 +87,7 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("CQ Zone") + self.exch_label.setText("CQ Zone") self.field4.setAccessibleName("C Q Zone") @@ -99,32 +98,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_2, + self.other_1: self.callsign, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.receive, } diff --git a/not1mm/plugins/cwt.py b/not1mm/plugins/cwt.py index 1cf413bd..5d70848b 100644 --- a/not1mm/plugins/cwt.py +++ b/not1mm/plugins/cwt.py @@ -78,11 +78,9 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - label = self.field3.findChild(QtWidgets.QLabel) - label.setText("Name") + self.other_label.setText("Name") self.field3.setAccessibleName("Name") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("ST/DX/#") + self.exch_label.setText("ST/DX/#") self.field4.setAccessibleName("State D X or Number") @@ -93,34 +91,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.field2.findChild(QtWidgets.QLineEdit), + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.other_1, } diff --git a/not1mm/plugins/darc_xmas.py b/not1mm/plugins/darc_xmas.py index a1e4aec2..fbdb8a58 100644 --- a/not1mm/plugins/darc_xmas.py +++ b/not1mm/plugins/darc_xmas.py @@ -77,11 +77,9 @@ def interface(self): self.field3.show() self.field4.show() self.snt_label.setText("SNT") - label = self.field3.findChild(QtWidgets.QLabel) - label.setText("DOK/# Sent") + self.other_label.setText("DOK/# Sent") self.field3.setAccessibleName("RST Sent") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("DOK/# RCVD") + self.exch_label.setText("DOK/# RCVD") self.field4.setAccessibleName("DOK/NM or Number") @@ -92,34 +90,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.other_1, } @@ -163,18 +149,16 @@ def predupe(self): def prefill(self): """Fill SentNR""" - field = self.field3.findChild(QtWidgets.QLineEdit) sent_sxchange_setting = self.contest_settings.get("SentExchange", "") if sent_sxchange_setting.strip() == "#": result = self.database.get_serial() serial_nr = str(result.get("serial_nr", "1")).zfill(3) if serial_nr == "None": serial_nr = "001" - field = self.field3.findChild(QtWidgets.QLineEdit) - if len(field.text()) == 0: - field.setText(serial_nr) + if len(self.other_1.text()) == 0: + self.other_1.setText(serial_nr) else: - field.setText(sent_sxchange_setting) + self.other_1.setText(sent_sxchange_setting) if self.other_2.text() == "": call = self.callsign.text().upper() diff --git a/not1mm/plugins/general_logging.py b/not1mm/plugins/general_logging.py index 08099443..a8e21f60 100644 --- a/not1mm/plugins/general_logging.py +++ b/not1mm/plugins/general_logging.py @@ -46,11 +46,9 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - label = self.field3.findChild(QtWidgets.QLabel) - label.setText("Name") + self.other_label.setText("Name") self.field3.setAccessibleName("Name") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("Comment") + self.exch_label.setText("Comment") self.field4.setAccessibleName("Comment") @@ -61,34 +59,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.other_1, } diff --git a/not1mm/plugins/helvetia.py b/not1mm/plugins/helvetia.py index 95f9bd53..b7e0b050 100644 --- a/not1mm/plugins/helvetia.py +++ b/not1mm/plugins/helvetia.py @@ -116,11 +116,9 @@ def interface(self): self.field2.show() self.field3.show() self.field4.show() - label = self.field3.findChild(QtWidgets.QLabel) - label.setText("Sent") + self.other_label.setText("Sent") self.field3.setAccessibleName("Sent") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("Canton/SN") + self.exch_label.setText("Canton/SN") self.field4.setAccessibleName("Canton or SN") @@ -131,30 +129,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field3.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.other_1, + self.sent: self.other_1, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.callsign, - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.callsign, + self.other_1: self.callsign, + self.other_2: self.other_1, } @@ -205,17 +195,16 @@ def predupe(self): def prefill(self): """Fill SentNR""" - field = self.field3.findChild(QtWidgets.QLineEdit) sent_sxchange_setting = self.contest_settings.get("SentExchange", "") if sent_sxchange_setting.strip() == "#": result = self.database.get_serial() serial_nr = str(result.get("serial_nr", "1")).zfill(3) if serial_nr == "None": serial_nr = "001" - if len(field.text()) == 0: - field.setText(serial_nr) + if len(self.other_1.text()) == 0: + self.other_1.setText(serial_nr) else: - field.setText(sent_sxchange_setting) + self.other_1.setText(sent_sxchange_setting) def points(self): diff --git a/not1mm/plugins/iaru_fieldday_r1_cw.py b/not1mm/plugins/iaru_fieldday_r1_cw.py index ae749779..87285094 100644 --- a/not1mm/plugins/iaru_fieldday_r1_cw.py +++ b/not1mm/plugins/iaru_fieldday_r1_cw.py @@ -97,34 +97,22 @@ def reset_label(self): # pylint: disable=unused-argument def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.other_1, } @@ -152,9 +140,8 @@ def prefill(self): serial_nr = str(result.get("serial_nr", "1")).zfill(3) if serial_nr == "None": serial_nr = "001" - field = self.field3.findChild(QtWidgets.QLineEdit) - if len(field.text()) == 0: - field.setText(serial_nr) + if len(self.other_1.text()) == 0: + self.other_1.setText(serial_nr) def points(self): diff --git a/not1mm/plugins/iaru_fieldday_r1_ssb.py b/not1mm/plugins/iaru_fieldday_r1_ssb.py index 31a356a3..a7efb7e7 100644 --- a/not1mm/plugins/iaru_fieldday_r1_ssb.py +++ b/not1mm/plugins/iaru_fieldday_r1_ssb.py @@ -97,34 +97,22 @@ def reset_label(self): # pylint: disable=unused-argument def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.other_1, } @@ -152,9 +140,8 @@ def prefill(self): serial_nr = str(result.get("serial_nr", "1")).zfill(3) if serial_nr == "None": serial_nr = "001" - field = self.field3.findChild(QtWidgets.QLineEdit) - if len(field.text()) == 0: - field.setText(serial_nr) + if len(self.other_1.text()) == 0: + self.other_1.setText(serial_nr) def points(self): diff --git a/not1mm/plugins/iaru_hf.py b/not1mm/plugins/iaru_hf.py index 33546aaa..337b86e0 100644 --- a/not1mm/plugins/iaru_hf.py +++ b/not1mm/plugins/iaru_hf.py @@ -69,8 +69,7 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("ITU Zone") + self.exch_label.setText("ITU Zone") self.field4.setAccessibleName("I T U Zone") @@ -81,32 +80,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_2, + self.other_1: self.callsign, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.receive, } diff --git a/not1mm/plugins/icwc_mst.py b/not1mm/plugins/icwc_mst.py index 440321f9..954d9be3 100644 --- a/not1mm/plugins/icwc_mst.py +++ b/not1mm/plugins/icwc_mst.py @@ -91,34 +91,20 @@ def reset_label(self): # pylint: disable=unused-argument def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - # self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - # QtWidgets.QLineEdit - # ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - # self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - # QtWidgets.QLineEdit - # ), - self.field3.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.other_1: self.sent, + self.other_2: self.other_1, } diff --git a/not1mm/plugins/jidx_cw.py b/not1mm/plugins/jidx_cw.py index 5e58473f..48de8a95 100644 --- a/not1mm/plugins/jidx_cw.py +++ b/not1mm/plugins/jidx_cw.py @@ -98,34 +98,22 @@ def reset_label(self): # pylint: disable=unused-argument def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.other_1, } @@ -157,7 +145,7 @@ def prefill(self): serial_nr = "001" SentExchange.replace("#", str(serial_nr)) - field = self.field3.findChild(QtWidgets.QLineEdit) + field = self.other_1 if len(field.text()) == 0: field.setText(SentExchange) diff --git a/not1mm/plugins/jidx_ph.py b/not1mm/plugins/jidx_ph.py index ea380bd1..2a28ae75 100644 --- a/not1mm/plugins/jidx_ph.py +++ b/not1mm/plugins/jidx_ph.py @@ -54,12 +54,10 @@ def interface(self): self.field4.show() self.snt_label.setText("SNT") self.field1.setAccessibleName("RST Sent") - label = self.field3.findChild(QtWidgets.QLabel) - label.setText("SentNR") - self.field3.setAccessibleName("Sent Number") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("RcvNR") - self.field4.setAccessibleName("Received Number") + self.other_label.setText("SentNR") + self.other_1.setAccessibleName("Sent Number") + self.exch_label.setText("RcvNR") + self.other_2.setAccessibleName("Received Number") def reset_label(self): # pylint: disable=unused-argument @@ -69,34 +67,22 @@ def reset_label(self): # pylint: disable=unused-argument def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.receive, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.sent, + self.other_1: self.receive, + self.other_2: self.other_1, } @@ -128,7 +114,7 @@ def prefill(self): serial_nr = "001" SentExchange.replace("#", str(serial_nr)) - field = self.field3.findChild(QtWidgets.QLineEdit) + field = self.other_1 if len(field.text()) == 0: field.setText(SentExchange) diff --git a/not1mm/plugins/k1usn_sst.py b/not1mm/plugins/k1usn_sst.py index c5f32ae5..50e7060c 100644 --- a/not1mm/plugins/k1usn_sst.py +++ b/not1mm/plugins/k1usn_sst.py @@ -69,12 +69,10 @@ def interface(self): self.field2.hide() self.field3.show() self.field4.show() - namefield = self.field3.findChild(QtWidgets.QLabel) - namefield.setText("Name") - self.field3.setAccessibleName("Name") - spc = self.field4.findChild(QtWidgets.QLabel) - spc.setText("SPC") - self.field4.setAccessibleName("SPC") + self.other_label.setText("Name") + self.other_1.setAccessibleName("Name") + self.exch_label.setText("SPC") + self.other_2.setAccessibleName("SPC") def reset_label(self): @@ -84,22 +82,18 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field3.findChild(QtWidgets.QLineEdit), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.other_1: self.callsign, + self.other_2: self.other_1, } diff --git a/not1mm/plugins/lz-dx.py b/not1mm/plugins/lz-dx.py index 9bf536e7..de8cdc75 100644 --- a/not1mm/plugins/lz-dx.py +++ b/not1mm/plugins/lz-dx.py @@ -116,12 +116,10 @@ def interface(self): self.field2.show() self.field3.hide() self.field4.show() - label = self.field3.findChild(QtWidgets.QLabel) - label.setText("Sent") - self.field3.setAccessibleName("Sent") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("District/ITU") - self.field4.setAccessibleName("District or ITU") + self.other_label.setText("Sent") + self.other_1.setAccessibleName("Sent") + self.exch_label.setText("District/ITU") + self.other_2.setAccessibleName("District or ITU") def reset_label(self): @@ -131,30 +129,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.other_2, + self.receive: self.other_2, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.callsign, - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.callsign, + self.other_1: self.callsign, + self.other_2: self.other_1, } @@ -201,17 +191,16 @@ def set_contact_vars(self): def prefill(self): """Fill SentNR""" - field = self.field3.findChild(QtWidgets.QLineEdit) sent_sxchange_setting = self.contest_settings.get("SentExchange", "") if sent_sxchange_setting.strip() == "#": result = self.database.get_serial() serial_nr = str(result.get("serial_nr", "1")).zfill(3) if serial_nr == "None": serial_nr = "001" - if len(field.text()) == 0: - field.setText(serial_nr) + if len(self.other_1.text()) == 0: + self.other_1.setText(serial_nr) else: - field.setText(sent_sxchange_setting) + self.other_1.setText(sent_sxchange_setting) def show_mults(self): diff --git a/not1mm/plugins/naqp_cw.py b/not1mm/plugins/naqp_cw.py index daacba05..2461b77d 100644 --- a/not1mm/plugins/naqp_cw.py +++ b/not1mm/plugins/naqp_cw.py @@ -82,13 +82,11 @@ def interface(self): self.field3.show() self.field4.show() self.snt_label.setText("SNT") - self.field1.setAccessibleName("RST Sent") - namefield = self.field3.findChild(QtWidgets.QLabel) - namefield.setText("Name") - self.field3.setAccessibleName("Name") - spc = self.field4.findChild(QtWidgets.QLabel) - spc.setText("State") - self.field4.setAccessibleName("State") + self.sent.setAccessibleName("RST Sent") + self.other_label.setText("Name") + self.other_1.setAccessibleName("Name") + self.exch_label.setText("State") + self.other_2.setAccessibleName("State") def reset_label(self): @@ -98,22 +96,18 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field3.findChild(QtWidgets.QLineEdit), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.other_1: self.callsign, + self.other_2: self.other_1, } diff --git a/not1mm/plugins/naqp_rtty.py b/not1mm/plugins/naqp_rtty.py index 31f1aee3..81e701ee 100644 --- a/not1mm/plugins/naqp_rtty.py +++ b/not1mm/plugins/naqp_rtty.py @@ -85,13 +85,11 @@ def interface(self): self.field3.show() self.field4.show() self.snt_label.setText("SNT") - self.field1.setAccessibleName("RST Sent") - namefield = self.field3.findChild(QtWidgets.QLabel) - namefield.setText("Name") - self.field3.setAccessibleName("Name") - spc = self.field4.findChild(QtWidgets.QLabel) - spc.setText("State") - self.field4.setAccessibleName("State") + self.sent.setAccessibleName("RST Sent") + self.other_label.setText("Name") + self.other_1.setAccessibleName("Name") + self.exch_label.setText("State") + self.other_2.setAccessibleName("State") def reset_label(self): @@ -101,22 +99,18 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field3.findChild(QtWidgets.QLineEdit), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.other_1: self.callsign, + self.other_2: self.other_1, } diff --git a/not1mm/plugins/naqp_ssb.py b/not1mm/plugins/naqp_ssb.py index 45afad21..1eb5be6b 100644 --- a/not1mm/plugins/naqp_ssb.py +++ b/not1mm/plugins/naqp_ssb.py @@ -52,13 +52,11 @@ def interface(self): self.field3.show() self.field4.show() self.snt_label.setText("SNT") - self.field1.setAccessibleName("RST Sent") - namefield = self.field3.findChild(QtWidgets.QLabel) - namefield.setText("Name") - self.field3.setAccessibleName("Name") - spc = self.field4.findChild(QtWidgets.QLabel) - spc.setText("State") - self.field4.setAccessibleName("State") + self.sent.setAccessibleName("RST Sent") + self.other_label.setText("Name") + self.other_1.setAccessibleName("Name") + self.exch_label.setText("State") + self.other_2.setAccessibleName("State") def reset_label(self): @@ -68,22 +66,18 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field3.findChild(QtWidgets.QLineEdit), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.other_1: self.callsign, + self.other_2: self.other_1, } diff --git a/not1mm/plugins/phone_weekly_test.py b/not1mm/plugins/phone_weekly_test.py index d64b18e6..9663ec62 100644 --- a/not1mm/plugins/phone_weekly_test.py +++ b/not1mm/plugins/phone_weekly_test.py @@ -73,12 +73,10 @@ def interface(self): self.field2.hide() self.field3.show() self.field4.show() - namefield = self.field3.findChild(QtWidgets.QLabel) - namefield.setText("Name") - self.field3.setAccessibleName("Name") - spc = self.field4.findChild(QtWidgets.QLabel) - spc.setText("State") - self.field4.setAccessibleName("State") + self.other_label.setText("Name") + self.other_1.setAccessibleName("Name") + self.exch_label.setText("State") + self.other_2.setAccessibleName("State") def reset_label(self): @@ -88,22 +86,18 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field3.findChild(QtWidgets.QLineEdit), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.other_1: self.callsign, + self.other_2: self.other_1, } diff --git a/not1mm/plugins/raem.py b/not1mm/plugins/raem.py index de51f886..fba315be 100644 --- a/not1mm/plugins/raem.py +++ b/not1mm/plugins/raem.py @@ -28,6 +28,21 @@ # Find rules at: https://raem.srr.ru/rules/ # Cabrillo name: RAEM +# Label and field names +# callsign_label, callsign +# snt_label, sent +# rcv_label, receive +# other_label, other_1 +# exch_label, other_2 + +# command button names +# esc_stop +# log_it +# mark +# spot_it +# wipe + + import datetime import logging @@ -77,11 +92,11 @@ def interface(self): self.field3.show() self.field4.show() self.snt_label.setText("Sent S/N") - self.field1.setAccessibleName("Sent Serial Number") + self.sent.setAccessibleName("Sent Serial Number") self.other_label.setText("Rcv S/N") - self.field3.setAccessibleName("Serial Number") + self.other_1.setAccessibleName("Serial Number") self.exch_label.setText("Exchange") - self.field4.setAccessibleName("Exchange") + self.other_2.setAccessibleName("Exchange") self.sent.setText("") @@ -92,34 +107,20 @@ def reset_label(self): # pylint: disable=unused-argument def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field1.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - # self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - # QtWidgets.QLineEdit - # ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.sent, + self.sent: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - # self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild( - # QtWidgets.QLineEdit - # ), - self.field3.findChild(QtWidgets.QLineEdit): self.field1.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.other_1: self.sent, + self.other_2: self.other_1, } diff --git a/not1mm/plugins/ref_cw.py b/not1mm/plugins/ref_cw.py index f802139f..27d929ab 100644 --- a/not1mm/plugins/ref_cw.py +++ b/not1mm/plugins/ref_cw.py @@ -93,12 +93,10 @@ def interface(self): self.field2.show() self.field3.show() self.field4.show() - label = self.field3.findChild(QtWidgets.QLabel) - label.setText("Sent") - self.field3.setAccessibleName("Sent") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("Dep/Pfx/SN") - self.field4.setAccessibleName("Department, Prefix or SN") + self.other_label.setText("Sent") + self.other_1.setAccessibleName("Sent") + self.exch_label.setText("Dep/Pfx/SN") + self.other_2.setAccessibleName("Department, Prefix or SN") def reset_label(self): @@ -108,30 +106,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field3.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.other_1, + self.sent: self.other_1, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.callsign, - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.callsign, + self.other_1: self.callsign, + self.other_2: self.other_1, } @@ -188,17 +178,16 @@ def predupe(self): def prefill(self): """Fill SentNR""" - field = self.field3.findChild(QtWidgets.QLineEdit) sent_sxchange_setting = self.contest_settings.get("SentExchange", "") if sent_sxchange_setting.strip() == "#": result = self.database.get_serial() serial_nr = str(result.get("serial_nr", "1")).zfill(3) if serial_nr == "None": serial_nr = "001" - if len(field.text()) == 0: - field.setText(serial_nr) + if len(self.other_1.text()) == 0: + self.other_1.setText(serial_nr) else: - field.setText(sent_sxchange_setting) + self.other_1.setText(sent_sxchange_setting) def points(self): diff --git a/not1mm/plugins/ref_ssb.py b/not1mm/plugins/ref_ssb.py index acffd4e3..3032f48b 100644 --- a/not1mm/plugins/ref_ssb.py +++ b/not1mm/plugins/ref_ssb.py @@ -39,6 +39,21 @@ Cabrillo name aliases: REF """ +# Label and field names +# callsign_label, callsign +# snt_label, sent +# rcv_label, receive +# other_label, other_1 +# exch_label, other_2 + +# command button names +# esc_stop +# log_it +# mark +# spot_it +# wipe + + import datetime import logging import platform @@ -93,12 +108,10 @@ def interface(self): self.field2.show() self.field3.show() self.field4.show() - label = self.field3.findChild(QtWidgets.QLabel) - label.setText("Sent") - self.field3.setAccessibleName("Sent") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("Dep/Pfx/SN") - self.field4.setAccessibleName("Department, Prefix or SN") + self.other_label.setText("Sent") + self.other_1.setAccessibleName("Sent") + self.exch_label.setText("Dep/Pfx/SN") + self.other_2.setAccessibleName("Department, Prefix or SN") def reset_label(self): @@ -108,30 +121,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field3.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.other_1, + self.sent: self.other_1, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.callsign, - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.callsign, + self.other_1: self.callsign, + self.other_2: self.other_1, } @@ -188,17 +193,16 @@ def predupe(self): def prefill(self): """Fill SentNR""" - field = self.field3.findChild(QtWidgets.QLineEdit) sent_sxchange_setting = self.contest_settings.get("SentExchange", "") if sent_sxchange_setting.strip() == "#": result = self.database.get_serial() serial_nr = str(result.get("serial_nr", "1")).zfill(3) if serial_nr == "None": serial_nr = "001" - if len(field.text()) == 0: - field.setText(serial_nr) + if len(self.other_1.text()) == 0: + self.other_1.setText(serial_nr) else: - field.setText(sent_sxchange_setting) + self.other_1.setText(sent_sxchange_setting) def points(self): diff --git a/not1mm/plugins/stew_perry_topband.py b/not1mm/plugins/stew_perry_topband.py index e53992dc..3bc9afd2 100644 --- a/not1mm/plugins/stew_perry_topband.py +++ b/not1mm/plugins/stew_perry_topband.py @@ -75,10 +75,9 @@ def interface(self): self.field3.show() self.field4.hide() self.snt_label.setText("SNT") - self.field1.setAccessibleName("RST Sent") - label = self.field3.findChild(QtWidgets.QLabel) - label.setText("Grid") - self.field3.setAccessibleName("Grid") + self.sent.setAccessibleName("RST Sent") + self.other_label.setText("Grid") + self.other_1.setAccessibleName("Grid") def reset_label(self): @@ -88,24 +87,20 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field3.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.other_1, + self.sent: self.other_1, + self.receive: self.other_1, + self.other_1: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field3.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.callsign, - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.other_1, + self.sent: self.callsign, + self.receive: self.callsign, + self.other_1: self.callsign, } diff --git a/not1mm/plugins/weekly_rtty.py b/not1mm/plugins/weekly_rtty.py index b079eb53..35dff701 100644 --- a/not1mm/plugins/weekly_rtty.py +++ b/not1mm/plugins/weekly_rtty.py @@ -18,6 +18,13 @@ # Mail logs to: (none) # Find rules at: https://radiosport.world/wrt.html +# Label and field names +# callsign_label, callsign +# snt_label, sent +# rcv_label, receive +# other_label, other_1 +# exch_label, other_2 + import datetime import logging import platform @@ -69,12 +76,10 @@ def interface(self): self.field2.hide() self.field3.show() self.field4.show() - namefield = self.field3.findChild(QtWidgets.QLabel) - namefield.setText("Name") - self.field3.setAccessibleName("Name") - spc = self.field4.findChild(QtWidgets.QLabel) - spc.setText("SPC") - self.field4.setAccessibleName("SPC") + self.other_label.setText("Name") + self.other_1.setAccessibleName("Name") + self.exch_label.setText("SPC") + self.other_2.setAccessibleName("SPC") def reset_label(self): @@ -84,22 +89,18 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field3.findChild(QtWidgets.QLineEdit), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.other_1: self.callsign, + self.other_2: self.other_1, } diff --git a/not1mm/plugins/winter_field_day.py b/not1mm/plugins/winter_field_day.py index 0c8f89f4..bf90260f 100644 --- a/not1mm/plugins/winter_field_day.py +++ b/not1mm/plugins/winter_field_day.py @@ -2,6 +2,20 @@ # pylint: disable=invalid-name, unused-argument, unused-variable, c-extension-no-member +# Label and field names +# callsign_label, callsign +# snt_label, sent +# rcv_label, receive +# other_label, other_1 +# exch_label, other_2 + +# command button names +# esc_stop +# log_it +# mark +# spot_it +# wipe + import datetime import logging @@ -48,12 +62,10 @@ def interface(self): self.field2.hide() self.field3.show() self.field4.show() - label = self.field3.findChild(QtWidgets.QLabel) - label.setText("Class") - self.field3.setAccessibleName("Class") - label = self.field4.findChild(QtWidgets.QLabel) - label.setText("Section") - self.field4.setAccessibleName("Section") + self.other_label.setText("Class") + self.other_1.setAccessibleName("Class") + self.exch_label.setText("Section") + self.other_2.setAccessibleName("Section") def reset_label(self): @@ -63,30 +75,22 @@ def reset_label(self): def set_tab_next(self): """Set TAB Advances""" self.tab_next = { - self.callsign: self.field3.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), - self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild( - QtWidgets.QLineEdit - ), - self.field4.findChild(QtWidgets.QLineEdit): self.callsign, + self.callsign: self.other_1, + self.sent: self.other_1, + self.receive: self.other_1, + self.other_1: self.other_2, + self.other_2: self.callsign, } def set_tab_prev(self): """Set TAB Advances""" self.tab_prev = { - self.callsign: self.field4.findChild(QtWidgets.QLineEdit), - self.field1.findChild(QtWidgets.QLineEdit): self.callsign, - self.field2.findChild(QtWidgets.QLineEdit): self.callsign, - self.field3.findChild(QtWidgets.QLineEdit): self.callsign, - self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild( - QtWidgets.QLineEdit - ), + self.callsign: self.other_2, + self.sent: self.callsign, + self.receive: self.callsign, + self.other_1: self.callsign, + self.other_2: self.other_1, }