not1mm 24.11.24__py3-none-any.whl → 24.12.3.1__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.
@@ -358,3 +358,94 @@ def cabrillo(self, file_encoding):
358
358
 
359
359
  def recalculate_mults(self):
360
360
  """Recalculates multipliers after change in logged qso."""
361
+
362
+
363
+ def process_esm(self, new_focused_widget=None, with_enter=False):
364
+ """ESM State Machine"""
365
+
366
+ # self.pref["run_state"]
367
+
368
+ # -----===== Assigned F-Keys =====-----
369
+ # self.esm_dict["CQ"]
370
+ # self.esm_dict["EXCH"]
371
+ # self.esm_dict["QRZ"]
372
+ # self.esm_dict["AGN"]
373
+ # self.esm_dict["HISCALL"]
374
+ # self.esm_dict["MYCALL"]
375
+ # self.esm_dict["QSOB4"]
376
+
377
+ # ----==== text fields ====----
378
+ # self.callsign
379
+ # self.sent
380
+ # self.receive
381
+ # self.other_1
382
+ # self.other_2
383
+
384
+ if new_focused_widget is not None:
385
+ self.current_widget = self.inputs_dict.get(new_focused_widget)
386
+
387
+ # print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
388
+
389
+ for a_button in [
390
+ self.esm_dict["CQ"],
391
+ self.esm_dict["EXCH"],
392
+ self.esm_dict["QRZ"],
393
+ self.esm_dict["AGN"],
394
+ self.esm_dict["HISCALL"],
395
+ self.esm_dict["MYCALL"],
396
+ self.esm_dict["QSOB4"],
397
+ ]:
398
+ if a_button is not None:
399
+ self.restore_button_color(a_button)
400
+
401
+ buttons_to_send = []
402
+
403
+ if self.pref.get("run_state"):
404
+ if self.current_widget == "callsign":
405
+ if len(self.callsign.text()) < 3:
406
+ self.make_button_green(self.esm_dict["CQ"])
407
+ buttons_to_send.append(self.esm_dict["CQ"])
408
+ elif len(self.callsign.text()) > 2:
409
+ self.make_button_green(self.esm_dict["HISCALL"])
410
+ self.make_button_green(self.esm_dict["EXCH"])
411
+ buttons_to_send.append(self.esm_dict["HISCALL"])
412
+ buttons_to_send.append(self.esm_dict["EXCH"])
413
+
414
+ elif self.current_widget in ["other_2"]:
415
+ if self.other_2.text() == "":
416
+ self.make_button_green(self.esm_dict["AGN"])
417
+ buttons_to_send.append(self.esm_dict["AGN"])
418
+ else:
419
+ self.make_button_green(self.esm_dict["QRZ"])
420
+ buttons_to_send.append(self.esm_dict["QRZ"])
421
+ buttons_to_send.append("LOGIT")
422
+
423
+ if with_enter is True and bool(len(buttons_to_send)):
424
+ for button in buttons_to_send:
425
+ if button:
426
+ if button == "LOGIT":
427
+ self.save_contact()
428
+ continue
429
+ self.process_function_key(button)
430
+ else:
431
+ if self.current_widget == "callsign":
432
+ if len(self.callsign.text()) > 2:
433
+ self.make_button_green(self.esm_dict["MYCALL"])
434
+ buttons_to_send.append(self.esm_dict["MYCALL"])
435
+
436
+ elif self.current_widget in ["other_2"]:
437
+ if self.other_2.text() == "":
438
+ self.make_button_green(self.esm_dict["AGN"])
439
+ buttons_to_send.append(self.esm_dict["AGN"])
440
+ else:
441
+ self.make_button_green(self.esm_dict["EXCH"])
442
+ buttons_to_send.append(self.esm_dict["EXCH"])
443
+ buttons_to_send.append("LOGIT")
444
+
445
+ if with_enter is True and bool(len(buttons_to_send)):
446
+ for button in buttons_to_send:
447
+ if button:
448
+ if button == "LOGIT":
449
+ self.save_contact()
450
+ continue
451
+ self.process_function_key(button)
@@ -362,3 +362,94 @@ def cabrillo(self, file_encoding):
362
362
 
363
363
  def recalculate_mults(self):
364
364
  """Recalculates multipliers after change in logged qso."""
365
+
366
+
367
+ def process_esm(self, new_focused_widget=None, with_enter=False):
368
+ """ESM State Machine"""
369
+
370
+ # self.pref["run_state"]
371
+
372
+ # -----===== Assigned F-Keys =====-----
373
+ # self.esm_dict["CQ"]
374
+ # self.esm_dict["EXCH"]
375
+ # self.esm_dict["QRZ"]
376
+ # self.esm_dict["AGN"]
377
+ # self.esm_dict["HISCALL"]
378
+ # self.esm_dict["MYCALL"]
379
+ # self.esm_dict["QSOB4"]
380
+
381
+ # ----==== text fields ====----
382
+ # self.callsign
383
+ # self.sent
384
+ # self.receive
385
+ # self.other_1
386
+ # self.other_2
387
+
388
+ if new_focused_widget is not None:
389
+ self.current_widget = self.inputs_dict.get(new_focused_widget)
390
+
391
+ # print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
392
+
393
+ for a_button in [
394
+ self.esm_dict["CQ"],
395
+ self.esm_dict["EXCH"],
396
+ self.esm_dict["QRZ"],
397
+ self.esm_dict["AGN"],
398
+ self.esm_dict["HISCALL"],
399
+ self.esm_dict["MYCALL"],
400
+ self.esm_dict["QSOB4"],
401
+ ]:
402
+ if a_button is not None:
403
+ self.restore_button_color(a_button)
404
+
405
+ buttons_to_send = []
406
+
407
+ if self.pref.get("run_state"):
408
+ if self.current_widget == "callsign":
409
+ if len(self.callsign.text()) < 3:
410
+ self.make_button_green(self.esm_dict["CQ"])
411
+ buttons_to_send.append(self.esm_dict["CQ"])
412
+ elif len(self.callsign.text()) > 2:
413
+ self.make_button_green(self.esm_dict["HISCALL"])
414
+ self.make_button_green(self.esm_dict["EXCH"])
415
+ buttons_to_send.append(self.esm_dict["HISCALL"])
416
+ buttons_to_send.append(self.esm_dict["EXCH"])
417
+
418
+ elif self.current_widget in ["other_2"]:
419
+ if self.other_2.text() == "":
420
+ self.make_button_green(self.esm_dict["AGN"])
421
+ buttons_to_send.append(self.esm_dict["AGN"])
422
+ else:
423
+ self.make_button_green(self.esm_dict["QRZ"])
424
+ buttons_to_send.append(self.esm_dict["QRZ"])
425
+ buttons_to_send.append("LOGIT")
426
+
427
+ if with_enter is True and bool(len(buttons_to_send)):
428
+ for button in buttons_to_send:
429
+ if button:
430
+ if button == "LOGIT":
431
+ self.save_contact()
432
+ continue
433
+ self.process_function_key(button)
434
+ else:
435
+ if self.current_widget == "callsign":
436
+ if len(self.callsign.text()) > 2:
437
+ self.make_button_green(self.esm_dict["MYCALL"])
438
+ buttons_to_send.append(self.esm_dict["MYCALL"])
439
+
440
+ elif self.current_widget in ["other_2"]:
441
+ if self.other_2.text() == "":
442
+ self.make_button_green(self.esm_dict["AGN"])
443
+ buttons_to_send.append(self.esm_dict["AGN"])
444
+ else:
445
+ self.make_button_green(self.esm_dict["EXCH"])
446
+ buttons_to_send.append(self.esm_dict["EXCH"])
447
+ buttons_to_send.append("LOGIT")
448
+
449
+ if with_enter is True and bool(len(buttons_to_send)):
450
+ for button in buttons_to_send:
451
+ if button:
452
+ if button == "LOGIT":
453
+ self.save_contact()
454
+ continue
455
+ self.process_function_key(button)
@@ -360,3 +360,94 @@ def cabrillo(self, file_encoding):
360
360
 
361
361
  def recalculate_mults(self):
362
362
  """Recalculates multipliers after change in logged qso."""
363
+
364
+
365
+ def process_esm(self, new_focused_widget=None, with_enter=False):
366
+ """ESM State Machine"""
367
+
368
+ # self.pref["run_state"]
369
+
370
+ # -----===== Assigned F-Keys =====-----
371
+ # self.esm_dict["CQ"]
372
+ # self.esm_dict["EXCH"]
373
+ # self.esm_dict["QRZ"]
374
+ # self.esm_dict["AGN"]
375
+ # self.esm_dict["HISCALL"]
376
+ # self.esm_dict["MYCALL"]
377
+ # self.esm_dict["QSOB4"]
378
+
379
+ # ----==== text fields ====----
380
+ # self.callsign
381
+ # self.sent
382
+ # self.receive
383
+ # self.other_1
384
+ # self.other_2
385
+
386
+ if new_focused_widget is not None:
387
+ self.current_widget = self.inputs_dict.get(new_focused_widget)
388
+
389
+ # print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
390
+
391
+ for a_button in [
392
+ self.esm_dict["CQ"],
393
+ self.esm_dict["EXCH"],
394
+ self.esm_dict["QRZ"],
395
+ self.esm_dict["AGN"],
396
+ self.esm_dict["HISCALL"],
397
+ self.esm_dict["MYCALL"],
398
+ self.esm_dict["QSOB4"],
399
+ ]:
400
+ if a_button is not None:
401
+ self.restore_button_color(a_button)
402
+
403
+ buttons_to_send = []
404
+
405
+ if self.pref.get("run_state"):
406
+ if self.current_widget == "callsign":
407
+ if len(self.callsign.text()) < 3:
408
+ self.make_button_green(self.esm_dict["CQ"])
409
+ buttons_to_send.append(self.esm_dict["CQ"])
410
+ elif len(self.callsign.text()) > 2:
411
+ self.make_button_green(self.esm_dict["HISCALL"])
412
+ self.make_button_green(self.esm_dict["EXCH"])
413
+ buttons_to_send.append(self.esm_dict["HISCALL"])
414
+ buttons_to_send.append(self.esm_dict["EXCH"])
415
+
416
+ elif self.current_widget in ["other_2"]:
417
+ if self.other_2.text() == "":
418
+ self.make_button_green(self.esm_dict["AGN"])
419
+ buttons_to_send.append(self.esm_dict["AGN"])
420
+ else:
421
+ self.make_button_green(self.esm_dict["QRZ"])
422
+ buttons_to_send.append(self.esm_dict["QRZ"])
423
+ buttons_to_send.append("LOGIT")
424
+
425
+ if with_enter is True and bool(len(buttons_to_send)):
426
+ for button in buttons_to_send:
427
+ if button:
428
+ if button == "LOGIT":
429
+ self.save_contact()
430
+ continue
431
+ self.process_function_key(button)
432
+ else:
433
+ if self.current_widget == "callsign":
434
+ if len(self.callsign.text()) > 2:
435
+ self.make_button_green(self.esm_dict["MYCALL"])
436
+ buttons_to_send.append(self.esm_dict["MYCALL"])
437
+
438
+ elif self.current_widget in ["other_2"]:
439
+ if self.other_2.text() == "":
440
+ self.make_button_green(self.esm_dict["AGN"])
441
+ buttons_to_send.append(self.esm_dict["AGN"])
442
+ else:
443
+ self.make_button_green(self.esm_dict["EXCH"])
444
+ buttons_to_send.append(self.esm_dict["EXCH"])
445
+ buttons_to_send.append("LOGIT")
446
+
447
+ if with_enter is True and bool(len(buttons_to_send)):
448
+ for button in buttons_to_send:
449
+ if button:
450
+ if button == "LOGIT":
451
+ self.save_contact()
452
+ continue
453
+ self.process_function_key(button)
@@ -441,3 +441,113 @@ def cabrillo(self, file_encoding):
441
441
 
442
442
  def recalculate_mults(self):
443
443
  """Recalculates multipliers after change in logged qso."""
444
+
445
+
446
+ def process_esm(self, new_focused_widget=None, with_enter=False):
447
+ """ESM State Machine"""
448
+
449
+ # self.pref["run_state"]
450
+
451
+ # -----===== Assigned F-Keys =====-----
452
+ # self.esm_dict["CQ"]
453
+ # self.esm_dict["EXCH"]
454
+ # self.esm_dict["QRZ"]
455
+ # self.esm_dict["AGN"]
456
+ # self.esm_dict["HISCALL"]
457
+ # self.esm_dict["MYCALL"]
458
+ # self.esm_dict["QSOB4"]
459
+
460
+ # ----==== text fields ====----
461
+ # self.callsign
462
+ # self.sent
463
+ # self.receive
464
+ # self.other_1
465
+ # self.other_2
466
+
467
+ if new_focused_widget is not None:
468
+ self.current_widget = self.inputs_dict.get(new_focused_widget)
469
+
470
+ # print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
471
+
472
+ for a_button in [
473
+ self.esm_dict["CQ"],
474
+ self.esm_dict["EXCH"],
475
+ self.esm_dict["QRZ"],
476
+ self.esm_dict["AGN"],
477
+ self.esm_dict["HISCALL"],
478
+ self.esm_dict["MYCALL"],
479
+ self.esm_dict["QSOB4"],
480
+ ]:
481
+ if a_button is not None:
482
+ self.restore_button_color(a_button)
483
+
484
+ buttons_to_send = []
485
+
486
+ if self.pref.get("run_state"):
487
+ if self.current_widget == "callsign":
488
+ if len(self.callsign.text()) < 3:
489
+ self.make_button_green(self.esm_dict["CQ"])
490
+ buttons_to_send.append(self.esm_dict["CQ"])
491
+ elif len(self.callsign.text()) > 2:
492
+ self.make_button_green(self.esm_dict["HISCALL"])
493
+ self.make_button_green(self.esm_dict["EXCH"])
494
+ buttons_to_send.append(self.esm_dict["HISCALL"])
495
+ buttons_to_send.append(self.esm_dict["EXCH"])
496
+
497
+ elif self.current_widget in ["other_2"]:
498
+ if self.other_2.text() == "":
499
+ self.make_button_green(self.esm_dict["AGN"])
500
+ buttons_to_send.append(self.esm_dict["AGN"])
501
+ else:
502
+ self.make_button_green(self.esm_dict["QRZ"])
503
+ buttons_to_send.append(self.esm_dict["QRZ"])
504
+ buttons_to_send.append("LOGIT")
505
+
506
+ if with_enter is True and bool(len(buttons_to_send)):
507
+ for button in buttons_to_send:
508
+ if button:
509
+ if button == "LOGIT":
510
+ self.save_contact()
511
+ continue
512
+ self.process_function_key(button)
513
+ else:
514
+ if self.current_widget == "callsign":
515
+ if len(self.callsign.text()) > 2:
516
+ self.make_button_green(self.esm_dict["MYCALL"])
517
+ buttons_to_send.append(self.esm_dict["MYCALL"])
518
+
519
+ elif self.current_widget in ["other_2"]:
520
+ if self.other_2.text() == "":
521
+ self.make_button_green(self.esm_dict["AGN"])
522
+ buttons_to_send.append(self.esm_dict["AGN"])
523
+ else:
524
+ self.make_button_green(self.esm_dict["EXCH"])
525
+ buttons_to_send.append(self.esm_dict["EXCH"])
526
+ buttons_to_send.append("LOGIT")
527
+
528
+ if with_enter is True and bool(len(buttons_to_send)):
529
+ for button in buttons_to_send:
530
+ if button:
531
+ if button == "LOGIT":
532
+ self.save_contact()
533
+ continue
534
+ self.process_function_key(button)
535
+
536
+
537
+ def populate_history_info_line(self):
538
+ result = self.database.fetch_call_history(self.callsign.text())
539
+ if result:
540
+ self.history_info.setText(
541
+ f"{result.get('Call', '')}, {result.get('Name', '')}, {result.get('State', '')}, {result.get('UserText','...')}"
542
+ )
543
+ else:
544
+ self.history_info.setText("")
545
+
546
+
547
+ def check_call_history(self):
548
+ """"""
549
+ result = self.database.fetch_call_history(self.callsign.text())
550
+ if result:
551
+ self.history_info.setText(f"{result.get('UserText','')}")
552
+ if self.other_2.text() == "":
553
+ self.other_2.setText(f"{result.get('State', '')}")