not1mm 24.11.17__py3-none-any.whl → 24.11.18__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- not1mm/data/new_contest.ui +5 -0
- not1mm/lib/version.py +1 -1
- not1mm/plugins/darc_xmas.py +576 -0
- {not1mm-24.11.17.dist-info → not1mm-24.11.18.dist-info}/METADATA +4 -1
- {not1mm-24.11.17.dist-info → not1mm-24.11.18.dist-info}/RECORD +9 -8
- {not1mm-24.11.17.dist-info → not1mm-24.11.18.dist-info}/LICENSE +0 -0
- {not1mm-24.11.17.dist-info → not1mm-24.11.18.dist-info}/WHEEL +0 -0
- {not1mm-24.11.17.dist-info → not1mm-24.11.18.dist-info}/entry_points.txt +0 -0
- {not1mm-24.11.17.dist-info → not1mm-24.11.18.dist-info}/top_level.txt +0 -0
not1mm/data/new_contest.ui
CHANGED
not1mm/lib/version.py
CHANGED
@@ -0,0 +1,576 @@
|
|
1
|
+
"""DARC XMAS plugin"""
|
2
|
+
|
3
|
+
# pylint: disable=invalid-name, unused-argument, unused-variable, c-extension-no-member, unused-import
|
4
|
+
|
5
|
+
# DARC Christmas Contest
|
6
|
+
# Status: Active
|
7
|
+
# Geographic Focus: Germany
|
8
|
+
# Participation: Worldwide
|
9
|
+
# Awards: Worldwide
|
10
|
+
# Mode: CW, SSB
|
11
|
+
# Bands: 80, 40m
|
12
|
+
# Classes: Single Op (Low/High)
|
13
|
+
# Max power: HP: >100 watts
|
14
|
+
# LP: 100 watts
|
15
|
+
# Exchange: RST + DOK
|
16
|
+
# non-Member (DL): RST + 'NM' or 'no member'
|
17
|
+
# outside DL: RST + serial number
|
18
|
+
# Work stations: Once per band and mode
|
19
|
+
# QSO Points: 1 point per QSO
|
20
|
+
# Multipliers: DOK (DARC/VFDB), 'NM' does not count + each WPX-prefix per band
|
21
|
+
# Score Calculation: Total score = total QSO points x total mults
|
22
|
+
# Mail logs to: (none)
|
23
|
+
# Find rules at: https://www.darc.de/der-club/referate/conteste/weihnachtswettbewerb/regeln/
|
24
|
+
# Upload logs at: https://dxhf2.darc.de/~xmaslog/upload.cgi?form=referat&lang=de
|
25
|
+
# Cabrillo name: XMAS
|
26
|
+
|
27
|
+
|
28
|
+
import datetime
|
29
|
+
import logging
|
30
|
+
|
31
|
+
from pathlib import Path
|
32
|
+
|
33
|
+
from PyQt6 import QtWidgets
|
34
|
+
|
35
|
+
from not1mm.lib.plugin_common import gen_adif, get_points
|
36
|
+
from not1mm.lib.version import __version__
|
37
|
+
|
38
|
+
logger = logging.getLogger(__name__)
|
39
|
+
|
40
|
+
EXCHANGE_HINT = "DOK/NM or #"
|
41
|
+
|
42
|
+
name = "DARC XMAS"
|
43
|
+
mode = "BOTH" # CW SSB BOTH RTTY
|
44
|
+
# columns = [0, 1, 2, 3, 4, 5, 6, 11, 15]
|
45
|
+
columns = [
|
46
|
+
"YYYY-MM-DD HH:MM:SS",
|
47
|
+
"Call",
|
48
|
+
"Freq",
|
49
|
+
"Snt",
|
50
|
+
"Rcv",
|
51
|
+
"SentNr",
|
52
|
+
"RcvNr",
|
53
|
+
"M1",
|
54
|
+
"M2",
|
55
|
+
"PTS",
|
56
|
+
]
|
57
|
+
cabrillo_name = "XMAS"
|
58
|
+
|
59
|
+
advance_on_space = [True, True, True, True, True]
|
60
|
+
|
61
|
+
# 1 once per contest, 2 work each band, 3 each band/mode, 4 no dupe checking
|
62
|
+
dupe_type = 3
|
63
|
+
|
64
|
+
|
65
|
+
def init_contest(self):
|
66
|
+
"""setup plugin"""
|
67
|
+
set_tab_next(self)
|
68
|
+
set_tab_prev(self)
|
69
|
+
interface(self)
|
70
|
+
self.next_field = self.other_2
|
71
|
+
|
72
|
+
|
73
|
+
def interface(self):
|
74
|
+
"""Setup user interface"""
|
75
|
+
self.field1.show()
|
76
|
+
self.field2.show()
|
77
|
+
self.field3.show()
|
78
|
+
self.field4.show()
|
79
|
+
self.snt_label.setText("SNT")
|
80
|
+
label = self.field3.findChild(QtWidgets.QLabel)
|
81
|
+
label.setText("DOK/# Sent")
|
82
|
+
self.field3.setAccessibleName("RST Sent")
|
83
|
+
label = self.field4.findChild(QtWidgets.QLabel)
|
84
|
+
label.setText("DOK/# RCVD")
|
85
|
+
self.field4.setAccessibleName("DOK/NM or Number")
|
86
|
+
|
87
|
+
|
88
|
+
def reset_label(self):
|
89
|
+
"""reset label after field cleared"""
|
90
|
+
|
91
|
+
|
92
|
+
def set_tab_next(self):
|
93
|
+
"""Set TAB Advances"""
|
94
|
+
self.tab_next = {
|
95
|
+
self.callsign: self.field1.findChild(QtWidgets.QLineEdit),
|
96
|
+
self.field1.findChild(QtWidgets.QLineEdit): self.field2.findChild(
|
97
|
+
QtWidgets.QLineEdit
|
98
|
+
),
|
99
|
+
self.field2.findChild(QtWidgets.QLineEdit): self.field3.findChild(
|
100
|
+
QtWidgets.QLineEdit
|
101
|
+
),
|
102
|
+
self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild(
|
103
|
+
QtWidgets.QLineEdit
|
104
|
+
),
|
105
|
+
self.field4.findChild(QtWidgets.QLineEdit): self.callsign,
|
106
|
+
}
|
107
|
+
|
108
|
+
|
109
|
+
def set_tab_prev(self):
|
110
|
+
"""Set TAB Advances"""
|
111
|
+
self.tab_prev = {
|
112
|
+
self.callsign: self.field4.findChild(QtWidgets.QLineEdit),
|
113
|
+
self.field1.findChild(QtWidgets.QLineEdit): self.callsign,
|
114
|
+
self.field2.findChild(QtWidgets.QLineEdit): self.field1.findChild(
|
115
|
+
QtWidgets.QLineEdit
|
116
|
+
),
|
117
|
+
self.field3.findChild(QtWidgets.QLineEdit): self.field2.findChild(
|
118
|
+
QtWidgets.QLineEdit
|
119
|
+
),
|
120
|
+
self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild(
|
121
|
+
QtWidgets.QLineEdit
|
122
|
+
),
|
123
|
+
}
|
124
|
+
|
125
|
+
|
126
|
+
def set_contact_vars(self):
|
127
|
+
"""Contest Specific"""
|
128
|
+
self.contact["SNT"] = self.sent.text()
|
129
|
+
self.contact["RCV"] = self.receive.text()
|
130
|
+
self.contact["NR"] = self.other_2.text().upper()
|
131
|
+
self.contact["SentNr"] = self.other_1.text()
|
132
|
+
# self.contact["SentNr"] = self.contest_settings.get("SentExchange", "").upper()
|
133
|
+
dok = self.contact["NR"]
|
134
|
+
|
135
|
+
dxcc = self.contact.get("CountryPrefix", "")
|
136
|
+
band = self.contact.get("Band", "")
|
137
|
+
|
138
|
+
if dxcc == "DL" and not isinstance(dok, int) and dok.upper() != "NM":
|
139
|
+
query = (
|
140
|
+
f"select count(*) as dok_count from dxlog where 1=1 "
|
141
|
+
f"and NR = '{dok.upper()}' "
|
142
|
+
f"and Band = '{band}' "
|
143
|
+
f"and ContestNR = {self.pref.get('contest', '1')};"
|
144
|
+
)
|
145
|
+
result = self.database.exec_sql(query)
|
146
|
+
count = int(result.get("dok_count", 0))
|
147
|
+
if count == 0:
|
148
|
+
self.contact["IsMultiplier2"] = 1
|
149
|
+
else:
|
150
|
+
self.contact["IsMultiplier2"] = 0
|
151
|
+
|
152
|
+
if self.contact.get("WPXPrefix", ""):
|
153
|
+
result = self.database.fetch_wpx_exists(self.contact.get("WPXPrefix", ""))
|
154
|
+
if result.get("wpx_count", ""):
|
155
|
+
self.contact["IsMultiplier1"] = 0
|
156
|
+
else:
|
157
|
+
self.contact["IsMultiplier1"] = 1
|
158
|
+
|
159
|
+
|
160
|
+
def predupe(self):
|
161
|
+
"""prefill his exchange with last known values"""
|
162
|
+
|
163
|
+
|
164
|
+
def prefill(self):
|
165
|
+
"""Fill SentNR"""
|
166
|
+
field = self.field3.findChild(QtWidgets.QLineEdit)
|
167
|
+
sent_sxchange_setting = self.contest_settings.get("SentExchange", "")
|
168
|
+
if sent_sxchange_setting.strip() == "#":
|
169
|
+
result = self.database.get_serial()
|
170
|
+
serial_nr = str(result.get("serial_nr", "1")).zfill(3)
|
171
|
+
if serial_nr == "None":
|
172
|
+
serial_nr = "001"
|
173
|
+
field = self.field3.findChild(QtWidgets.QLineEdit)
|
174
|
+
if len(field.text()) == 0:
|
175
|
+
field.setText(serial_nr)
|
176
|
+
else:
|
177
|
+
field.setText(sent_sxchange_setting)
|
178
|
+
|
179
|
+
if self.other_2.text() == "":
|
180
|
+
call = self.callsign.text().upper()
|
181
|
+
query = f"select NR from dxlog where Call = '{call}' and ContestName = 'XMAS' order by ts desc;"
|
182
|
+
logger.debug(query)
|
183
|
+
result = self.database.exec_sql(query)
|
184
|
+
logger.debug("%s", f"{result}")
|
185
|
+
if result:
|
186
|
+
if isinstance(result.get("NR", ""), str):
|
187
|
+
self.other_2.setText(str(result.get("NR", "")))
|
188
|
+
|
189
|
+
|
190
|
+
def points(self):
|
191
|
+
"""Calc point"""
|
192
|
+
return 1
|
193
|
+
|
194
|
+
|
195
|
+
def show_mults(self):
|
196
|
+
"""Return display string for mults"""
|
197
|
+
return int(self.database.fetch_mult_count(1).get("count", 0)) + int(
|
198
|
+
self.database.fetch_mult_count(2).get("count", 0)
|
199
|
+
)
|
200
|
+
|
201
|
+
|
202
|
+
def show_qso(self):
|
203
|
+
"""Return qso count"""
|
204
|
+
result = self.database.fetch_qso_count()
|
205
|
+
if result:
|
206
|
+
return int(result.get("qsos", 0))
|
207
|
+
return 0
|
208
|
+
|
209
|
+
|
210
|
+
def calc_score(self):
|
211
|
+
"""Return calculated score"""
|
212
|
+
result = self.database.fetch_points()
|
213
|
+
if result is not None:
|
214
|
+
score = result.get("Points", "0")
|
215
|
+
if score is None:
|
216
|
+
score = "0"
|
217
|
+
contest_points = int(score)
|
218
|
+
mults = show_mults(self)
|
219
|
+
return contest_points * mults
|
220
|
+
return 0
|
221
|
+
|
222
|
+
|
223
|
+
def adif(self):
|
224
|
+
"""Call the generate ADIF function"""
|
225
|
+
gen_adif(self, cabrillo_name, "XMAS")
|
226
|
+
|
227
|
+
|
228
|
+
def output_cabrillo_line(line_to_output, ending, file_descriptor, file_encoding):
|
229
|
+
""""""
|
230
|
+
print(
|
231
|
+
line_to_output.encode(file_encoding, errors="ignore").decode(),
|
232
|
+
end=ending,
|
233
|
+
file=file_descriptor,
|
234
|
+
)
|
235
|
+
|
236
|
+
|
237
|
+
def cabrillo(self, file_encoding):
|
238
|
+
"""Generates Cabrillo file. Maybe."""
|
239
|
+
# https://www.cqwpx.com/cabrillo.htm
|
240
|
+
logger.debug("******Cabrillo*****")
|
241
|
+
logger.debug("Station: %s", f"{self.station}")
|
242
|
+
logger.debug("Contest: %s", f"{self.contest_settings}")
|
243
|
+
now = datetime.datetime.now()
|
244
|
+
date_time = now.strftime("%Y-%m-%d_%H-%M-%S")
|
245
|
+
filename = (
|
246
|
+
str(Path.home())
|
247
|
+
+ "/"
|
248
|
+
+ f"{self.station.get('Call', '').upper()}_{cabrillo_name}_{date_time}.log"
|
249
|
+
)
|
250
|
+
logger.debug("%s", filename)
|
251
|
+
log = self.database.fetch_all_contacts_asc()
|
252
|
+
try:
|
253
|
+
with open(filename, "w", encoding=file_encoding) as file_descriptor:
|
254
|
+
output_cabrillo_line(
|
255
|
+
"START-OF-LOG: 3.0",
|
256
|
+
"\r\n",
|
257
|
+
file_descriptor,
|
258
|
+
file_encoding,
|
259
|
+
)
|
260
|
+
output_cabrillo_line(
|
261
|
+
f"CREATED-BY: Not1MM v{__version__}",
|
262
|
+
"\r\n",
|
263
|
+
file_descriptor,
|
264
|
+
file_encoding,
|
265
|
+
)
|
266
|
+
output_cabrillo_line(
|
267
|
+
f"CONTEST: {cabrillo_name}",
|
268
|
+
"\r\n",
|
269
|
+
file_descriptor,
|
270
|
+
file_encoding,
|
271
|
+
)
|
272
|
+
if self.station.get("Club", ""):
|
273
|
+
output_cabrillo_line(
|
274
|
+
f"CLUB: {self.station.get('Club', '').upper()}",
|
275
|
+
"\r\n",
|
276
|
+
file_descriptor,
|
277
|
+
file_encoding,
|
278
|
+
)
|
279
|
+
output_cabrillo_line(
|
280
|
+
f"CALLSIGN: {self.station.get('Call','')}",
|
281
|
+
"\r\n",
|
282
|
+
file_descriptor,
|
283
|
+
file_encoding,
|
284
|
+
)
|
285
|
+
output_cabrillo_line(
|
286
|
+
f"LOCATION: {self.station.get('ARRLSection', '')}",
|
287
|
+
"\r\n",
|
288
|
+
file_descriptor,
|
289
|
+
file_encoding,
|
290
|
+
)
|
291
|
+
output_cabrillo_line(
|
292
|
+
f"CATEGORY-OPERATOR: {self.contest_settings.get('OperatorCategory','')}",
|
293
|
+
"\r\n",
|
294
|
+
file_descriptor,
|
295
|
+
file_encoding,
|
296
|
+
)
|
297
|
+
output_cabrillo_line(
|
298
|
+
f"CATEGORY-ASSISTED: {self.contest_settings.get('AssistedCategory','')}",
|
299
|
+
"\r\n",
|
300
|
+
file_descriptor,
|
301
|
+
file_encoding,
|
302
|
+
)
|
303
|
+
output_cabrillo_line(
|
304
|
+
f"CATEGORY-BAND: {self.contest_settings.get('BandCategory','')}",
|
305
|
+
"\r\n",
|
306
|
+
file_descriptor,
|
307
|
+
file_encoding,
|
308
|
+
)
|
309
|
+
output_cabrillo_line(
|
310
|
+
f"CATEGORY-MODE: {self.contest_settings.get('ModeCategory','')}",
|
311
|
+
"\r\n",
|
312
|
+
file_descriptor,
|
313
|
+
file_encoding,
|
314
|
+
)
|
315
|
+
output_cabrillo_line(
|
316
|
+
f"CATEGORY-TRANSMITTER: {self.contest_settings.get('TransmitterCategory','')}",
|
317
|
+
"\r\n",
|
318
|
+
file_descriptor,
|
319
|
+
file_encoding,
|
320
|
+
)
|
321
|
+
if self.contest_settings.get("OverlayCategory", "") != "N/A":
|
322
|
+
output_cabrillo_line(
|
323
|
+
f"CATEGORY-OVERLAY: {self.contest_settings.get('OverlayCategory','')}",
|
324
|
+
"\r\n",
|
325
|
+
file_descriptor,
|
326
|
+
file_encoding,
|
327
|
+
)
|
328
|
+
output_cabrillo_line(
|
329
|
+
f"GRID-LOCATOR: {self.station.get('GridSquare','')}",
|
330
|
+
"\r\n",
|
331
|
+
file_descriptor,
|
332
|
+
file_encoding,
|
333
|
+
)
|
334
|
+
output_cabrillo_line(
|
335
|
+
f"CATEGORY-POWER: {self.contest_settings.get('PowerCategory','')}",
|
336
|
+
"\r\n",
|
337
|
+
file_descriptor,
|
338
|
+
file_encoding,
|
339
|
+
)
|
340
|
+
|
341
|
+
output_cabrillo_line(
|
342
|
+
f"CLAIMED-SCORE: {calc_score(self)}",
|
343
|
+
"\r\n",
|
344
|
+
file_descriptor,
|
345
|
+
file_encoding,
|
346
|
+
)
|
347
|
+
ops = f"@{self.station.get('Call','')}"
|
348
|
+
list_of_ops = self.database.get_ops()
|
349
|
+
for op in list_of_ops:
|
350
|
+
ops += f", {op.get('Operator', '')}"
|
351
|
+
output_cabrillo_line(
|
352
|
+
f"OPERATORS: {ops}",
|
353
|
+
"\r\n",
|
354
|
+
file_descriptor,
|
355
|
+
file_encoding,
|
356
|
+
)
|
357
|
+
output_cabrillo_line(
|
358
|
+
f"NAME: {self.station.get('Name', '')}",
|
359
|
+
"\r\n",
|
360
|
+
file_descriptor,
|
361
|
+
file_encoding,
|
362
|
+
)
|
363
|
+
output_cabrillo_line(
|
364
|
+
f"ADDRESS: {self.station.get('Street1', '')}",
|
365
|
+
"\r\n",
|
366
|
+
file_descriptor,
|
367
|
+
file_encoding,
|
368
|
+
)
|
369
|
+
output_cabrillo_line(
|
370
|
+
f"ADDRESS-CITY: {self.station.get('City', '')}",
|
371
|
+
"\r\n",
|
372
|
+
file_descriptor,
|
373
|
+
file_encoding,
|
374
|
+
)
|
375
|
+
output_cabrillo_line(
|
376
|
+
f"ADDRESS-STATE-PROVINCE: {self.station.get('State', '')}",
|
377
|
+
"\r\n",
|
378
|
+
file_descriptor,
|
379
|
+
file_encoding,
|
380
|
+
)
|
381
|
+
output_cabrillo_line(
|
382
|
+
f"ADDRESS-POSTALCODE: {self.station.get('Zip', '')}",
|
383
|
+
"\r\n",
|
384
|
+
file_descriptor,
|
385
|
+
file_encoding,
|
386
|
+
)
|
387
|
+
output_cabrillo_line(
|
388
|
+
f"ADDRESS-COUNTRY: {self.station.get('Country', '')}",
|
389
|
+
"\r\n",
|
390
|
+
file_descriptor,
|
391
|
+
file_encoding,
|
392
|
+
)
|
393
|
+
output_cabrillo_line(
|
394
|
+
f"EMAIL: {self.station.get('Email', '')}",
|
395
|
+
"\r\n",
|
396
|
+
file_descriptor,
|
397
|
+
file_encoding,
|
398
|
+
)
|
399
|
+
for contact in log:
|
400
|
+
the_date_and_time = contact.get("TS", "")
|
401
|
+
themode = contact.get("Mode", "")
|
402
|
+
if themode == "LSB" or themode == "USB":
|
403
|
+
themode = "PH"
|
404
|
+
frequency = str(int(contact.get("Freq", "0"))).rjust(5)
|
405
|
+
|
406
|
+
loggeddate = the_date_and_time[:10]
|
407
|
+
loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
|
408
|
+
output_cabrillo_line(
|
409
|
+
f"QSO: {frequency} {themode} {loggeddate} {loggedtime} "
|
410
|
+
f"{contact.get('StationPrefix', '').ljust(13)} "
|
411
|
+
f"{str(contact.get('SNT', '')).ljust(3)} "
|
412
|
+
f"{str(contact.get('SentNr', '')).ljust(6)} "
|
413
|
+
f"{contact.get('Call', '').ljust(13)} "
|
414
|
+
f"{str(contact.get('RCV', '')).ljust(3)} "
|
415
|
+
f"{str(contact.get('NR', '')).ljust(6)}",
|
416
|
+
"\r\n",
|
417
|
+
file_descriptor,
|
418
|
+
file_encoding,
|
419
|
+
)
|
420
|
+
output_cabrillo_line("END-OF-LOG:", "\r\n", file_descriptor, file_encoding)
|
421
|
+
self.show_message_box(f"Cabrillo saved to: {filename}")
|
422
|
+
except IOError as exception:
|
423
|
+
logger.critical("cabrillo: IO error: %s, writing to %s", exception, filename)
|
424
|
+
self.show_message_box(f"Error saving Cabrillo: {exception} {filename}")
|
425
|
+
return
|
426
|
+
|
427
|
+
|
428
|
+
def recalculate_mults(self):
|
429
|
+
"""Recalculates multipliers after change in logged qso."""
|
430
|
+
|
431
|
+
all_contacts = self.database.fetch_all_contacts_asc()
|
432
|
+
for contact in all_contacts:
|
433
|
+
|
434
|
+
contact["IsMultiplier1"] = 0
|
435
|
+
contact["IsMultiplier2"] = 0
|
436
|
+
|
437
|
+
time_stamp = contact.get("TS", "")
|
438
|
+
dok = contact.get("NR", "")
|
439
|
+
dxcc = contact.get("CountryPrefix", "")
|
440
|
+
band = contact.get("Band", "")
|
441
|
+
wpx = contact.get("WPXPrefix", "")
|
442
|
+
result = self.database.fetch_wpx_exists_before_me(wpx, time_stamp)
|
443
|
+
wpx_count = result.get("wpx_count", 1)
|
444
|
+
if wpx_count == 0:
|
445
|
+
contact["IsMultiplier1"] = 1
|
446
|
+
else:
|
447
|
+
contact["IsMultiplier1"] = 0
|
448
|
+
|
449
|
+
if dxcc == "DL" and not isinstance(dok, int) and dok.upper() != "NM":
|
450
|
+
query = (
|
451
|
+
f"select count(*) as dok_count from dxlog where TS < '{time_stamp}' "
|
452
|
+
f"and NR = '{dok.upper()}' "
|
453
|
+
f"and Band = '{band}' "
|
454
|
+
f"and ContestNR = {self.pref.get('contest', '1')};"
|
455
|
+
)
|
456
|
+
result = self.database.exec_sql(query)
|
457
|
+
count = int(result.get("dok_count", 0))
|
458
|
+
if count == 0:
|
459
|
+
contact["IsMultiplier2"] = 1
|
460
|
+
else:
|
461
|
+
contact["IsMultiplier2"] = 0
|
462
|
+
self.database.change_contact(contact)
|
463
|
+
|
464
|
+
|
465
|
+
def process_esm(self, new_focused_widget=None, with_enter=False):
|
466
|
+
"""ESM State Machine"""
|
467
|
+
|
468
|
+
# self.pref["run_state"]
|
469
|
+
|
470
|
+
# -----===== Assigned F-Keys =====-----
|
471
|
+
# self.esm_dict["CQ"]
|
472
|
+
# self.esm_dict["EXCH"]
|
473
|
+
# self.esm_dict["QRZ"]
|
474
|
+
# self.esm_dict["AGN"]
|
475
|
+
# self.esm_dict["HISCALL"]
|
476
|
+
# self.esm_dict["MYCALL"]
|
477
|
+
# self.esm_dict["QSOB4"]
|
478
|
+
|
479
|
+
# ----==== text fields ====----
|
480
|
+
# self.callsign
|
481
|
+
# self.sent
|
482
|
+
# self.receive
|
483
|
+
# self.other_1
|
484
|
+
# self.other_2
|
485
|
+
|
486
|
+
if new_focused_widget is not None:
|
487
|
+
self.current_widget = self.inputs_dict.get(new_focused_widget)
|
488
|
+
|
489
|
+
# print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
|
490
|
+
|
491
|
+
for a_button in [
|
492
|
+
self.F1,
|
493
|
+
self.F2,
|
494
|
+
self.F3,
|
495
|
+
self.F4,
|
496
|
+
self.F5,
|
497
|
+
self.F6,
|
498
|
+
self.F7,
|
499
|
+
self.F8,
|
500
|
+
self.F9,
|
501
|
+
self.F10,
|
502
|
+
self.F11,
|
503
|
+
self.F12,
|
504
|
+
]:
|
505
|
+
self.restore_button_color(a_button)
|
506
|
+
|
507
|
+
buttons_to_send = []
|
508
|
+
|
509
|
+
if self.pref.get("run_state"):
|
510
|
+
if self.current_widget == "callsign":
|
511
|
+
if len(self.callsign.text()) < 3:
|
512
|
+
self.make_button_green(self.esm_dict["CQ"])
|
513
|
+
buttons_to_send.append(self.esm_dict["CQ"])
|
514
|
+
elif len(self.callsign.text()) > 2:
|
515
|
+
self.make_button_green(self.esm_dict["HISCALL"])
|
516
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
517
|
+
buttons_to_send.append(self.esm_dict["HISCALL"])
|
518
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
519
|
+
|
520
|
+
elif self.current_widget in ["other_1", "other_2"]:
|
521
|
+
if self.other_2.text() == "" or self.other_1.text() == "":
|
522
|
+
self.make_button_green(self.esm_dict["AGN"])
|
523
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
524
|
+
else:
|
525
|
+
self.make_button_green(self.esm_dict["QRZ"])
|
526
|
+
buttons_to_send.append(self.esm_dict["QRZ"])
|
527
|
+
buttons_to_send.append("LOGIT")
|
528
|
+
|
529
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
530
|
+
for button in buttons_to_send:
|
531
|
+
if button:
|
532
|
+
if button == "LOGIT":
|
533
|
+
self.save_contact()
|
534
|
+
continue
|
535
|
+
self.process_function_key(button)
|
536
|
+
else:
|
537
|
+
if self.current_widget == "callsign":
|
538
|
+
if len(self.callsign.text()) > 2:
|
539
|
+
self.make_button_green(self.esm_dict["MYCALL"])
|
540
|
+
buttons_to_send.append(self.esm_dict["MYCALL"])
|
541
|
+
|
542
|
+
elif self.current_widget in ["other_1", "other_2"]:
|
543
|
+
if self.other_2.text() == "" or self.other_1.text() == "":
|
544
|
+
self.make_button_green(self.esm_dict["AGN"])
|
545
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
546
|
+
else:
|
547
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
548
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
549
|
+
buttons_to_send.append("LOGIT")
|
550
|
+
|
551
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
552
|
+
for button in buttons_to_send:
|
553
|
+
if button:
|
554
|
+
if button == "LOGIT":
|
555
|
+
self.save_contact()
|
556
|
+
continue
|
557
|
+
self.process_function_key(button)
|
558
|
+
|
559
|
+
|
560
|
+
def populate_history_info_line(self):
|
561
|
+
result = self.database.fetch_call_history(self.callsign.text())
|
562
|
+
if result:
|
563
|
+
self.history_info.setText(
|
564
|
+
f"{result.get('Call', '')}, {result.get('Name', '')}, {result.get('Exch1', '')}, {result.get('UserText','...')}"
|
565
|
+
)
|
566
|
+
else:
|
567
|
+
self.history_info.setText("")
|
568
|
+
|
569
|
+
|
570
|
+
def check_call_history(self):
|
571
|
+
""""""
|
572
|
+
result = self.database.fetch_call_history(self.callsign.text())
|
573
|
+
if result:
|
574
|
+
self.history_info.setText(f"{result.get('UserText','')}")
|
575
|
+
if self.other_1.text() == "":
|
576
|
+
self.other_1.setText(f"{result.get('Exch1', '')}")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: not1mm
|
3
|
-
Version: 24.11.
|
3
|
+
Version: 24.11.18
|
4
4
|
Summary: NOT1MM Logger
|
5
5
|
Author-email: Michael Bridak <michael.bridak@gmail.com>
|
6
6
|
Project-URL: Homepage, https://github.com/mbridak/not1mm
|
@@ -219,12 +219,14 @@ generated, 'cause I'm lazy, list of those who've submitted PR's.
|
|
219
219
|
- **CQ WPX CW, RTTY, SSB**
|
220
220
|
- **CQ World Wide CW, RTTY, SSB**
|
221
221
|
- **CWOps CWT**
|
222
|
+
- **DARC Xmas**
|
222
223
|
- **Helvetia**
|
223
224
|
- IARU Fieldday R1 CW, SSB
|
224
225
|
- IARU HF
|
225
226
|
- ICWC MST
|
226
227
|
- Japan International DX CW, SSB
|
227
228
|
- **K1USN Slow Speed Test**
|
229
|
+
- **LZ DX**
|
228
230
|
- **NAQP CW, RTTY, SSB**
|
229
231
|
- Phone Weekly Test
|
230
232
|
- **RAEM**
|
@@ -236,6 +238,7 @@ generated, 'cause I'm lazy, list of those who've submitted PR's.
|
|
236
238
|
|
237
239
|
## Recent Changes (Polishing the Turd)
|
238
240
|
|
241
|
+
- [24-11-18] Accepted PR from dg9vh for the DARC XMAS Contest.
|
239
242
|
- [24-11-17] Accepted PR from dg9vh for the LZ DX contest.
|
240
243
|
- [24-11-15] Made checkwindow font bigger and match a little more contrasted.
|
241
244
|
- [24-11-12] add check for ipv4 address for CAT.
|
@@ -31,7 +31,7 @@ not1mm/data/k6gte.not1mm-64.png,sha256=6ku45Gq1g5ezh04F07osoKRtanb3e4kbx5XdIEh3N
|
|
31
31
|
not1mm/data/logwindow.ui,sha256=f7vULj96tHIQuR1nJMyvPHHcmVgzkhv9D1isyojsnFU,1458
|
32
32
|
not1mm/data/logwindowx.ui,sha256=CwpI-h7cI1yqyldH9quKftsdHL5lTyL9ABOcf80nfqc,1632
|
33
33
|
not1mm/data/main.ui,sha256=pI-70TYESe85ENkRH8l1DXnKDOkwYqKXUdMk6KYaN50,63193
|
34
|
-
not1mm/data/new_contest.ui,sha256=
|
34
|
+
not1mm/data/new_contest.ui,sha256=SiKF_zwnfHopEN_x9R1ftC5f4IO9qLOkIFnoXhoe8vQ,23738
|
35
35
|
not1mm/data/not1mm.html,sha256=c9-mfjMwDt4f5pySUruz2gREW33CQ2_rCddM2z5CZQo,23273
|
36
36
|
not1mm/data/opon.ui,sha256=QDicqAk2lORG2UWsHa6jHlsGn6uzrrI2R4HSAocpPes,2258
|
37
37
|
not1mm/data/pickcontest.ui,sha256=4hPBszCglObThx_eIWtmK9CEcbr7WBjbB1rKZdI-o3I,1707
|
@@ -114,7 +114,7 @@ not1mm/lib/plugin_common.py,sha256=TbFUbftjELFt4QRdsjSHbqnXSngZOlSwlCTClqosDXA,9
|
|
114
114
|
not1mm/lib/select_contest.py,sha256=WsptLuwkouIHeocJL3oZ6-eUfEnhpwdc-x7eMZ_TIVM,359
|
115
115
|
not1mm/lib/settings.py,sha256=Xt0WE2ro_kUYdugQ0Pe1SQX07MHrJ0jyQqDqAKKqxuU,13564
|
116
116
|
not1mm/lib/super_check_partial.py,sha256=hwT2NRwobu0PLDyw6ltmbmcAtGBD02CKGFbgGWjXMqA,2334
|
117
|
-
not1mm/lib/version.py,sha256=
|
117
|
+
not1mm/lib/version.py,sha256=kowhHQDqviYSQWhZBIVUVWvUNsHXuZrRPz8QvpKZhl8,49
|
118
118
|
not1mm/lib/versiontest.py,sha256=8vDNptuBBunn-1IGkjNaquehqBYUJyjrPSF8Igmd4_Y,1286
|
119
119
|
not1mm/plugins/10_10_fall_cw.py,sha256=gNgTnafjM99cFvZ-6qBfWoOvd5Zj2Ehx6XjJvrHjm40,11872
|
120
120
|
not1mm/plugins/10_10_spring_cw.py,sha256=QME8LyLyTnHsA5sjGG19n_64-0gdgBMRRi9C8LpgQzs,11877
|
@@ -141,6 +141,7 @@ not1mm/plugins/cq_ww_cw.py,sha256=rLd95LgScgdrZibpX2kOlzmjCHWSy7PFqXisYXn4CzA,18
|
|
141
141
|
not1mm/plugins/cq_ww_rtty.py,sha256=8JV0TsUGXLn0LsEyDJhgb56r2nlcSm4meGURl5WvDs0,22678
|
142
142
|
not1mm/plugins/cq_ww_ssb.py,sha256=Io9b40ZgZHmE8JsDe5dYHcuECWEYiT_BDXGxDpqQsjY,17615
|
143
143
|
not1mm/plugins/cwt.py,sha256=89MWOQttlRfcur8bt9xl5J79Ks67ctVhv8r62yQRxQo,17711
|
144
|
+
not1mm/plugins/darc_xmas.py,sha256=xIB3Hhs5ihFnkFHN_wW5kj59HpMsaeYVQF6xojulv3I,19258
|
144
145
|
not1mm/plugins/general_logging.py,sha256=IHcgZ1YJEEaxPUn7jyTIUpQAsa1jaHO5zfHvcaqbF34,3494
|
145
146
|
not1mm/plugins/helvetia.py,sha256=d8DugnlUYOC_ig3lpJcwrTIV2YJxreePNhtt1Bjcc1Q,20240
|
146
147
|
not1mm/plugins/iaru_fieldday_r1_cw.py,sha256=b3bmpBWpuN6lNvbBvUb8vUYHjeb0JmN4n6mgfug5ITs,14220
|
@@ -161,9 +162,9 @@ not1mm/plugins/ref_ssb.py,sha256=Z6ZqNInyGFwWNSHXrzCDlokMxZ6NQQ2Yi1c8CGfmNWE,209
|
|
161
162
|
not1mm/plugins/stew_perry_topband.py,sha256=D6KCyna4SVt6w_huH-nkxGXnOpJKbbi3Dg7J81e_dpw,12193
|
162
163
|
not1mm/plugins/weekly_rtty.py,sha256=q8A2UOMQidLoFtd5QxZWHtUPCgms_2dgYocO8d6tf70,19836
|
163
164
|
not1mm/plugins/winter_field_day.py,sha256=5SAaFq-1NYMr18Ee-aFZhXsaU-Pzwte1GOJoGCaUwxg,15232
|
164
|
-
not1mm-24.11.
|
165
|
-
not1mm-24.11.
|
166
|
-
not1mm-24.11.
|
167
|
-
not1mm-24.11.
|
168
|
-
not1mm-24.11.
|
169
|
-
not1mm-24.11.
|
165
|
+
not1mm-24.11.18.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
166
|
+
not1mm-24.11.18.dist-info/METADATA,sha256=c-65m8Jge1NwRXv-Q89hjDlCOMlE54WMoUkj7j-2NUg,36394
|
167
|
+
not1mm-24.11.18.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
|
168
|
+
not1mm-24.11.18.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
|
169
|
+
not1mm-24.11.18.dist-info/top_level.txt,sha256=0YmTxEcDzQlzXub-lXASvoLpg_mt1c2thb5cVkDf5J4,7
|
170
|
+
not1mm-24.11.18.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|