not1mm 25.3.24__py3-none-any.whl → 25.3.25__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/statistics.ui CHANGED
@@ -10,34 +10,18 @@
10
10
  <height>192</height>
11
11
  </rect>
12
12
  </property>
13
+ <property name="font">
14
+ <font>
15
+ <family>JetBrains Mono ExtraLight</family>
16
+ </font>
17
+ </property>
13
18
  <property name="windowTitle">
14
19
  <string>Stats</string>
15
20
  </property>
16
21
  <widget class="QWidget" name="dockWidgetContents">
17
22
  <layout class="QGridLayout" name="gridLayout">
18
23
  <item row="1" column="2">
19
- <widget class="QTableWidget" name="tableWidget">
20
- <column>
21
- <property name="text">
22
- <string>Band</string>
23
- </property>
24
- </column>
25
- <column>
26
- <property name="text">
27
- <string>QSO's</string>
28
- </property>
29
- </column>
30
- <column>
31
- <property name="text">
32
- <string>Calls</string>
33
- </property>
34
- </column>
35
- <column>
36
- <property name="text">
37
- <string>Points</string>
38
- </property>
39
- </column>
40
- </widget>
24
+ <widget class="QTableWidget" name="tableWidget"/>
41
25
  </item>
42
26
  </layout>
43
27
  </widget>
not1mm/lib/version.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """It's the version"""
2
2
 
3
- __version__ = "25.3.24"
3
+ __version__ = "25.3.25"
not1mm/logwindow.py CHANGED
@@ -4,7 +4,7 @@ not1mm Contest logger
4
4
  Email: michael.bridak@gmail.com
5
5
  GPL V3
6
6
  Class: LogWindow
7
- Purpose: Onscreen widget to show and edit logged contacts.
7
+ Purpose: Onscreen widget to show and edit logged contacts.
8
8
  """
9
9
  # pylint: disable=no-name-in-module, unused-import, no-member, c-extension-no-member
10
10
  # pylint: disable=logging-fstring-interpolation, too-many-lines
@@ -164,6 +164,11 @@ class LogWindow(QDockWidget):
164
164
  log.verticalHeader().setVisible(False)
165
165
 
166
166
  self.get_log()
167
+ self.generalLog.resizeColumnsToContents()
168
+ self.generalLog.resizeRowsToContents()
169
+ self.focusedLog.resizeColumnsToContents()
170
+ self.focusedLog.resizeRowsToContents()
171
+
167
172
  cmd = {}
168
173
  cmd["cmd"] = "GETCOLUMNS"
169
174
  self.message.emit(cmd)
@@ -927,6 +932,10 @@ class LogWindow(QDockWidget):
927
932
  )
928
933
  self.generalLog.blockSignals(False)
929
934
  self.focusedLog.blockSignals(False)
935
+ self.generalLog.resizeColumnsToContents()
936
+ self.generalLog.resizeRowsToContents()
937
+ self.focusedLog.resizeColumnsToContents()
938
+ self.focusedLog.resizeRowsToContents()
930
939
 
931
940
  def show_like_calls(self, call: str) -> None:
932
941
  """
not1mm/statistics.py CHANGED
@@ -8,7 +8,7 @@ from PyQt6 import uic, QtWidgets
8
8
  from PyQt6.QtWidgets import QDockWidget
9
9
  from PyQt6.QtCore import pyqtSignal, QTimer
10
10
 
11
- # from PyQt6.QtGui import QColorConstants, QPalette, QColor
11
+ from PyQt6.QtGui import QColorConstants, QPalette, QColor
12
12
 
13
13
  import not1mm.fsutils as fsutils
14
14
  from not1mm.lib.database import DataBase
@@ -75,6 +75,46 @@ class StatsWindow(QDockWidget):
75
75
  def setDarkMode(self, dark: bool) -> None:
76
76
  """Forces a darkmode palette."""
77
77
 
78
+ if dark:
79
+ darkPalette = QPalette()
80
+ darkColor = QColor(56, 56, 56)
81
+ disabledColor = QColor(127, 127, 127)
82
+ darkPalette.setColor(QPalette.ColorRole.Window, darkColor)
83
+ darkPalette.setColor(QPalette.ColorRole.WindowText, QColorConstants.White)
84
+ darkPalette.setColor(QPalette.ColorRole.Base, QColor(45, 45, 45))
85
+ darkPalette.setColor(QPalette.ColorRole.AlternateBase, darkColor)
86
+ darkPalette.setColor(QPalette.ColorRole.Text, QColorConstants.White)
87
+ darkPalette.setColor(QPalette.ColorRole.Button, darkColor)
88
+ darkPalette.setColor(QPalette.ColorRole.ButtonText, QColorConstants.White)
89
+ darkPalette.setColor(QPalette.ColorRole.BrightText, QColorConstants.Red)
90
+ darkPalette.setColor(QPalette.ColorRole.Link, QColor(42, 130, 218))
91
+ darkPalette.setColor(QPalette.ColorRole.Highlight, QColor(42, 130, 218))
92
+ darkPalette.setColor(
93
+ QPalette.ColorRole.HighlightedText, QColorConstants.Black
94
+ )
95
+ darkPalette.setColor(
96
+ QPalette.ColorGroup.Disabled,
97
+ QPalette.ColorRole.ButtonText,
98
+ disabledColor,
99
+ )
100
+ darkPalette.setColor(
101
+ QPalette.ColorGroup.Disabled,
102
+ QPalette.ColorRole.HighlightedText,
103
+ disabledColor,
104
+ )
105
+ darkPalette.setColor(
106
+ QPalette.ColorGroup.Disabled,
107
+ QPalette.ColorRole.Text,
108
+ disabledColor,
109
+ )
110
+
111
+ self.setPalette(darkPalette)
112
+ self.current_palette = darkPalette
113
+ else:
114
+ palette = self.style().standardPalette()
115
+ self.setPalette(palette)
116
+ self.current_palette = palette
117
+
78
118
  def load_pref(self) -> None:
79
119
  """
80
120
  Load preference file to get current db filename and sets the initial darkmode state.
@@ -124,27 +164,27 @@ class StatsWindow(QDockWidget):
124
164
  for band in result:
125
165
  query = f"select count(*) as qs, count(DISTINCT(Call)) as calls, sum(Points) as points from DXLOG where ContestNR = {self.database.current_contest} and Band = '{band['band']}';"
126
166
  result = self.database.exec_sql(query)
127
- item = QtWidgets.QTableWidgetItem(str(band["band"]))
167
+ item = QtWidgets.QTableWidgetItem(str(band.get("band", "")))
128
168
  item.setTextAlignment(0x0002)
129
169
  self.tableWidget.setItem(row, 0, item)
130
- item = QtWidgets.QTableWidgetItem(str(result["qs"]))
170
+ item = QtWidgets.QTableWidgetItem(str(result.get("qs", "0")))
131
171
  item.setTextAlignment(0x0002)
132
172
  self.tableWidget.setItem(row, 1, item)
133
- item = QtWidgets.QTableWidgetItem(str(result["calls"]))
173
+ item = QtWidgets.QTableWidgetItem(str(result.get("calls", "0")))
134
174
  item.setTextAlignment(0x0002)
135
175
  self.tableWidget.setItem(row, 2, item)
136
- item = QtWidgets.QTableWidgetItem(str(result["points"]))
176
+ item = QtWidgets.QTableWidgetItem(str(result.get("points", "0")))
137
177
  item.setTextAlignment(0x0002)
138
178
  self.tableWidget.setItem(row, 6, item)
139
179
  query = f"select sum(sortedmode.mode == 'CW') as CW, sum(sortedmode.mode == 'PH') as PH, sum(sortedmode.mode == 'DI') as DI from (select CASE Mode WHEN 'LSB' THEN 'PH' WHEN 'USB' THEN 'PH' WHEN 'CW' THEN 'CW' WHEN 'RTTY' THEN 'DI' ELSE 'OTHER' END mode from DXLOG where ContestNR = {self.database.current_contest} and Band = '{band['band']}') as sortedmode;"
140
180
  result = self.database.exec_sql(query)
141
- item = QtWidgets.QTableWidgetItem(str(result["CW"]))
181
+ item = QtWidgets.QTableWidgetItem(str(result.get("CW", "0")))
142
182
  item.setTextAlignment(0x0002)
143
183
  self.tableWidget.setItem(row, 3, item)
144
- item = QtWidgets.QTableWidgetItem(str(result["PH"]))
184
+ item = QtWidgets.QTableWidgetItem(str(result.get("PH", "0")))
145
185
  item.setTextAlignment(0x0002)
146
186
  self.tableWidget.setItem(row, 4, item)
147
- item = QtWidgets.QTableWidgetItem(str(result["DI"]))
187
+ item = QtWidgets.QTableWidgetItem(str(result.get("DI", "0")))
148
188
  item.setTextAlignment(0x0002)
149
189
  self.tableWidget.setItem(row, 5, item)
150
190
 
@@ -154,25 +194,25 @@ class StatsWindow(QDockWidget):
154
194
  item = QtWidgets.QTableWidgetItem("TOTAL")
155
195
  item.setTextAlignment(0x0002)
156
196
  self.tableWidget.setItem(row, 0, item)
157
- item = QtWidgets.QTableWidgetItem(str(result["qs"]))
197
+ item = QtWidgets.QTableWidgetItem(str(result.get("qs", "0")))
158
198
  item.setTextAlignment(0x0002)
159
199
  self.tableWidget.setItem(row, 1, item)
160
- item = QtWidgets.QTableWidgetItem(str(result["calls"]))
200
+ item = QtWidgets.QTableWidgetItem(str(result.get("calls", "0")))
161
201
  item.setTextAlignment(0x0002)
162
202
  self.tableWidget.setItem(row, 2, item)
163
- item = QtWidgets.QTableWidgetItem(str(result["points"]))
203
+ item = QtWidgets.QTableWidgetItem(str(result.get("points", "0")))
164
204
  item.setTextAlignment(0x0002)
165
205
  self.tableWidget.setItem(row, 6, item)
166
206
 
167
207
  query = f"select sum(sortedmode.mode == 'CW') as CW, sum(sortedmode.mode == 'PH') as PH, sum(sortedmode.mode == 'DI') as DI from (select CASE Mode WHEN 'LSB' THEN 'PH' WHEN 'USB' THEN 'PH' WHEN 'CW' THEN 'CW' WHEN 'RTTY' THEN 'DI' ELSE 'OTHER' END mode from DXLOG where ContestNR = {self.database.current_contest}) as sortedmode;"
168
208
  result = self.database.exec_sql(query)
169
- item = QtWidgets.QTableWidgetItem(str(result["CW"]))
209
+ item = QtWidgets.QTableWidgetItem(str(result.get("CW", "0")))
170
210
  item.setTextAlignment(0x0002)
171
211
  self.tableWidget.setItem(row, 3, item)
172
- item = QtWidgets.QTableWidgetItem(str(result["PH"]))
212
+ item = QtWidgets.QTableWidgetItem(str(result.get("PH", "0")))
173
213
  item.setTextAlignment(0x0002)
174
214
  self.tableWidget.setItem(row, 4, item)
175
- item = QtWidgets.QTableWidgetItem(str(result["DI"]))
215
+ item = QtWidgets.QTableWidgetItem(str(result.get("DI", "0")))
176
216
  item.setTextAlignment(0x0002)
177
217
  self.tableWidget.setItem(row, 5, item)
178
218
  self.tableWidget.resizeColumnsToContents()
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: not1mm
3
- Version: 25.3.24
3
+ Version: 25.3.25
4
4
  Summary: NOT1MM Logger
5
5
  Author-email: Michael Bridak <michael.bridak@gmail.com>
6
- License-Expression: GPL-3.0-or-later
6
+ License: GPL-3.0-or-later
7
7
  Project-URL: Homepage, https://github.com/mbridak/not1mm
8
8
  Project-URL: Bug Tracker, https://github.com/mbridak/not1mm/issues
9
9
  Classifier: Programming Language :: Python :: 3
@@ -247,6 +247,7 @@ generated, 'cause I'm lazy, list of those who've submitted PR's.
247
247
 
248
248
  ## Recent Changes
249
249
 
250
+ - [25-3-25] Use safer dict key access in the stats window.
250
251
  - [25-3-24] Add CW, PH, DI counts to the statistics window.
251
252
  - [25-3-23] Add a statistics window.
252
253
  - [25-3-19-1] Add EA His Maj King of Spain SSB.
@@ -3,12 +3,12 @@ not1mm/__main__.py,sha256=TKA6hSE2A2SZpXvMySGXNVgfE3UKhvzSC8tSzzVZTBs,151537
3
3
  not1mm/bandmap.py,sha256=mdSK6oj8plEmr6WVYkzPTCfsHWKl9lea3R14cmRsAI4,31531
4
4
  not1mm/checkwindow.py,sha256=VFAcKYTcoWhmIf91chwY6tyao9FQMWPiUkgDDkkWaog,9670
5
5
  not1mm/fsutils.py,sha256=ukHKxKTeNKxKwqRaJjtzRShL4X5Xl0jRBbADyy3Ifp8,1701
6
- not1mm/logwindow.py,sha256=TvpzQTNB92hISlUO3iWBqtlPmlebdhOkAArx0DNGcOs,43966
6
+ not1mm/logwindow.py,sha256=QNKmWDw-k4G6Qugvb-y8dlz9LoO0c-u-XlTowH7h8vA,44354
7
7
  not1mm/lookupservice.py,sha256=GkY_qHZfrW6XHf8upIoaG4hCFqm0fg6Ganu9ConGrIc,2628
8
8
  not1mm/radio.py,sha256=_b-tSFuDLoBKnABxrsafGQu2p33U-KOubY7-qgLV2yg,5408
9
9
  not1mm/ratewindow.py,sha256=UVkQt0nSB2COQlJQV6tFtsz4mP7d-Wj9jcjqvZw934Q,9891
10
10
  not1mm/rtc_service.py,sha256=axAwnCBuTr-QL0YwXtWvg9tjwhcFsiiEZFgFjOofX6k,2816
11
- not1mm/statistics.py,sha256=tQFg30ACVvr70d86-iESoogzrQ_oigPbqT-IZm1srpo,7659
11
+ not1mm/statistics.py,sha256=QbzHck56doO2Bi7b_UHWeHtOANBzRlotAG0sp5VaBU4,9597
12
12
  not1mm/test.py,sha256=RN71m2S9MPIOJMaoCi0wZhwEhpEZunvtosZxaKahRB4,101
13
13
  not1mm/vfo.py,sha256=ggPyWtxMbdSE5RwdK0nDRwDNqOxdpb_pvnzZdbzZVQE,11136
14
14
  not1mm/voice_keying.py,sha256=HZImqC5NgnyW2nknNYQ3b7I8-6S_hxpq5G4RcIRXn_k,3005
@@ -47,7 +47,7 @@ not1mm/data/rttymacros.txt,sha256=FQ2BnAChXF5w-tzmMnBOE8IgvviAEsd3cmmz4b8GOPk,46
47
47
  not1mm/data/settings.ui,sha256=rZmhUjFAyCA8B-cd4Ljrvz5qC3NKy6S3feYVh5WX-tw,40084
48
48
  not1mm/data/splash.png,sha256=85_BQotR1q24uCthrKm4SB_6ZOMwRjR-Jdp1XBHSTyg,5368
49
49
  not1mm/data/ssbmacros.txt,sha256=Q7MrkaBntbeg4yQSoMv3NLoM24V4y_RVati3_wmb0mY,464
50
- not1mm/data/statistics.ui,sha256=8hW3SxJzB4nsxo1DcJTF9oH4dPjvxo27qutAQsgl0dY,1073
50
+ not1mm/data/statistics.ui,sha256=JRpf-On3FsW-halZsfo0QOaiSi1m4tW9HWD3dAgLp0c,722
51
51
  not1mm/data/vfo.ui,sha256=-fmFMJLPDz0jmsOdCljL7vfmlAQgwyHkGZjomlIN3gc,2076
52
52
  not1mm/data/phonetics/0.wav,sha256=0OpYiR-3MK6fVHE6MB-HeOxSAPiDNMjqvx5JcIZtsQk,42590
53
53
  not1mm/data/phonetics/1.wav,sha256=OEAavA8cfVxFZwaT0HY9Wg9NAGEPKBhwhEdzGXkQs_U,30248
@@ -118,7 +118,7 @@ not1mm/lib/plugin_common.py,sha256=D1OBjyLmX7zuSPqgTCmHwXzAKA12J_zTQItvyIem-4Y,1
118
118
  not1mm/lib/select_contest.py,sha256=WsptLuwkouIHeocJL3oZ6-eUfEnhpwdc-x7eMZ_TIVM,359
119
119
  not1mm/lib/settings.py,sha256=mXffn8Xaj5KATPQinNBR0V5DbHWQPsRfh24_axWGYuk,15254
120
120
  not1mm/lib/super_check_partial.py,sha256=hwT2NRwobu0PLDyw6ltmbmcAtGBD02CKGFbgGWjXMqA,2334
121
- not1mm/lib/version.py,sha256=TwlZeMOON2yGjP4amQ9-MNVirRzyqwv4djYoZb27rkY,48
121
+ not1mm/lib/version.py,sha256=iGX9cXipuh8cDIlxf45x_-fcEbFJuZ-zyOC--oh47QM,48
122
122
  not1mm/lib/versiontest.py,sha256=8vDNptuBBunn-1IGkjNaquehqBYUJyjrPSF8Igmd4_Y,1286
123
123
  not1mm/plugins/10_10_fall_cw.py,sha256=P63dEhRmvsEV7ixHYg-qhs5zzj0_DJXjjPHQBQr8Wwg,14731
124
124
  not1mm/plugins/10_10_spring_cw.py,sha256=S_z-KbExH4_kfRbKo07zM-iVlJUKxFwzbm6LRnXYyNU,14734
@@ -173,9 +173,9 @@ not1mm/plugins/ref_ssb.py,sha256=tGK5XeFrc3z7l8OViG9DM3rc4HLUBF9S3SUkaAPrjQk,215
173
173
  not1mm/plugins/stew_perry_topband.py,sha256=LHt0WnWMRS_m5nO9BOIQs0kO38M6x-k4eaA4nbEqDVA,15353
174
174
  not1mm/plugins/weekly_rtty.py,sha256=4gfFg25KGkU9tKmwslHLc38qPAXuRGWNX48n582NC7w,20078
175
175
  not1mm/plugins/winter_field_day.py,sha256=jLgEr95hJCZoc3Fi95PiNeB06thPQHFI3zOHmR6NprE,15234
176
- not1mm-25.3.24.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
177
- not1mm-25.3.24.dist-info/METADATA,sha256=4mn9fR27nhlDe5Od0K68ySALpGrIapLrzohw9Fmtr9w,37303
178
- not1mm-25.3.24.dist-info/WHEEL,sha256=DK49LOLCYiurdXXOXwGJm6U4DkHkg4lcxjhqwRa0CP4,91
179
- not1mm-25.3.24.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
180
- not1mm-25.3.24.dist-info/top_level.txt,sha256=0YmTxEcDzQlzXub-lXASvoLpg_mt1c2thb5cVkDf5J4,7
181
- not1mm-25.3.24.dist-info/RECORD,,
176
+ not1mm-25.3.25.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
177
+ not1mm-25.3.25.dist-info/METADATA,sha256=ZetHWRshGEySfM-MlL4O3l4R_Z9EXlE2X2UxVELhr2s,37351
178
+ not1mm-25.3.25.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
179
+ not1mm-25.3.25.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
180
+ not1mm-25.3.25.dist-info/top_level.txt,sha256=0YmTxEcDzQlzXub-lXASvoLpg_mt1c2thb5cVkDf5J4,7
181
+ not1mm-25.3.25.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.0.2)
2
+ Generator: setuptools (78.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5