not1mm 25.3.23__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 +6 -22
- not1mm/lib/version.py +1 -1
- not1mm/logwindow.py +10 -1
- not1mm/statistics.py +82 -11
- {not1mm-25.3.23.dist-info → not1mm-25.3.25.dist-info}/METADATA +4 -2
- {not1mm-25.3.23.dist-info → not1mm-25.3.25.dist-info}/RECORD +10 -10
- {not1mm-25.3.23.dist-info → not1mm-25.3.25.dist-info}/WHEEL +1 -1
- {not1mm-25.3.23.dist-info → not1mm-25.3.25.dist-info}/entry_points.txt +0 -0
- {not1mm-25.3.23.dist-info → not1mm-25.3.25.dist-info}/licenses/LICENSE +0 -0
- {not1mm-25.3.23.dist-info → not1mm-25.3.25.dist-info}/top_level.txt +0 -0
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
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
@@ -6,9 +6,9 @@ import os
|
|
6
6
|
|
7
7
|
from PyQt6 import uic, QtWidgets
|
8
8
|
from PyQt6.QtWidgets import QDockWidget
|
9
|
+
from PyQt6.QtCore import pyqtSignal, QTimer
|
9
10
|
|
10
|
-
|
11
|
-
from PyQt6.QtCore import pyqtSignal
|
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
|
@@ -43,6 +43,9 @@ class StatsWindow(QDockWidget):
|
|
43
43
|
self.database = DataBase(self.dbname, fsutils.APP_DATA_PATH)
|
44
44
|
self.database.current_contest = self.pref.get("contest", 0)
|
45
45
|
uic.loadUi(fsutils.APP_DATA_PATH / "statistics.ui", self)
|
46
|
+
self.timer = QTimer()
|
47
|
+
self.timer.timeout.connect(self.get_run_and_total_qs)
|
48
|
+
self.timer.start(5000)
|
46
49
|
|
47
50
|
def msg_from_main(self, packet):
|
48
51
|
""""""
|
@@ -72,6 +75,46 @@ class StatsWindow(QDockWidget):
|
|
72
75
|
def setDarkMode(self, dark: bool) -> None:
|
73
76
|
"""Forces a darkmode palette."""
|
74
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
|
+
|
75
118
|
def load_pref(self) -> None:
|
76
119
|
"""
|
77
120
|
Load preference file to get current db filename and sets the initial darkmode state.
|
@@ -100,9 +143,13 @@ class StatsWindow(QDockWidget):
|
|
100
143
|
|
101
144
|
def get_run_and_total_qs(self):
|
102
145
|
"""get numbers"""
|
146
|
+
if self.active is False:
|
147
|
+
return
|
103
148
|
self.tableWidget.clear()
|
104
|
-
self.tableWidget.setColumnCount(
|
105
|
-
self.tableWidget.setHorizontalHeaderLabels(
|
149
|
+
self.tableWidget.setColumnCount(7)
|
150
|
+
self.tableWidget.setHorizontalHeaderLabels(
|
151
|
+
["BAND", "QSO", "CALLS", "CW", "PH", "DI", "PTS"]
|
152
|
+
)
|
106
153
|
self.tableWidget.verticalHeader().setVisible(False)
|
107
154
|
self.tableWidget.setEditTriggers(
|
108
155
|
QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers
|
@@ -117,33 +164,57 @@ class StatsWindow(QDockWidget):
|
|
117
164
|
for band in result:
|
118
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']}';"
|
119
166
|
result = self.database.exec_sql(query)
|
120
|
-
item = QtWidgets.QTableWidgetItem(str(band
|
167
|
+
item = QtWidgets.QTableWidgetItem(str(band.get("band", "")))
|
121
168
|
item.setTextAlignment(0x0002)
|
122
169
|
self.tableWidget.setItem(row, 0, item)
|
123
|
-
item = QtWidgets.QTableWidgetItem(str(result
|
170
|
+
item = QtWidgets.QTableWidgetItem(str(result.get("qs", "0")))
|
124
171
|
item.setTextAlignment(0x0002)
|
125
172
|
self.tableWidget.setItem(row, 1, item)
|
126
|
-
item = QtWidgets.QTableWidgetItem(str(result
|
173
|
+
item = QtWidgets.QTableWidgetItem(str(result.get("calls", "0")))
|
127
174
|
item.setTextAlignment(0x0002)
|
128
175
|
self.tableWidget.setItem(row, 2, item)
|
129
|
-
item = QtWidgets.QTableWidgetItem(str(result
|
176
|
+
item = QtWidgets.QTableWidgetItem(str(result.get("points", "0")))
|
177
|
+
item.setTextAlignment(0x0002)
|
178
|
+
self.tableWidget.setItem(row, 6, item)
|
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;"
|
180
|
+
result = self.database.exec_sql(query)
|
181
|
+
item = QtWidgets.QTableWidgetItem(str(result.get("CW", "0")))
|
130
182
|
item.setTextAlignment(0x0002)
|
131
183
|
self.tableWidget.setItem(row, 3, item)
|
184
|
+
item = QtWidgets.QTableWidgetItem(str(result.get("PH", "0")))
|
185
|
+
item.setTextAlignment(0x0002)
|
186
|
+
self.tableWidget.setItem(row, 4, item)
|
187
|
+
item = QtWidgets.QTableWidgetItem(str(result.get("DI", "0")))
|
188
|
+
item.setTextAlignment(0x0002)
|
189
|
+
self.tableWidget.setItem(row, 5, item)
|
190
|
+
|
132
191
|
row += 1
|
133
192
|
query = f"select count(*) as qs, count(DISTINCT(Call)) as calls, sum(Points) as points from DXLOG where ContestNR = {self.database.current_contest};"
|
134
193
|
result = self.database.exec_sql(query)
|
135
194
|
item = QtWidgets.QTableWidgetItem("TOTAL")
|
136
195
|
item.setTextAlignment(0x0002)
|
137
196
|
self.tableWidget.setItem(row, 0, item)
|
138
|
-
item = QtWidgets.QTableWidgetItem(str(result
|
197
|
+
item = QtWidgets.QTableWidgetItem(str(result.get("qs", "0")))
|
139
198
|
item.setTextAlignment(0x0002)
|
140
199
|
self.tableWidget.setItem(row, 1, item)
|
141
|
-
item = QtWidgets.QTableWidgetItem(str(result
|
200
|
+
item = QtWidgets.QTableWidgetItem(str(result.get("calls", "0")))
|
142
201
|
item.setTextAlignment(0x0002)
|
143
202
|
self.tableWidget.setItem(row, 2, item)
|
144
|
-
item = QtWidgets.QTableWidgetItem(str(result
|
203
|
+
item = QtWidgets.QTableWidgetItem(str(result.get("points", "0")))
|
204
|
+
item.setTextAlignment(0x0002)
|
205
|
+
self.tableWidget.setItem(row, 6, item)
|
206
|
+
|
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;"
|
208
|
+
result = self.database.exec_sql(query)
|
209
|
+
item = QtWidgets.QTableWidgetItem(str(result.get("CW", "0")))
|
145
210
|
item.setTextAlignment(0x0002)
|
146
211
|
self.tableWidget.setItem(row, 3, item)
|
212
|
+
item = QtWidgets.QTableWidgetItem(str(result.get("PH", "0")))
|
213
|
+
item.setTextAlignment(0x0002)
|
214
|
+
self.tableWidget.setItem(row, 4, item)
|
215
|
+
item = QtWidgets.QTableWidgetItem(str(result.get("DI", "0")))
|
216
|
+
item.setTextAlignment(0x0002)
|
217
|
+
self.tableWidget.setItem(row, 5, item)
|
147
218
|
self.tableWidget.resizeColumnsToContents()
|
148
219
|
self.tableWidget.resizeRowsToContents()
|
149
220
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: not1mm
|
3
|
-
Version: 25.3.
|
3
|
+
Version: 25.3.25
|
4
4
|
Summary: NOT1MM Logger
|
5
5
|
Author-email: Michael Bridak <michael.bridak@gmail.com>
|
6
|
-
License
|
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,8 @@ 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.
|
251
|
+
- [25-3-24] Add CW, PH, DI counts to the statistics window.
|
250
252
|
- [25-3-23] Add a statistics window.
|
251
253
|
- [25-3-19-1] Add EA His Maj King of Spain SSB.
|
252
254
|
- [25-3-19] Merged PR from @DD5ML Adding DARC VHF.
|
@@ -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=
|
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=
|
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=
|
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=
|
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.
|
177
|
-
not1mm-25.3.
|
178
|
-
not1mm-25.3.
|
179
|
-
not1mm-25.3.
|
180
|
-
not1mm-25.3.
|
181
|
-
not1mm-25.3.
|
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,,
|
File without changes
|
File without changes
|
File without changes
|