Skip to content

Commit 9da0ecd

Browse files
committed
@mbridak Add RTC to IARU HF, IARU Field Day, DARC XMAS, CQ WW, CQ WPX
1 parent 2ae88e4 commit 9da0ecd

File tree

15 files changed

+217
-55
lines changed

15 files changed

+217
-55
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Changelog
22

3+
- [24-12-11] Add RTC to IARU HF, IARU Field Day, DARC XMAS, CQ WW, CQ WPX
34
- [24-12-9] Add RTC to Winter Field Day, Stew Perry, REF, RAEM, NAQP, LZ-DX, JIDX
45
- [24-12-8-2] Add RTC to ARRL 10M, Tweaked cabrillo file output.
56
- [24-12-8-1] Changed cabrillo names for Weekly RTTY, CW Ops CWT and K1USN SST.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ generated, 'cause I'm lazy, list of those who've submitted PR's.
208208

209209
## Recent Changes (Polishing the Turd)
210210

211+
- [24-12-11] Add RTC to IARU HF, IARU Field Day, DARC XMAS, CQ WW, CQ WPX
211212
- [24-12-9] Add RTC to Winter Field Day, Stew Perry, REF, RAEM, NAQP, LZ-DX, JIDX
212213
- [24-12-8-2] Add RTC to ARRL 10M, Tweaked cabrillo file output.
213214
- [24-12-8-1] Changed cabrillo names for Weekly RTTY, CW Ops CWT and K1USN SST.

not1mm/lib/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""It's the version"""
22

3-
__version__ = "24.12.9"
3+
__version__ = "24.12.11"

not1mm/plugins/cq_wpx_cw.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
from PyQt6 import QtWidgets
4848

49-
from not1mm.lib.plugin_common import gen_adif, get_points
49+
from not1mm.lib.plugin_common import gen_adif, get_points, online_score_xml
5050
from not1mm.lib.version import __version__
5151

5252
logger = logging.getLogger(__name__)
@@ -547,3 +547,15 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
547547
self.save_contact()
548548
continue
549549
self.process_function_key(button)
550+
551+
552+
def get_mults(self):
553+
"""Get mults for RTC XML"""
554+
mults = {}
555+
mults["wpxprefix"] = show_mults(self)
556+
return mults
557+
558+
559+
def just_points(self):
560+
"""Get points for RTC XML"""
561+
return get_points(self)

not1mm/plugins/cq_wpx_rtty.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
from PyQt6 import QtWidgets
4747

4848
from not1mm.lib.ham_utility import get_logged_band
49-
from not1mm.lib.plugin_common import gen_adif, get_points
49+
from not1mm.lib.plugin_common import gen_adif, get_points, online_score_xml
5050
from not1mm.lib.version import __version__
5151

5252
logger = logging.getLogger(__name__)
@@ -628,3 +628,15 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
628628
continue
629629
sendstring = f"{sendstring}{self.process_macro(button.toolTip())} "
630630
self.fldigi_util.send_string(sendstring)
631+
632+
633+
def get_mults(self):
634+
"""Get mults for RTC XML"""
635+
mults = {}
636+
mults["wpxprefix"] = show_mults(self)
637+
return mults
638+
639+
640+
def just_points(self):
641+
"""Get points for RTC XML"""
642+
return get_points(self)

not1mm/plugins/cq_wpx_ssb.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from PyQt6 import QtWidgets
1111

12-
from not1mm.lib.plugin_common import gen_adif, get_points
12+
from not1mm.lib.plugin_common import gen_adif, get_points, online_score_xml
1313
from not1mm.lib.version import __version__
1414

1515
logger = logging.getLogger(__name__)
@@ -508,3 +508,15 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
508508
self.save_contact()
509509
continue
510510
self.process_function_key(button)
511+
512+
513+
def get_mults(self):
514+
"""Get mults for RTC XML"""
515+
mults = {}
516+
mults["wpxprefix"] = show_mults(self)
517+
return mults
518+
519+
520+
def just_points(self):
521+
"""Get points for RTC XML"""
522+
return get_points(self)

not1mm/plugins/cq_ww_cw.py

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -177,26 +177,19 @@ def points(self):
177177
return 0
178178

179179

180-
def get_mults(self):
181-
""""""
182-
mults = {}
183-
mults["zone"] = self.database.fetch_zn_band_count().get("zb_count", 0)
184-
mults["country"] = self.database.fetch_country_band_count().get("cb_count", 0)
185-
return mults
186-
187-
188-
def just_points(self):
189-
""""""
190-
return self.database.fetch_points().get("Points", "0")
191-
192-
193-
def show_mults(self):
180+
def show_mults(self, rtc=None):
194181
"""Return display string for mults"""
182+
_zone = 0
183+
_country = 0
195184
result1 = self.database.fetch_zn_band_count()
196185
result2 = self.database.fetch_country_band_count()
197-
if result1 and result2:
198-
return int(result1.get("zb_count", 0)) + int(result2.get("cb_count", 0))
199-
return 0
186+
if result1:
187+
_zone = int(result1.get("zb_count", 0))
188+
if result2:
189+
_country = int(result2.get("cb_count", 0))
190+
if rtc is not None:
191+
return (_country, _zone)
192+
return _country + _zone
200193

201194

202195
def show_qso(self):
@@ -551,3 +544,15 @@ def check_call_history(self):
551544
self.history_info.setText(f"{result.get('UserText','')}")
552545
if self.other_2.text() == "":
553546
self.other_2.setText(f"{result.get('CQZone', '')}")
547+
548+
549+
def get_mults(self):
550+
"""Get mults for RTC XML"""
551+
mults = {}
552+
mults["country"], mults["zone"] = show_mults(self, rtc=True)
553+
return mults
554+
555+
556+
def just_points(self):
557+
"""Get points for RTC XML"""
558+
return get_points(self)

not1mm/plugins/cq_ww_rtty.py

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
from PyQt6 import QtWidgets
4747

4848
from not1mm.lib.ham_utility import get_logged_band
49-
from not1mm.lib.plugin_common import gen_adif, get_points
49+
from not1mm.lib.plugin_common import gen_adif, get_points, online_score_xml
5050
from not1mm.lib.version import __version__
5151

5252
logger = logging.getLogger(__name__)
@@ -169,24 +169,30 @@ def points(self):
169169
return 0
170170

171171

172-
def show_mults(self):
172+
def show_mults(self, rtc=None):
173173
"""Return display string for mults"""
174174

175175
# Multipliers: W/VE Stations: Each US state/VE area once per band
176176
# Each DXCC/WAE country once per band
177177
# Each CQ zone once per band
178178

179+
_zone, _country, _spc_count = 0, 0, 0
179180
result1 = self.database.fetch_zn_band_count()
180181
result2 = self.database.fetch_country_band_count()
181182
res3_query = f"select count(DISTINCT(Exchange1 || ':' || Band)) as spc_count from dxlog where ContestNR = {self.database.current_contest};"
182183
result3 = self.database.exec_sql(res3_query)
183-
if result1 and result2 and result3:
184-
return (
185-
int(result1.get("zb_count", 0))
186-
+ int(result2.get("cb_count", 0))
187-
+ int(result3.get("spc_count", 0))
188-
)
189-
return 0
184+
185+
if result1:
186+
_zone = int(result1.get("zb_count", 0))
187+
if result2:
188+
_country = int(result2.get("cb_count", 0))
189+
if result3:
190+
_spc_count = int(result3.get("spc_count", 0))
191+
192+
if rtc is not None:
193+
return (_country + _spc_count, _zone)
194+
195+
return _country + _spc_count + _zone
190196

191197

192198
def show_qso(self):
@@ -647,3 +653,15 @@ def check_call_history(self):
647653
self.other_1.setText(f"{result.get('CQZone', '')}")
648654
if self.other_2.text() == "":
649655
self.other_2.setText(f"{result.get('State', '')}")
656+
657+
658+
def get_mults(self):
659+
"""Get mults for RTC XML"""
660+
mults = {}
661+
mults["country"], mults["zone"] = show_mults(self, rtc=True)
662+
return mults
663+
664+
665+
def just_points(self):
666+
"""Get points for RTC XML"""
667+
return get_points(self)

not1mm/plugins/cq_ww_ssb.py

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
from PyQt6 import QtWidgets
4545

46-
from not1mm.lib.plugin_common import gen_adif, get_points
46+
from not1mm.lib.plugin_common import gen_adif, get_points, online_score_xml
4747
from not1mm.lib.version import __version__
4848

4949
logger = logging.getLogger(__name__)
@@ -167,13 +167,19 @@ def points(self):
167167
return 0
168168

169169

170-
def show_mults(self):
170+
def show_mults(self, rtc=None):
171171
"""Return display string for mults"""
172+
_zone = 0
173+
_country = 0
172174
result1 = self.database.fetch_zn_band_count()
173175
result2 = self.database.fetch_country_band_count()
174-
if result1 and result2:
175-
return int(result1.get("zb_count", 0)) + int(result2.get("cb_count", 0))
176-
return 0
176+
if result1:
177+
_zone = int(result1.get("zb_count", 0))
178+
if result2:
179+
_country = int(result2.get("cb_count", 0))
180+
if rtc is not None:
181+
return (_country, _zone)
182+
return _country + _zone
177183

178184

179185
def show_qso(self):
@@ -525,3 +531,15 @@ def check_call_history(self):
525531
self.history_info.setText(f"{result.get('UserText','')}")
526532
if self.other_2.text() == "":
527533
self.other_2.setText(f"{result.get('CQZone', '')}")
534+
535+
536+
def get_mults(self):
537+
"""Get mults for RTC XML"""
538+
mults = {}
539+
mults["country"], mults["zone"] = show_mults(self, rtc=True)
540+
return mults
541+
542+
543+
def just_points(self):
544+
"""Get points for RTC XML"""
545+
return get_points(self)

not1mm/plugins/darc_xmas.py

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
from PyQt6 import QtWidgets
3434

35-
from not1mm.lib.plugin_common import gen_adif, get_points
35+
from not1mm.lib.plugin_common import gen_adif, get_points, online_score_xml
3636
from not1mm.lib.version import __version__
3737

3838
logger = logging.getLogger(__name__)
@@ -176,11 +176,14 @@ def points(self):
176176
return 1
177177

178178

179-
def show_mults(self):
179+
def show_mults(self, rtc=None):
180180
"""Return display string for mults"""
181-
return int(self.database.fetch_mult_count(1).get("count", 0)) + int(
182-
self.database.fetch_mult_count(2).get("count", 0)
183-
)
181+
_wpx = int(self.database.fetch_mult_count(1).get("count", 0))
182+
_dok = int(self.database.fetch_mult_count(2).get("count", 0))
183+
if rtc is not None:
184+
return (_dok, _wpx)
185+
186+
return _wpx + _dok
184187

185188

186189
def show_qso(self):
@@ -561,3 +564,15 @@ def check_call_history(self):
561564
self.history_info.setText(f"{result.get('UserText','')}")
562565
if self.other_1.text() == "":
563566
self.other_1.setText(f"{result.get('Exch1', '')}")
567+
568+
569+
def get_mults(self):
570+
"""Get mults for RTC XML"""
571+
mults = {}
572+
mults["state"], mults["wpxprefix"] = show_mults(self, rtc=True)
573+
return mults
574+
575+
576+
def just_points(self):
577+
"""Get points for RTC XML"""
578+
return get_points(self)

0 commit comments

Comments
 (0)