Skip to content

Commit

Permalink
@mbridak removed un-needed findchild calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbridak committed Nov 18, 2024
1 parent c23e214 commit 566abbd
Show file tree
Hide file tree
Showing 45 changed files with 610 additions and 1,085 deletions.
36 changes: 12 additions & 24 deletions not1mm/plugins/10_10_fall_cw.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")


Expand All @@ -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,
}


Expand Down Expand Up @@ -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)))


Expand Down
36 changes: 12 additions & 24 deletions not1mm/plugins/10_10_spring_cw.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")


Expand All @@ -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,
}


Expand Down Expand Up @@ -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)))


Expand Down
34 changes: 12 additions & 22 deletions not1mm/plugins/10_10_summer_phone.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")


Expand All @@ -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,
}


Expand Down
36 changes: 12 additions & 24 deletions not1mm/plugins/10_10_winter_phone.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")


Expand All @@ -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,
}


Expand Down Expand Up @@ -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)))


Expand Down
45 changes: 16 additions & 29 deletions not1mm/plugins/arrl_10m.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")


Expand All @@ -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,
}


Expand Down Expand Up @@ -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):
Expand Down
33 changes: 11 additions & 22 deletions not1mm/plugins/arrl_dx_cw.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")


Expand All @@ -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,
}


Expand Down
Loading

0 comments on commit 566abbd

Please sign in to comment.