not1mm 23.3.23__py3-none-any.whl → 23.3.24.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.
not1mm/__main__.py CHANGED
@@ -8,13 +8,12 @@ import importlib
8
8
  import logging
9
9
  import os
10
10
  import pkgutil
11
-
12
- # import re
11
+ import re
13
12
  import socket
13
+ import subprocess
14
14
 
15
15
  # import sqlite3
16
16
  import sys
17
- import subprocess
18
17
  import threading
19
18
  import uuid
20
19
  from datetime import datetime
@@ -23,16 +22,10 @@ from pathlib import Path
23
22
  from shutil import copyfile
24
23
  from xmlrpc.client import Error, ServerProxy
25
24
 
26
- # import dbus
27
25
  import psutil
28
26
  from PyQt5 import QtCore, QtGui, QtWidgets, uic
29
- from PyQt5.QtCore import (
30
- QDir,
31
- QPoint, # pylint: disable=no-name-in-module
32
- QRect,
33
- QSize,
34
- Qt,
35
- )
27
+ from PyQt5.QtCore import QPoint # pylint: disable=no-name-in-module
28
+ from PyQt5.QtCore import QDir, QRect, QSize, Qt
36
29
  from PyQt5.QtGui import QFontDatabase # pylint: disable=no-name-in-module
37
30
 
38
31
  from not1mm.lib.cat_interface import CAT
@@ -47,8 +40,8 @@ from not1mm.lib.ham_utility import (
47
40
  calculate_wpx_prefix,
48
41
  distance,
49
42
  distance_with_latlon,
50
- getband,
51
43
  get_logged_band,
44
+ getband,
52
45
  reciprocol,
53
46
  )
54
47
  from not1mm.lib.lookup import QRZlookup
@@ -191,19 +184,20 @@ class MainWindow(QtWidgets.QMainWindow):
191
184
  multicast_group = None
192
185
  multicast_port = None
193
186
  interface_ip = None
187
+ rig_control = None
194
188
 
195
189
  def __init__(self, *args, **kwargs):
196
190
  super().__init__(*args, **kwargs)
197
191
  logger.info("MainWindow: __init__")
198
192
  self.database = DataBase(self.dbname, WORKING_PATH)
199
- if not check_process("logwindow.py"):
200
- _ = subprocess.Popen([sys.executable, WORKING_PATH + "/logwindow.py"])
193
+ self.launch_log_window()
201
194
  self.cw = CW(1, "127.0.0.1", 6789)
202
195
  self.contact = self.database.empty_contact
203
196
  data_path = WORKING_PATH + "/data/main.ui"
204
197
  uic.loadUi(data_path, self)
205
198
  self.n1mm = N1MM()
206
199
  self.next_field = self.other_2
200
+ self.dupe_indicator.hide()
207
201
  self.cw_speed.valueChanged.connect(self.cwspeed_spinbox_changed)
208
202
  self.actionCW_Macros.triggered.connect(self.cw_macros_state_changed)
209
203
  self.actionCommand_Buttons.triggered.connect(self.command_buttons_state_change)
@@ -212,6 +206,7 @@ class MainWindow(QtWidgets.QMainWindow):
212
206
  self.actionPreferences.triggered.connect(self.preference_selected)
213
207
  self.actionQRZ_Settings.triggered.connect(self.qrz_preference_selected)
214
208
  self.actionGenerate_Cabrillo.triggered.connect(self.generate_cabrillo)
209
+ self.actionLog_Window.triggered.connect(self.launch_log_window)
215
210
  self.radioButton_run.clicked.connect(self.run_sp_buttons_clicked)
216
211
  self.radioButton_sp.clicked.connect(self.run_sp_buttons_clicked)
217
212
  self.score.setText("0")
@@ -270,7 +265,19 @@ class MainWindow(QtWidgets.QMainWindow):
270
265
  self.current_op = self.pref.get("callsign", "")
271
266
  self.read_cw_macros()
272
267
  self.clearinputs()
273
- self.rig_control = CAT("rigctld", "localhost", 4532)
268
+
269
+ self.rig_control = None
270
+ local_flrig = self.check_process("flrig")
271
+ local_rigctld = self.check_process("rigctld")
272
+ if local_flrig:
273
+ logger.debug("Found flrig")
274
+ address, port = "localhost", "12345"
275
+ self.rig_control = CAT("flrig", address, int(port))
276
+ if local_rigctld:
277
+ logger.debug("Found rigctld")
278
+ address, port = "localhost", "4532"
279
+ self.rig_control = CAT("rigctld", address, int(port))
280
+
274
281
  self.band_indicators = {
275
282
  "160": self.band_160,
276
283
  "80": self.band_80,
@@ -280,6 +287,19 @@ class MainWindow(QtWidgets.QMainWindow):
280
287
  "10": self.band_10,
281
288
  }
282
289
 
290
+ @staticmethod
291
+ def check_process(name: str) -> bool:
292
+ """checks to see if program of name is in the active process list"""
293
+ for proc in psutil.process_iter():
294
+ if bool(re.match(name, proc.name().lower())):
295
+ return True
296
+ return False
297
+
298
+ def launch_log_window(self):
299
+ """launch the Log Window"""
300
+ if not check_process("logwindow.py"):
301
+ _ = subprocess.Popen([sys.executable, WORKING_PATH + "/logwindow.py"])
302
+
283
303
  def clear_band_indicators(self):
284
304
  """Clear the indicators"""
285
305
  self.band_160.setFrameShape(QtWidgets.QFrame.NoFrame)
@@ -463,6 +483,7 @@ class MainWindow(QtWidgets.QMainWindow):
463
483
 
464
484
  def clearinputs(self):
465
485
  """Clears the text input fields and sets focus to callsign field."""
486
+ self.dupe_indicator.hide()
466
487
  self.contact = self.database.empty_contact
467
488
  self.heading_distance.setText("No Heading")
468
489
  self.dx_entity.setText("dxentity")
@@ -507,13 +528,21 @@ class MainWindow(QtWidgets.QMainWindow):
507
528
  self.contact["ContestName"] = self.contest.cabrillo_name
508
529
  self.contact["StationPrefix"] = self.pref.get("callsign", "")
509
530
  self.contact["WPXPrefix"] = calculate_wpx_prefix(self.callsign.text())
510
- # self.contact["TS"] = datetime.utcnow().isoformat(" ")[:19]
511
- # self.contact["Call"] = self.callsign.text()
512
- # self.contact["Freq"] = round(float(self.radio_state.get("vfoa", 0.0)) / 1000, 2)
513
- # self.contact["QSXFreq"] = round(
514
- # float(self.radio_state.get("vfoa", 0.0)) / 1000, 2
515
- # )
516
- # self.contact["Mode"] = self.radio_state.get("mode", "")
531
+ self.contact["IsRunQSO"] = self.radioButton_run.isChecked()
532
+ self.contact["Operator"] = self.current_op
533
+ self.contact["NetBiosName"] = socket.gethostname()
534
+ self.contact["IsOriginal"] = 1
535
+ self.contact["ID"] = uuid.uuid4().hex
536
+ self.contest.set_contact_vars(self)
537
+ self.contact["Points"] = self.contest.points(self)
538
+ debug_output = f"{self.contact}"
539
+ logger.debug(debug_output)
540
+ self.database.log_contact(self.contact)
541
+ self.n1mm.send_contact_info()
542
+ self.clearinputs()
543
+ cmd = {}
544
+ cmd["cmd"] = "UPDATELOG"
545
+ self.multicast_interface.send_as_json(cmd)
517
546
  # self.contact["ContestName"] = self.contest.name
518
547
  # self.contact["SNT"] = self.sent.text()
519
548
  # self.contact["RCV"] = self.receive.text()
@@ -539,29 +568,14 @@ class MainWindow(QtWidgets.QMainWindow):
539
568
  # self.contact["ContestNR"]
540
569
  # self.contact["isMultiplier3"]
541
570
  # self.contact["MiscText"]
542
- self.contact["IsRunQSO"] = self.radioButton_run.isChecked()
543
571
  # self.contact["ContactType"]
544
572
  # self.contact["Run1Run2"]
545
573
  # self.contact["GridSquare"]
546
- self.contact["Operator"] = self.current_op
547
574
  # self.contact["Continent"]
548
575
  # self.contact["RoverLocation"]
549
576
  # self.contact["RadioInterfaced"]
550
577
  # self.contact["NetworkedCompNr"]
551
- self.contact["NetBiosName"] = socket.gethostname()
552
- self.contact["IsOriginal"] = 1
553
- self.contact["ID"] = uuid.uuid4().hex
554
578
  # self.contact["CLAIMEDQSO"]
555
- self.contest.set_contact_vars(self)
556
- self.contact["Points"] = self.contest.points(self)
557
- debug_output = f"{self.contact}"
558
- logger.debug(debug_output)
559
- self.database.log_contact(self.contact)
560
- self.n1mm.send_contact_info()
561
- self.clearinputs()
562
- cmd = {}
563
- cmd["cmd"] = "UPDATELOG"
564
- self.multicast_interface.send_as_json(cmd)
565
579
 
566
580
  def qrz_preference_selected(self):
567
581
  """Show QRZ settings dialog"""
@@ -975,30 +989,32 @@ class MainWindow(QtWidgets.QMainWindow):
975
989
  if text[-1:] == " ":
976
990
  if stripped_text == "CW":
977
991
  self.setmode("CW")
978
- if self.rig_control.online:
979
- self.rig_control.set_mode("CW")
980
- else:
981
- self.radio_state["mode"] = "CW"
982
- self.set_window_title()
992
+ self.radio_state["mode"] = "CW"
993
+ if self.rig_control:
994
+ if self.rig_control.online:
995
+ self.rig_control.set_mode("CW")
996
+ self.set_window_title()
983
997
  self.clearinputs()
984
998
  return
985
999
  if stripped_text == "RTTY":
986
1000
  self.setmode("RTTY")
987
- if self.rig_control.online:
988
- self.rig_control.set_mode("RTTY")
989
- else:
990
- self.radio_state["mode"] = "RTTY"
991
- self.set_window_title()
1001
+ if self.rig_control:
1002
+ if self.rig_control.online:
1003
+ self.rig_control.set_mode("RTTY")
1004
+ else:
1005
+ self.radio_state["mode"] = "RTTY"
1006
+ self.set_window_title()
992
1007
  self.clearinputs()
993
1008
  return
994
1009
  if stripped_text == "SSB":
995
1010
  self.setmode("SSB")
996
- self.radio_state["mode"] = "SSB"
997
- self.set_window_title()
998
1011
  if int(self.radio_state.get("vfoa", 0)) > 10000000:
999
- self.rig_control.set_mode("USB")
1012
+ self.radio_state["mode"] = "USB"
1000
1013
  else:
1001
- self.rig_control.set_mode("LSB")
1014
+ self.radio_state["mode"] = "LSB"
1015
+ self.set_window_title()
1016
+ if self.rig_control:
1017
+ self.rig_control.set_mode(self.radio_state.get("mode"))
1002
1018
  self.clearinputs()
1003
1019
  return
1004
1020
  if stripped_text == "OPON":
@@ -1010,13 +1026,19 @@ class MainWindow(QtWidgets.QMainWindow):
1010
1026
  vfo = int(vfo * 1000)
1011
1027
  band = getband(str(vfo))
1012
1028
  self.set_band_indicator(band)
1029
+ # self.contact["Band"] = get_logged_band(str(self.radio_state.get("vfoa", 0.0)))
1013
1030
  self.radio_state["vfoa"] = vfo
1014
1031
  self.set_window_title()
1015
1032
  self.clearinputs()
1016
- self.rig_control.set_vfo(vfo)
1033
+ if self.rig_control:
1034
+ self.rig_control.set_vfo(vfo)
1017
1035
  return
1018
1036
 
1019
- self.check_callsign(text)
1037
+ self.check_callsign(stripped_text)
1038
+ if self.check_dupe(stripped_text):
1039
+ self.dupe_indicator.show()
1040
+ else:
1041
+ self.dupe_indicator.hide()
1020
1042
  _thethread = threading.Thread(
1021
1043
  target=self.check_callsign2,
1022
1044
  args=(text,),
@@ -1063,6 +1085,7 @@ class MainWindow(QtWidgets.QMainWindow):
1063
1085
 
1064
1086
  def check_callsign2(self, callsign):
1065
1087
  """Check call once entered"""
1088
+ callsign = callsign.strip()
1066
1089
  debug_lookup = f"{self.look_up}"
1067
1090
  logger.debug("%s, %s", callsign, debug_lookup)
1068
1091
  if hasattr(self.look_up, "session"):
@@ -1085,6 +1108,17 @@ class MainWindow(QtWidgets.QMainWindow):
1085
1108
  # else:
1086
1109
  # self.heading_distance.setText("Lookup failed.")
1087
1110
 
1111
+ def check_dupe(self, call: str) -> bool:
1112
+ """Checks if a callsign is a dupe on current band/mode."""
1113
+ band = float(get_logged_band(str(self.radio_state.get("vfoa", 0.0))))
1114
+ mode = self.radio_state.get("mode", "")
1115
+ debugline = f"Call: {call} Band: {band} Mode: {mode}"
1116
+ logger.debug("%s", debugline)
1117
+ result = self.database.check_dupe_on_band_mode(call, band, mode)
1118
+ debugline = f"{result}"
1119
+ logger.debug("%s", debugline)
1120
+ return result.get("isdupe", False)
1121
+
1088
1122
  def setmode(self, mode: str) -> None:
1089
1123
  """stub for when the mode changes."""
1090
1124
  if mode == "CW":
@@ -1120,22 +1154,23 @@ class MainWindow(QtWidgets.QMainWindow):
1120
1154
 
1121
1155
  def poll_radio(self):
1122
1156
  """stub"""
1123
- if self.rig_control.online:
1124
- vfo = self.rig_control.get_vfo()
1125
- mode = self.rig_control.get_mode()
1126
- if mode == "CW":
1127
- self.setmode(mode)
1128
- if mode == "LSB" or mode == "USB":
1129
- self.setmode("SSB")
1130
- if mode == "RTTY":
1131
- self.setmode("RTTY")
1132
- self.radio_state["vfoa"] = vfo
1133
- band = getband(str(vfo))
1134
- self.contact["Band"] = get_logged_band(str(vfo))
1135
- self.set_band_indicator(band)
1136
- self.radio_state["mode"] = mode
1137
- # logger.debug("VFO: %s MODE: %s", vfo, mode)
1138
- self.set_window_title()
1157
+ if self.rig_control:
1158
+ if self.rig_control.online:
1159
+ vfo = self.rig_control.get_vfo()
1160
+ mode = self.rig_control.get_mode()
1161
+ if mode == "CW":
1162
+ self.setmode(mode)
1163
+ if mode == "LSB" or mode == "USB":
1164
+ self.setmode("SSB")
1165
+ if mode == "RTTY":
1166
+ self.setmode("RTTY")
1167
+ self.radio_state["vfoa"] = vfo
1168
+ band = getband(str(vfo))
1169
+ self.contact["Band"] = get_logged_band(str(vfo))
1170
+ self.set_band_indicator(band)
1171
+ self.radio_state["mode"] = mode
1172
+ # logger.debug("VFO: %s MODE: %s", vfo, mode)
1173
+ self.set_window_title()
1139
1174
 
1140
1175
  def read_cw_macros(self) -> None:
1141
1176
  """
not1mm/data/logwindow.ui CHANGED
@@ -6,7 +6,7 @@
6
6
  <rect>
7
7
  <x>0</x>
8
8
  <y>0</y>
9
- <width>732</width>
9
+ <width>825</width>
10
10
  <height>392</height>
11
11
  </rect>
12
12
  </property>
not1mm/data/main.ui CHANGED
@@ -395,6 +395,26 @@
395
395
  </property>
396
396
  </widget>
397
397
  </item>
398
+ <item>
399
+ <widget class="QLabel" name="dupe_indicator">
400
+ <property name="enabled">
401
+ <bool>true</bool>
402
+ </property>
403
+ <property name="font">
404
+ <font>
405
+ <family>JetBrains Mono</family>
406
+ <pointsize>20</pointsize>
407
+ <bold>true</bold>
408
+ </font>
409
+ </property>
410
+ <property name="styleSheet">
411
+ <string notr="true">color: rgb(246, 10, 10);</string>
412
+ </property>
413
+ <property name="text">
414
+ <string>Dupe</string>
415
+ </property>
416
+ </widget>
417
+ </item>
398
418
  <item>
399
419
  <spacer name="horizontalSpacer_3">
400
420
  <property name="orientation">
@@ -785,8 +805,15 @@
785
805
  <addaction name="actionMode_and_Bands"/>
786
806
  <addaction name="actionDark_Mode"/>
787
807
  </widget>
808
+ <widget class="QMenu" name="menuWindow">
809
+ <property name="title">
810
+ <string>Window</string>
811
+ </property>
812
+ <addaction name="actionLog_Window"/>
813
+ </widget>
788
814
  <addaction name="menuFile"/>
789
815
  <addaction name="menuView"/>
816
+ <addaction name="menuWindow"/>
790
817
  <addaction name="menuHelp"/>
791
818
  </widget>
792
819
  <action name="actionAbout">
@@ -898,6 +925,11 @@
898
925
  <string>Generate Cabrillo</string>
899
926
  </property>
900
927
  </action>
928
+ <action name="actionLog_Window">
929
+ <property name="text">
930
+ <string>Log Window</string>
931
+ </property>
932
+ </action>
901
933
  </widget>
902
934
  <resources/>
903
935
  <connections/>
not1mm/data/settings.ui CHANGED
@@ -7,7 +7,7 @@
7
7
  <x>0</x>
8
8
  <y>0</y>
9
9
  <width>876</width>
10
- <height>636</height>
10
+ <height>638</height>
11
11
  </rect>
12
12
  </property>
13
13
  <property name="font">
@@ -299,7 +299,7 @@
299
299
  </palette>
300
300
  </property>
301
301
  <property name="placeholderText">
302
- <string>USA</string>
302
+ <string>United States</string>
303
303
  </property>
304
304
  </widget>
305
305
  </item>
@@ -343,7 +343,7 @@
343
343
  </palette>
344
344
  </property>
345
345
  <property name="placeholderText">
346
- <string>Dm13at</string>
346
+ <string>DM13at</string>
347
347
  </property>
348
348
  </widget>
349
349
  </item>
@@ -60,6 +60,7 @@ class CAT:
60
60
  target = f"http://{host}:{port}"
61
61
  logger.debug("%s", target)
62
62
  self.server = xmlrpc.client.ServerProxy(target)
63
+ self.online = True
63
64
  if self.interface == "rigctld":
64
65
  self.__initialize_rigctrld()
65
66
 
not1mm/lib/database.py CHANGED
@@ -357,6 +357,19 @@ class DataBase:
357
357
  )
358
358
  return cursor.fetchone()
359
359
 
360
+ def check_dupe_on_band_mode(self, call, band, mode) -> dict:
361
+ """Checks if a call is dupe on band/mode"""
362
+ with sqlite3.connect(self.database) as conn:
363
+ conn.row_factory = self.row_factory
364
+ cursor = conn.cursor()
365
+ print(
366
+ f"select count(*) as isdupe from dxlog where Call = '{call}' and Mode = '{mode}' and Band = '{band}';"
367
+ )
368
+ cursor.execute(
369
+ f"select count(*) as isdupe from dxlog where Call = '{call}' and Mode = '{mode}' and Band = '{band}';"
370
+ )
371
+ return cursor.fetchone()
372
+
360
373
  def fetch_points(self) -> dict:
361
374
  """return points"""
362
375
  with sqlite3.connect(self.database) as conn:
not1mm/lib/version.py CHANGED
@@ -1,2 +1,2 @@
1
1
  """It's the version"""
2
- __version__ = "23.3.23"
2
+ __version__ = "23.3.24.1"
not1mm/logwindow.py CHANGED
@@ -69,8 +69,8 @@ class MainWindow(QtWidgets.QMainWindow):
69
69
  self.contact = self.database.empty_contact
70
70
  data_path = WORKING_PATH + "/data/logwindow.ui"
71
71
  uic.loadUi(data_path, self)
72
- self.generalLog.setColumnCount(11)
73
- self.focusedLog.setColumnCount(11)
72
+ self.generalLog.setColumnCount(14)
73
+ self.focusedLog.setColumnCount(14)
74
74
  icon_path = WORKING_PATH + "/data/"
75
75
  self.checkmark = QtGui.QPixmap(icon_path + "check.png")
76
76
  self.checkicon = QtGui.QIcon()
@@ -85,23 +85,30 @@ class MainWindow(QtWidgets.QMainWindow):
85
85
  self.generalLog.setHorizontalHeaderItem(2, QtWidgets.QTableWidgetItem("Freq"))
86
86
  self.generalLog.setHorizontalHeaderItem(3, QtWidgets.QTableWidgetItem("Snt"))
87
87
  self.generalLog.setHorizontalHeaderItem(4, QtWidgets.QTableWidgetItem("Rcv"))
88
- self.generalLog.setHorizontalHeaderItem(5, QtWidgets.QTableWidgetItem("M1"))
89
- self.generalLog.setHorizontalHeaderItem(6, QtWidgets.QTableWidgetItem("ZN"))
90
- self.generalLog.setHorizontalHeaderItem(7, QtWidgets.QTableWidgetItem("M2"))
91
- self.generalLog.setHorizontalHeaderItem(8, QtWidgets.QTableWidgetItem("PFX"))
92
- self.generalLog.setHorizontalHeaderItem(9, QtWidgets.QTableWidgetItem("PTS"))
93
- self.generalLog.setHorizontalHeaderItem(10, QtWidgets.QTableWidgetItem("UUID"))
88
+ self.generalLog.setHorizontalHeaderItem(5, QtWidgets.QTableWidgetItem("SentNr"))
89
+ self.generalLog.setHorizontalHeaderItem(6, QtWidgets.QTableWidgetItem("RcvNr"))
90
+ self.generalLog.setHorizontalHeaderItem(7, QtWidgets.QTableWidgetItem("WPX"))
91
+ self.generalLog.setHorizontalHeaderItem(8, QtWidgets.QTableWidgetItem("M1"))
92
+ self.generalLog.setHorizontalHeaderItem(9, QtWidgets.QTableWidgetItem("ZN"))
93
+ self.generalLog.setHorizontalHeaderItem(10, QtWidgets.QTableWidgetItem("M2"))
94
+ self.generalLog.setHorizontalHeaderItem(11, QtWidgets.QTableWidgetItem("PFX"))
95
+ self.generalLog.setHorizontalHeaderItem(12, QtWidgets.QTableWidgetItem("PTS"))
96
+ self.generalLog.setHorizontalHeaderItem(13, QtWidgets.QTableWidgetItem("UUID"))
94
97
  self.generalLog.setColumnWidth(0, 200)
95
98
  self.generalLog.setColumnWidth(3, 50)
96
99
  self.generalLog.setColumnWidth(4, 50)
97
- self.generalLog.setColumnWidth(5, 25)
98
- self.generalLog.setColumnWidth(6, 50)
99
- self.generalLog.setColumnWidth(7, 25)
100
+ self.generalLog.setColumnWidth(5, 75)
101
+ self.generalLog.setColumnWidth(6, 75)
102
+ self.generalLog.setColumnWidth(7, 50)
100
103
  self.generalLog.setColumnWidth(8, 50)
101
104
  self.generalLog.setColumnWidth(9, 50)
105
+ self.generalLog.setColumnWidth(12, 50)
102
106
  self.generalLog.cellDoubleClicked.connect(self.double_clicked)
103
107
  self.generalLog.cellChanged.connect(self.cell_changed)
108
+ self.generalLog.setColumnHidden(9, True)
104
109
  self.generalLog.setColumnHidden(10, True)
110
+ self.generalLog.setColumnHidden(11, True)
111
+ self.generalLog.setColumnHidden(13, True)
105
112
 
106
113
  self.focusedLog.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
107
114
  self.focusedLog.customContextMenuRequested.connect(
@@ -115,23 +122,30 @@ class MainWindow(QtWidgets.QMainWindow):
115
122
  self.focusedLog.setHorizontalHeaderItem(2, QtWidgets.QTableWidgetItem("Freq"))
116
123
  self.focusedLog.setHorizontalHeaderItem(3, QtWidgets.QTableWidgetItem("Snt"))
117
124
  self.focusedLog.setHorizontalHeaderItem(4, QtWidgets.QTableWidgetItem("Rcv"))
118
- self.focusedLog.setHorizontalHeaderItem(5, QtWidgets.QTableWidgetItem("M1"))
119
- self.focusedLog.setHorizontalHeaderItem(6, QtWidgets.QTableWidgetItem("ZN"))
120
- self.focusedLog.setHorizontalHeaderItem(7, QtWidgets.QTableWidgetItem("M2"))
121
- self.focusedLog.setHorizontalHeaderItem(8, QtWidgets.QTableWidgetItem("PFX"))
122
- self.focusedLog.setHorizontalHeaderItem(9, QtWidgets.QTableWidgetItem("PTS"))
123
- self.focusedLog.setHorizontalHeaderItem(10, QtWidgets.QTableWidgetItem("UUID"))
125
+ self.focusedLog.setHorizontalHeaderItem(5, QtWidgets.QTableWidgetItem("SentNr"))
126
+ self.focusedLog.setHorizontalHeaderItem(6, QtWidgets.QTableWidgetItem("RcvNr"))
127
+ self.focusedLog.setHorizontalHeaderItem(7, QtWidgets.QTableWidgetItem("WPX"))
128
+ self.focusedLog.setHorizontalHeaderItem(8, QtWidgets.QTableWidgetItem("M1"))
129
+ self.focusedLog.setHorizontalHeaderItem(9, QtWidgets.QTableWidgetItem("ZN"))
130
+ self.focusedLog.setHorizontalHeaderItem(10, QtWidgets.QTableWidgetItem("M2"))
131
+ self.focusedLog.setHorizontalHeaderItem(11, QtWidgets.QTableWidgetItem("PFX"))
132
+ self.focusedLog.setHorizontalHeaderItem(12, QtWidgets.QTableWidgetItem("PTS"))
133
+ self.focusedLog.setHorizontalHeaderItem(13, QtWidgets.QTableWidgetItem("UUID"))
124
134
  self.focusedLog.setColumnWidth(0, 200)
125
135
  self.focusedLog.setColumnWidth(3, 50)
126
136
  self.focusedLog.setColumnWidth(4, 50)
127
- self.focusedLog.setColumnWidth(5, 25)
128
- self.focusedLog.setColumnWidth(6, 50)
129
- self.focusedLog.setColumnWidth(7, 25)
137
+ self.focusedLog.setColumnWidth(5, 75)
138
+ self.focusedLog.setColumnWidth(6, 75)
139
+ self.focusedLog.setColumnWidth(7, 50)
130
140
  self.focusedLog.setColumnWidth(8, 50)
131
141
  self.focusedLog.setColumnWidth(9, 50)
142
+ self.focusedLog.setColumnWidth(12, 50)
132
143
  # self.focusedLog.cellDoubleClicked.connect(self.double_clicked)
133
144
  # self.focusedLog.cellChanged.connect(self.cell_changed)
145
+ self.focusedLog.setColumnHidden(9, True)
134
146
  self.focusedLog.setColumnHidden(10, True)
147
+ self.focusedLog.setColumnHidden(11, True)
148
+ self.focusedLog.setColumnHidden(13, True)
135
149
  self.get_log()
136
150
  self.multicast_interface = Multicast(
137
151
  MULTICAST_GROUP, MULTICAST_PORT, INTERFACE_IP
@@ -166,10 +180,15 @@ class MainWindow(QtWidgets.QMainWindow):
166
180
  "Freq": self.generalLog.item(row, 2).text(),
167
181
  "SNT": self.generalLog.item(row, 3).text(),
168
182
  "RCV": self.generalLog.item(row, 4).text(),
169
- "ZN": self.generalLog.item(row, 6).text(),
170
- "WPXPrefix": self.generalLog.item(row, 8).text().upper(),
171
- "Points": self.generalLog.item(row, 9).text(),
172
- "ID": self.generalLog.item(row, 10).text(),
183
+ "SentNr": self.generalLog.item(row, 5).text(),
184
+ "NR": self.generalLog.item(row, 6).text(),
185
+ "WPXPrefix": self.generalLog.item(row, 7).text(),
186
+ "IsMultiplier1": self.generalLog.item(row, 8).text(),
187
+ "ZN": self.generalLog.item(row, 9).text(),
188
+ "IsMultiplier2": self.generalLog.item(row, 10).text().upper(),
189
+ "CountryPrefix": self.generalLog.item(row, 11).text(),
190
+ "Points": self.generalLog.item(row, 12).text(),
191
+ "ID": self.generalLog.item(row, 13).text(),
173
192
  }
174
193
  self.database.change_contact(db_record)
175
194
  self.get_log()
@@ -182,19 +201,19 @@ class MainWindow(QtWidgets.QMainWindow):
182
201
  """Show edit contact dialog"""
183
202
  logger.debug("Opening EditContact dialog")
184
203
  item = self.focusedLog.itemAt(clicked_cell)
185
- uuid = self.focusedLog.item(item.row(), 10).text()
204
+ uuid = self.focusedLog.item(item.row(), 13).text()
186
205
  self.edit_contact(uuid)
187
206
 
188
207
  def edit_contact_selected(self, clicked_cell):
189
208
  """Show edit contact dialog"""
190
209
  logger.debug("Opening EditContact dialog")
191
210
  item = self.generalLog.itemAt(clicked_cell)
192
- uuid = self.generalLog.item(item.row(), 10).text()
211
+ uuid = self.generalLog.item(item.row(), 13).text()
193
212
  self.edit_contact(uuid)
194
213
 
195
214
  def edit_contact(self, uuid):
196
215
  """Show edit contact dialog"""
197
-
216
+ logger.debug("Edit: %s", uuid)
198
217
  self.edit_contact_dialog = EditContact(WORKING_PATH)
199
218
  self.edit_contact_dialog.accepted.connect(self.save_edited_contact)
200
219
  self.contact = self.database.fetch_contact_by_uuid(uuid)
@@ -337,17 +356,32 @@ class MainWindow(QtWidgets.QMainWindow):
337
356
  4,
338
357
  QtWidgets.QTableWidgetItem(str(log_item.get("RCV", ""))),
339
358
  )
359
+ self.generalLog.setItem(
360
+ number_of_rows,
361
+ 5,
362
+ QtWidgets.QTableWidgetItem(str(log_item.get("SentNr", ""))),
363
+ )
364
+ self.generalLog.setItem(
365
+ number_of_rows,
366
+ 6,
367
+ QtWidgets.QTableWidgetItem(str(log_item.get("NR", ""))),
368
+ )
369
+ self.generalLog.setItem(
370
+ number_of_rows,
371
+ 7,
372
+ QtWidgets.QTableWidgetItem(str(log_item.get("WPXPrefix", ""))),
373
+ )
340
374
  item = QtWidgets.QTableWidgetItem()
341
375
  if log_item.get("IsMultiplier1", False):
342
376
  item.setIcon(self.checkicon)
343
377
  self.generalLog.setItem(
344
378
  number_of_rows,
345
- 5,
379
+ 8,
346
380
  item,
347
381
  )
348
382
  self.generalLog.setItem(
349
383
  number_of_rows,
350
- 6,
384
+ 9,
351
385
  QtWidgets.QTableWidgetItem(str(log_item.get("ZN", ""))),
352
386
  )
353
387
  item = QtWidgets.QTableWidgetItem()
@@ -355,22 +389,22 @@ class MainWindow(QtWidgets.QMainWindow):
355
389
  item.setIcon(self.checkicon)
356
390
  self.generalLog.setItem(
357
391
  number_of_rows,
358
- 7,
392
+ 10,
359
393
  item,
360
394
  )
361
395
  self.generalLog.setItem(
362
396
  number_of_rows,
363
- 8,
364
- QtWidgets.QTableWidgetItem(str(log_item.get("WPXPrefix", ""))),
397
+ 11,
398
+ QtWidgets.QTableWidgetItem(str(log_item.get("CountryPrefix", ""))),
365
399
  )
366
400
  self.generalLog.setItem(
367
401
  number_of_rows,
368
- 9,
402
+ 12,
369
403
  QtWidgets.QTableWidgetItem(str(log_item.get("Points", ""))),
370
404
  )
371
405
  self.generalLog.setItem(
372
406
  number_of_rows,
373
- 10,
407
+ 13,
374
408
  QtWidgets.QTableWidgetItem(str(log_item.get("ID", ""))),
375
409
  )
376
410
  self.table_loading = False
@@ -437,17 +471,34 @@ class MainWindow(QtWidgets.QMainWindow):
437
471
  4,
438
472
  QtWidgets.QTableWidgetItem(str(log_item.get("RCV", ""))),
439
473
  )
474
+
475
+ self.focusedLog.setItem(
476
+ number_of_rows,
477
+ 5,
478
+ QtWidgets.QTableWidgetItem(str(log_item.get("SentNr", ""))),
479
+ )
480
+ self.focusedLog.setItem(
481
+ number_of_rows,
482
+ 6,
483
+ QtWidgets.QTableWidgetItem(str(log_item.get("NR", ""))),
484
+ )
485
+ self.focusedLog.setItem(
486
+ number_of_rows,
487
+ 7,
488
+ QtWidgets.QTableWidgetItem(str(log_item.get("WPXPrefix", ""))),
489
+ )
490
+
440
491
  item = QtWidgets.QTableWidgetItem()
441
492
  if log_item.get("IsMultiplier1", False):
442
493
  item.setIcon(self.checkicon)
443
494
  self.focusedLog.setItem(
444
495
  number_of_rows,
445
- 5,
496
+ 8,
446
497
  item,
447
498
  )
448
499
  self.focusedLog.setItem(
449
500
  number_of_rows,
450
- 6,
501
+ 9,
451
502
  QtWidgets.QTableWidgetItem(str(log_item.get("ZN", ""))),
452
503
  )
453
504
  item = QtWidgets.QTableWidgetItem()
@@ -455,22 +506,22 @@ class MainWindow(QtWidgets.QMainWindow):
455
506
  item.setIcon(self.checkicon)
456
507
  self.focusedLog.setItem(
457
508
  number_of_rows,
458
- 7,
509
+ 10,
459
510
  item,
460
511
  )
461
512
  self.focusedLog.setItem(
462
513
  number_of_rows,
463
- 8,
464
- QtWidgets.QTableWidgetItem(str(log_item.get("WPXPrefix", ""))),
514
+ 11,
515
+ QtWidgets.QTableWidgetItem(str(log_item.get("CountryPrefix", ""))),
465
516
  )
466
517
  self.focusedLog.setItem(
467
518
  number_of_rows,
468
- 9,
519
+ 12,
469
520
  QtWidgets.QTableWidgetItem(str(log_item.get("Points", ""))),
470
521
  )
471
522
  self.focusedLog.setItem(
472
523
  number_of_rows,
473
- 10,
524
+ 13,
474
525
  QtWidgets.QTableWidgetItem(str(log_item.get("ID", ""))),
475
526
  )
476
527
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: not1mm
3
- Version: 23.3.23
3
+ Version: 23.3.24.1
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
@@ -43,6 +43,9 @@ Requires-Dist: xmltodict
43
43
  - [Other uses for the call field](#other-uses-for-the-call-field)
44
44
  - [Log Display](#log-display)
45
45
  - [Editing a contact](#editing-a-contact)
46
+ - [Cabrillo](#cabrillo)
47
+ - [Dupe checking](#dupe-checking)
48
+ - [CAT](#cat)
46
49
 
47
50
  ## What and why is Not1MM
48
51
 
@@ -71,6 +74,7 @@ Feature complete.
71
74
 
72
75
  ## Changes of note
73
76
 
77
+ - [23-3-24] Added dupe checking. Added CAT check for flrig or rigctld. Added online flag for flrig.
74
78
  - [23-3-23] Added most of Cabrillo generation. Plan to test it this weekends CQ WPX SSB.
75
79
  - [23-3-22] Add prefill of serial nr. set OP call on startup. Set IsMultiplier1 new unique wpx. Add OP and contest name to window title. and stuff.
76
80
  - [23-3-21] Worked on CQ WPX SSB plugin.
@@ -177,3 +181,25 @@ You can double click a cell in the log window and edit its contents.
177
181
  You can also Right-Click on a cell to bring up the edit dialog.
178
182
 
179
183
  ![Log Display Window](https://github.com/mbridak/not1mm/raw/master/pic/edit_dialog.png)
184
+
185
+ ## Cabrillo
186
+
187
+ Kinda working in a forced way. Need to generalize it for multiple contests. Click on `File` then `Generate Cabrillo`
188
+
189
+ There's a few more fields I have to code in. But it's enough for me to edit and submit.
190
+
191
+ The file will be placed in your home directory. The name will be in the format of:
192
+
193
+ `StationCall`_`ContestName`.log
194
+
195
+ So for me it would be:
196
+
197
+ K6GTE_CQ-WPX-SSB.log
198
+
199
+ ## Dupe checking
200
+
201
+ Added dupe checking. Big Red 'Dupe' will appear if it's a dupe...
202
+
203
+ ## CAT
204
+
205
+ Added rudimentary check for running instance of flrig or rigctld. It will connect to whichever it finds first.
@@ -1,6 +1,6 @@
1
1
  not1mm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- not1mm/__main__.py,sha256=N7VHt7BbOOspGg-jgKFbpIJleixgzl_ojUWqgHX84bI,53242
3
- not1mm/logwindow.py,sha256=xNfwkyMxUJj1v44TALoij_ESpN38mxOQ4qDbmLdeN5c,22565
2
+ not1mm/__main__.py,sha256=aKa3xzSdqtR-8S9j4g-DEgIaqy1G7e_DkPFxby4doFE,54896
3
+ not1mm/logwindow.py,sha256=yjBaHKlAUA3nDeZdBIT6-IGsHi-PZGuV1Kgolxunurk,24930
4
4
  not1mm/test.py,sha256=sCAd6OZQlakGm2gMbjhwZ17UyI-Y5L2CCqsYymx7IPQ,3906
5
5
  not1mm/data/Combinear.qss,sha256=SKqM0g8GvNXay1ovgtwCw3Egt0eLfN5P3iTREInC1eE,16590
6
6
  not1mm/data/JetBrainsMono-Regular.ttf,sha256=UOHctAKY_PzCGh7zy-6f6egnCcSK0wzmF0csBqO9lDY,203952
@@ -16,16 +16,16 @@ not1mm/data/k6gte-not1mm.desktop,sha256=bSiSG7PzGygv0bBaF7Nf48PApVyrobSBVNk7j7wR
16
16
  not1mm/data/k6gte.not1mm-128.png,sha256=vWqt3Cgsaguj-BBiIoSJApzzhisPxldM8HZQbZ05z6Y,4010
17
17
  not1mm/data/k6gte.not1mm-32.png,sha256=yucSwzlmqv3NegdWUvPvZzSgP7G22Ky3se8TWRXvzfI,1108
18
18
  not1mm/data/k6gte.not1mm-64.png,sha256=1KQvk0WBckUds79BvIFUt-KdTwQKKvTz6hiJu8MiT68,2152
19
- not1mm/data/logwindow.ui,sha256=cS1eKjalLRTV1vuQc3Y1M6VL_-MmnMacxCA-Iw2L-Uo,970
20
- not1mm/data/main.ui,sha256=_xHzBgIEPQns1noojq7ES3YiYKi8jkI6ME_Cyk-kzYg,28298
19
+ not1mm/data/logwindow.ui,sha256=_-wobHhIjALzCswyXIrqNadnLdc88eay1GNF23a-Qh0,970
20
+ not1mm/data/main.ui,sha256=9bE0X3QT6qeHHditMK3jMBTzQnflNUNjbkIweJStIq0,29313
21
21
  not1mm/data/opon.ui,sha256=6r9_6ORGfNqwOnpzQjaJ1tWP_81amuXqLYlx1hHgdME,2018
22
22
  not1mm/data/reddot.png,sha256=M33jEMoU8W4rQ4_MVyzzKxDPDte1ypKBch5VnUMNLKE,565
23
- not1mm/data/settings.ui,sha256=gR8G7DJzUaKXEPL0TBR2MGFZkheciE35nh4gErXqiYc,35548
23
+ not1mm/data/settings.ui,sha256=-uEW4fQWolcv6QrNVpQ_TYhpJLCnhnCiggVSMR27cpA,35558
24
24
  not1mm/data/use_qrz_dialog.ui,sha256=sXV1K1tsmYEF7K8nnV_t_UR3k1PzQp43CgvX4KSnR94,4554
25
25
  not1mm/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
- not1mm/lib/cat_interface.py,sha256=mYkDV80gMDuchkEMKyf7geroplGJ1Ne8cEBoH9nrq3o,10311
26
+ not1mm/lib/cat_interface.py,sha256=5EhVLWfMOvg-zLkLTGtNLJj2VohxG48uaMCelEdL1wg,10342
27
27
  not1mm/lib/cwinterface.py,sha256=77I7RFtrIljuuWna3mjkjxaPSM1kGaPV4duPkoiT8wA,1772
28
- not1mm/lib/database.py,sha256=3sQ9KjXflzWlZE96YDZfAFnSseHocHEfBoJe0VZag8Q,15501
28
+ not1mm/lib/database.py,sha256=HBGiZI4cHk8SLhqzzLEvBztvmbk5LI4jaiPS9quJTZQ,16105
29
29
  not1mm/lib/edit_contact.py,sha256=YwuX-BuIa7AuPtLRENs4jTzxOrtk6MCxZj3BR_bDPW8,357
30
30
  not1mm/lib/edit_macro.py,sha256=lyToZb1nmcONNFh6W35NzYHLU48gbAs2_OsnuRQGHck,559
31
31
  not1mm/lib/edit_opon.py,sha256=GqAOJMiC265_4YRVbkT1PflBuCa4HiCNfRhq8-J6ZVY,363
@@ -35,7 +35,7 @@ not1mm/lib/lookup.py,sha256=4OiWZWc3smcB0lqLk4WTs1U3i2k8yZFsX_1OoCGlaWc,13916
35
35
  not1mm/lib/multicast.py,sha256=4-vesMxt5n_pDk2oYnL7R_exxLl9C197t569AM2lrD4,1954
36
36
  not1mm/lib/n1mm.py,sha256=bK5d21Yfn6xRpQcu2RdpL2zR8lOlRWOadD6Ai4_lFdc,4434
37
37
  not1mm/lib/qrz_dialog.py,sha256=fLFBkvQ9cuIqKk0-1yl5OFuQ40n904fNi_Vt23je99E,350
38
- not1mm/lib/version.py,sha256=lLe0Q6AexqjCthMfOH6rxe5MAbxePj9_cdI0VJ3ce2A,47
38
+ not1mm/lib/version.py,sha256=fOBHG97a4Ep1HAdcuBFWWrv7DF_4o_tJZCZXqguMeAs,49
39
39
  not1mm/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
40
  not1mm/plugins/arrl_dx_cw.py,sha256=VRP-H65SgEaCff6efF85DzU5KMoECkLQad4DraNgUec,1382
41
41
  not1mm/plugins/arrl_dx_phone.py,sha256=9uLZWogzTfLm0SjmcG149dTG_GjDbbVhdInl4Uz7Fck,1385
@@ -48,9 +48,9 @@ not1mm/plugins/cqww_dx_cw.py,sha256=eKBIQ8WdJXlGtSTDds7BuoFPpn3odEoiiu_RIQQLHb8,
48
48
  not1mm/plugins/cqww_dx_ssb.py,sha256=7lPh-VH8nb-qQ-9wYx5pd6Es_qSbiL3ETHpibqhH_r0,2090
49
49
  not1mm/plugins/general_logging.py,sha256=UwHO3g84bghuIaa1JyqMeMFVfmMRvLgV3NQY3zZWW-w,2077
50
50
  not1mm/plugins/winter_field_day.py,sha256=L7co3YEoKt-jaAFJfGw_Y3-uK-G6eQNsOQSCEkT5U24,1631
51
- not1mm-23.3.23.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
52
- not1mm-23.3.23.dist-info/METADATA,sha256=CaXyCAMZ6DC6tivrW_4wA_-fYqgFC8f1hl9tHddw_Xc,8092
53
- not1mm-23.3.23.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
54
- not1mm-23.3.23.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
55
- not1mm-23.3.23.dist-info/top_level.txt,sha256=0YmTxEcDzQlzXub-lXASvoLpg_mt1c2thb5cVkDf5J4,7
56
- not1mm-23.3.23.dist-info/RECORD,,
51
+ not1mm-23.3.24.1.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
52
+ not1mm-23.3.24.1.dist-info/METADATA,sha256=uULB7l6FwzkNN4KUWg3RIC0cFdl7prAeE6FyfbyK9eQ,8860
53
+ not1mm-23.3.24.1.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
54
+ not1mm-23.3.24.1.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
55
+ not1mm-23.3.24.1.dist-info/top_level.txt,sha256=0YmTxEcDzQlzXub-lXASvoLpg_mt1c2thb5cVkDf5J4,7
56
+ not1mm-23.3.24.1.dist-info/RECORD,,