not1mm 24.4.9.4__py3-none-any.whl → 24.4.15__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/checkwindow.py +20 -16
- not1mm/lib/version.py +1 -1
- {not1mm-24.4.9.4.dist-info → not1mm-24.4.15.dist-info}/METADATA +2 -1
- {not1mm-24.4.9.4.dist-info → not1mm-24.4.15.dist-info}/RECORD +8 -8
- {not1mm-24.4.9.4.dist-info → not1mm-24.4.15.dist-info}/LICENSE +0 -0
- {not1mm-24.4.9.4.dist-info → not1mm-24.4.15.dist-info}/WHEEL +0 -0
- {not1mm-24.4.9.4.dist-info → not1mm-24.4.15.dist-info}/entry_points.txt +0 -0
- {not1mm-24.4.9.4.dist-info → not1mm-24.4.15.dist-info}/top_level.txt +0 -0
not1mm/checkwindow.py
CHANGED
@@ -258,39 +258,43 @@ class CheckWindow(QDockWidget):
|
|
258
258
|
filter(lambda x: x, [x.get("callsign", None) for x in spots]),
|
259
259
|
)
|
260
260
|
|
261
|
-
def populate_layout(self, layout, call_list):
|
261
|
+
def populate_layout(self, layout, call_list) -> None:
|
262
|
+
"""Apply blackmagic to a layout."""
|
262
263
|
for i in reversed(range(layout.count())):
|
263
264
|
if layout.itemAt(i).widget():
|
264
265
|
layout.itemAt(i).widget().setParent(None)
|
265
266
|
else:
|
266
267
|
layout.removeItem(layout.itemAt(i))
|
267
|
-
|
268
|
+
call_items = []
|
268
269
|
for call in call_list:
|
269
270
|
if call:
|
270
271
|
if self.call:
|
271
272
|
label_text = ""
|
273
|
+
diff_score = 0
|
272
274
|
for tag, i1, i2, j1, j2 in Levenshtein.opcodes(call, self.call):
|
273
|
-
# logger.debug('{:7} a[{}:{}] --> b[{}:{}] {!r:>8} --> {!r}'.format(
|
274
|
-
# tag, i1, i2, j1, j2, call[i1:i2], self.call[j1:j2]))
|
275
275
|
if tag == "equal":
|
276
276
|
label_text += call[i1:i2]
|
277
277
|
continue
|
278
278
|
elif tag == "replace":
|
279
279
|
label_text += f"<span style='background-color: {self.character_remove_color};'>{call[i1:i2]}</span>"
|
280
|
+
diff_score += max((i2 - i1), (j2 - j1)) * (
|
281
|
+
len(call) + 1 - i2
|
282
|
+
)
|
280
283
|
elif tag == "insert" or tag == "delete":
|
281
284
|
label_text += f"<span style='background-color: {self.character_add_color};'>{call[i1:i2]}</span>"
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
285
|
+
diff_score += max((i2 - i1), (j2 - j1)) * (len(call) - i2)
|
286
|
+
call_items.append((diff_score, label_text, call))
|
287
|
+
|
288
|
+
call_items = sorted(call_items, key=lambda x: x[0])
|
289
|
+
for i in reversed(range(layout.count())):
|
290
|
+
if layout.itemAt(i).widget():
|
291
|
+
layout.itemAt(i).widget().setParent(None)
|
292
|
+
else:
|
293
|
+
layout.removeItem(layout.itemAt(i))
|
294
|
+
|
295
|
+
for _, label_text, call in call_items:
|
296
|
+
label = CallLabel(label_text, call=call, callback=self.item_clicked)
|
292
297
|
layout.addWidget(label)
|
293
|
-
# top aligns
|
294
298
|
layout.addStretch(0)
|
295
299
|
|
296
300
|
|
@@ -307,6 +311,6 @@ class CallLabel(QLabel):
|
|
307
311
|
self.call = call
|
308
312
|
self.callback = callback
|
309
313
|
|
310
|
-
def
|
314
|
+
def mouseReleaseEvent(self, e: QMouseEvent) -> None:
|
311
315
|
if self.call and self.callback:
|
312
316
|
self.callback(self.call)
|
not1mm/lib/version.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: not1mm
|
3
|
-
Version: 24.4.
|
3
|
+
Version: 24.4.15
|
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
|
@@ -177,6 +177,7 @@ I wish to thank those who've contributed to the project.
|
|
177
177
|
|
178
178
|
## Recent Changes
|
179
179
|
|
180
|
+
- [24-4-15] checkwindow.py Tighter results. Changed the call selection to use a single click.
|
180
181
|
- [24-4-9-4] Check for portaudio instead of crash boom. Removed empty dockwidget. Tested on Plasma 6.
|
181
182
|
- [24-4-9-3] Ugh. It's not a real day unless you forget to test.
|
182
183
|
- [24-4-9-2] Put back the floatable dock widgets, 'cause Wayland strikes again.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
not1mm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
not1mm/__main__.py,sha256=Lnwp-STJRcTvjH65oYBTIHcjQ-l0tN0pVsRJylkLJds,123143
|
3
3
|
not1mm/bandmap.py,sha256=3kmRYItrBqpjudFb2NnkGNJpDWkwOpGPQbKwHmYnQ-o,34021
|
4
|
-
not1mm/checkwindow.py,sha256=
|
4
|
+
not1mm/checkwindow.py,sha256=JiVjJO2RJlFDybeVnBQ8yi-1DnS5aiWs2QTHp_bbn5M,10381
|
5
5
|
not1mm/fsutils.py,sha256=Li8Tq9K7c_q7onOHOQ7u1dOOFfhIIz5Aj2LKuQtGOO4,1652
|
6
6
|
not1mm/logwindow.py,sha256=UcO8mgs_E7ier2gg_1ESTaRxABEvcpCwKmSibm7hl74,44603
|
7
7
|
not1mm/vfo.py,sha256=pRRj0XTbeTU9noo3nC1dbg26VYj6gHEw_srUDbyYqC0,12169
|
@@ -105,7 +105,7 @@ not1mm/lib/plugin_common.py,sha256=AAKBPCXzTWZJb-h08uPNnHVG7bSCg7kwukc211gFivY,8
|
|
105
105
|
not1mm/lib/select_contest.py,sha256=WsptLuwkouIHeocJL3oZ6-eUfEnhpwdc-x7eMZ_TIVM,359
|
106
106
|
not1mm/lib/settings.py,sha256=tlXlJUUZP0IFwIDc9DboM5_1by_tHNtMXvyJ0E7B6RI,8877
|
107
107
|
not1mm/lib/super_check_partial.py,sha256=p5l3u2ZOCBtlWgbvskC50FpuoaIpR07tfC6zTdRWbh4,2334
|
108
|
-
not1mm/lib/version.py,sha256=
|
108
|
+
not1mm/lib/version.py,sha256=TGgIZBlA1udqoabl-Uu2ILq7aYZGkkUWLKSGmHeX38c,48
|
109
109
|
not1mm/lib/versiontest.py,sha256=8vDNptuBBunn-1IGkjNaquehqBYUJyjrPSF8Igmd4_Y,1286
|
110
110
|
not1mm/plugins/10_10_fall_cw.py,sha256=fUjfwjuscDjicXIxsO0JHh7xTR9Vu0iPsrOLb896Qak,10873
|
111
111
|
not1mm/plugins/10_10_spring_cw.py,sha256=WNaJP5mBQfaB6SxnFI0Vawt3AKDr94tKVtAK-EVhtUY,10878
|
@@ -139,9 +139,9 @@ not1mm/plugins/naqp_ssb.py,sha256=IWksulcb2_DxlkeW0h3048t8I-u00G_67KBVKkp-TV4,11
|
|
139
139
|
not1mm/plugins/phone_weekly_test.py,sha256=gCX0ESUoiQzDp9puwibt9-dRembNsiuEeBdawCVvjHA,12316
|
140
140
|
not1mm/plugins/stew_perry_topband.py,sha256=DIMI3mGMKokXXb9pPLqdhBI6JVnnIs7ZnAL23nFmshE,10588
|
141
141
|
not1mm/plugins/winter_field_day.py,sha256=4rcfRtobwjHO6BNL3WOTHzBmyyeuX79BNGBG8PfjrI8,10238
|
142
|
-
not1mm-24.4.
|
143
|
-
not1mm-24.4.
|
144
|
-
not1mm-24.4.
|
145
|
-
not1mm-24.4.
|
146
|
-
not1mm-24.4.
|
147
|
-
not1mm-24.4.
|
142
|
+
not1mm-24.4.15.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
143
|
+
not1mm-24.4.15.dist-info/METADATA,sha256=wggnagX-HKqQtkzyr6t0TyX74cpcRmUEKZfCo1IXsHQ,27410
|
144
|
+
not1mm-24.4.15.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
145
|
+
not1mm-24.4.15.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
|
146
|
+
not1mm-24.4.15.dist-info/top_level.txt,sha256=0YmTxEcDzQlzXub-lXASvoLpg_mt1c2thb5cVkDf5J4,7
|
147
|
+
not1mm-24.4.15.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|