not1mm 24.4.1.2__py3-none-any.whl → 24.4.2__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 +118 -74
- not1mm/bandmap.py +41 -20
- not1mm/checkwindow.py +38 -18
- not1mm/data/checkwindow.ui +1 -1
- not1mm/data/cty.json +1 -1
- not1mm/data/vfo.ui +6 -0
- not1mm/lib/about.py +1 -1
- not1mm/lib/edit_contact.py +1 -1
- not1mm/lib/edit_macro.py +1 -1
- not1mm/lib/edit_opon.py +1 -1
- not1mm/lib/edit_station.py +2 -1
- not1mm/lib/multicast.py +7 -5
- not1mm/lib/new_contest.py +1 -1
- not1mm/lib/select_contest.py +1 -1
- not1mm/lib/settings.py +1 -1
- not1mm/lib/version.py +1 -1
- not1mm/logwindow.py +51 -21
- not1mm/plugins/10_10_fall_cw.py +1 -1
- not1mm/plugins/10_10_spring_cw.py +1 -2
- not1mm/plugins/10_10_summer_phone.py +1 -1
- not1mm/plugins/10_10_winter_phone.py +1 -1
- not1mm/plugins/arrl_10m.py +1 -1
- not1mm/plugins/arrl_dx_cw.py +1 -1
- not1mm/plugins/arrl_dx_ssb.py +1 -1
- not1mm/plugins/arrl_field_day.py +1 -1
- not1mm/plugins/arrl_rtty_ru.py +1 -1
- not1mm/plugins/arrl_ss_cw.py +3 -3
- not1mm/plugins/arrl_ss_phone.py +3 -3
- not1mm/plugins/arrl_vhf_jan.py +1 -1
- not1mm/plugins/arrl_vhf_jun.py +1 -1
- not1mm/plugins/arrl_vhf_sep.py +1 -1
- not1mm/plugins/canada_day.py +1 -1
- not1mm/plugins/cq_160_cw.py +1 -1
- not1mm/plugins/cq_160_ssb.py +1 -1
- not1mm/plugins/cq_wpx_cw.py +1 -1
- not1mm/plugins/cq_wpx_ssb.py +1 -1
- not1mm/plugins/cq_ww_cw.py +1 -1
- not1mm/plugins/cq_ww_ssb.py +1 -1
- not1mm/plugins/cwt.py +1 -1
- not1mm/plugins/general_logging.py +1 -1
- not1mm/plugins/iaru_hf.py +1 -1
- not1mm/plugins/jidx_cw.py +1 -1
- not1mm/plugins/jidx_ph.py +1 -1
- not1mm/plugins/naqp_cw.py +1 -1
- not1mm/plugins/naqp_ssb.py +1 -1
- not1mm/plugins/phone_weekly_test.py +1 -1
- not1mm/plugins/stew_perry_topband.py +1 -1
- not1mm/plugins/winter_field_day.py +1 -1
- not1mm/vfo.py +44 -21
- {not1mm-24.4.1.2.dist-info → not1mm-24.4.2.dist-info}/METADATA +4 -3
- {not1mm-24.4.1.2.dist-info → not1mm-24.4.2.dist-info}/RECORD +55 -55
- {not1mm-24.4.1.2.dist-info → not1mm-24.4.2.dist-info}/LICENSE +0 -0
- {not1mm-24.4.1.2.dist-info → not1mm-24.4.2.dist-info}/WHEEL +0 -0
- {not1mm-24.4.1.2.dist-info → not1mm-24.4.2.dist-info}/entry_points.txt +0 -0
- {not1mm-24.4.1.2.dist-info → not1mm-24.4.2.dist-info}/top_level.txt +0 -0
not1mm/__main__.py
CHANGED
@@ -31,10 +31,10 @@ import notctyparser
|
|
31
31
|
import psutil
|
32
32
|
import sounddevice as sd
|
33
33
|
import soundfile as sf
|
34
|
-
from
|
35
|
-
from
|
36
|
-
from
|
37
|
-
from
|
34
|
+
from PyQt6 import QtCore, QtGui, QtWidgets, uic
|
35
|
+
from PyQt6.QtCore import QDir, Qt
|
36
|
+
from PyQt6.QtGui import QFontDatabase, QColorConstants
|
37
|
+
from PyQt6.QtWidgets import QFileDialog, QDockWidget
|
38
38
|
|
39
39
|
from not1mm.lib.about import About
|
40
40
|
from not1mm.lib.cat_interface import CAT
|
@@ -177,7 +177,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
177
177
|
cw_entry_visible = False
|
178
178
|
last_focus = None
|
179
179
|
oldtext = ""
|
180
|
-
text_color =
|
180
|
+
text_color = QColorConstants.Black
|
181
181
|
current_palette = None
|
182
182
|
|
183
183
|
log_window = None
|
@@ -188,10 +188,12 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
188
188
|
def __init__(self, *args, **kwargs):
|
189
189
|
super().__init__(*args, **kwargs)
|
190
190
|
logger.info("MainWindow: __init__")
|
191
|
-
self.setCorner(Qt.TopRightCorner, Qt.RightDockWidgetArea)
|
192
|
-
self.setCorner(
|
193
|
-
|
194
|
-
|
191
|
+
self.setCorner(Qt.Corner.TopRightCorner, Qt.DockWidgetArea.RightDockWidgetArea)
|
192
|
+
self.setCorner(
|
193
|
+
Qt.Corner.BottomRightCorner, Qt.DockWidgetArea.RightDockWidgetArea
|
194
|
+
)
|
195
|
+
self.setCorner(Qt.Corner.TopLeftCorner, Qt.DockWidgetArea.LeftDockWidgetArea)
|
196
|
+
self.setCorner(Qt.Corner.BottomLeftCorner, Qt.DockWidgetArea.LeftDockWidgetArea)
|
195
197
|
data_path = fsutils.APP_DATA_PATH / "main.ui"
|
196
198
|
uic.loadUi(data_path, self)
|
197
199
|
self.cw_entry.hide()
|
@@ -264,40 +266,40 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
264
266
|
self.radio_green = QtGui.QPixmap(str(icon_path / "radio_green.png"))
|
265
267
|
self.radio_icon.setPixmap(self.radio_grey)
|
266
268
|
|
267
|
-
self.F1.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
269
|
+
self.F1.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
268
270
|
self.F1.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F1))
|
269
271
|
self.F1.clicked.connect(lambda x: self.process_function_key(self.F1))
|
270
|
-
self.F2.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
272
|
+
self.F2.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
271
273
|
self.F2.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F2))
|
272
274
|
self.F2.clicked.connect(lambda x: self.process_function_key(self.F2))
|
273
|
-
self.F3.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
275
|
+
self.F3.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
274
276
|
self.F3.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F3))
|
275
277
|
self.F3.clicked.connect(lambda x: self.process_function_key(self.F3))
|
276
|
-
self.F4.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
278
|
+
self.F4.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
277
279
|
self.F4.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F4))
|
278
280
|
self.F4.clicked.connect(lambda x: self.process_function_key(self.F4))
|
279
|
-
self.F5.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
281
|
+
self.F5.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
280
282
|
self.F5.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F5))
|
281
283
|
self.F5.clicked.connect(lambda x: self.process_function_key(self.F5))
|
282
|
-
self.F6.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
284
|
+
self.F6.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
283
285
|
self.F6.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F6))
|
284
286
|
self.F6.clicked.connect(lambda x: self.process_function_key(self.F6))
|
285
|
-
self.F7.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
287
|
+
self.F7.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
286
288
|
self.F7.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F7))
|
287
289
|
self.F7.clicked.connect(lambda x: self.process_function_key(self.F7))
|
288
|
-
self.F8.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
290
|
+
self.F8.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
289
291
|
self.F8.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F8))
|
290
292
|
self.F8.clicked.connect(lambda x: self.process_function_key(self.F8))
|
291
|
-
self.F9.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
293
|
+
self.F9.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
292
294
|
self.F9.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F9))
|
293
295
|
self.F9.clicked.connect(lambda x: self.process_function_key(self.F9))
|
294
|
-
self.F10.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
296
|
+
self.F10.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
295
297
|
self.F10.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F10))
|
296
298
|
self.F10.clicked.connect(lambda x: self.process_function_key(self.F10))
|
297
|
-
self.F11.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
299
|
+
self.F11.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
298
300
|
self.F11.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F11))
|
299
301
|
self.F11.clicked.connect(lambda x: self.process_function_key(self.F11))
|
300
|
-
self.F12.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
302
|
+
self.F12.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
301
303
|
self.F12.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F12))
|
302
304
|
self.F12.clicked.connect(lambda x: self.process_function_key(self.F12))
|
303
305
|
|
@@ -505,25 +507,45 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
505
507
|
darkPalette = QtGui.QPalette()
|
506
508
|
darkColor = QtGui.QColor(56, 56, 56)
|
507
509
|
disabledColor = QtGui.QColor(127, 127, 127)
|
508
|
-
darkPalette.setColor(QtGui.QPalette.Window, darkColor)
|
509
|
-
darkPalette.setColor(
|
510
|
-
|
511
|
-
|
512
|
-
darkPalette.setColor(
|
510
|
+
darkPalette.setColor(QtGui.QPalette.ColorRole.Window, darkColor)
|
511
|
+
darkPalette.setColor(
|
512
|
+
QtGui.QPalette.ColorRole.WindowText, QColorConstants.White
|
513
|
+
)
|
514
|
+
darkPalette.setColor(
|
515
|
+
QtGui.QPalette.ColorRole.Base, QtGui.QColor(45, 45, 45)
|
516
|
+
)
|
517
|
+
darkPalette.setColor(QtGui.QPalette.ColorRole.AlternateBase, darkColor)
|
518
|
+
darkPalette.setColor(QtGui.QPalette.ColorRole.Text, QColorConstants.White)
|
519
|
+
darkPalette.setColor(
|
520
|
+
QtGui.QPalette.ColorGroup.Disabled,
|
521
|
+
QtGui.QPalette.ColorRole.Text,
|
522
|
+
disabledColor,
|
523
|
+
)
|
524
|
+
darkPalette.setColor(QtGui.QPalette.ColorRole.Button, darkColor)
|
525
|
+
darkPalette.setColor(
|
526
|
+
QtGui.QPalette.ColorRole.ButtonText, QColorConstants.White
|
527
|
+
)
|
513
528
|
darkPalette.setColor(
|
514
|
-
QtGui.QPalette.Disabled,
|
529
|
+
QtGui.QPalette.ColorGroup.Disabled,
|
530
|
+
QtGui.QPalette.ColorRole.ButtonText,
|
531
|
+
disabledColor,
|
515
532
|
)
|
516
|
-
darkPalette.setColor(QtGui.QPalette.Button, darkColor)
|
517
|
-
darkPalette.setColor(QtGui.QPalette.ButtonText, Qt.white)
|
518
533
|
darkPalette.setColor(
|
519
|
-
QtGui.QPalette.
|
534
|
+
QtGui.QPalette.ColorRole.BrightText, QColorConstants.Red
|
520
535
|
)
|
521
|
-
darkPalette.setColor(QtGui.QPalette.BrightText, Qt.red)
|
522
|
-
darkPalette.setColor(QtGui.QPalette.Link, QtGui.QColor(42, 130, 218))
|
523
|
-
darkPalette.setColor(QtGui.QPalette.Highlight, QtGui.QColor(42, 130, 218))
|
524
|
-
darkPalette.setColor(QtGui.QPalette.HighlightedText, Qt.black)
|
525
536
|
darkPalette.setColor(
|
526
|
-
QtGui.QPalette.
|
537
|
+
QtGui.QPalette.ColorRole.Link, QtGui.QColor(42, 130, 218)
|
538
|
+
)
|
539
|
+
darkPalette.setColor(
|
540
|
+
QtGui.QPalette.ColorRole.Highlight, QtGui.QColor(42, 130, 218)
|
541
|
+
)
|
542
|
+
darkPalette.setColor(
|
543
|
+
QtGui.QPalette.ColorRole.HighlightedText, QColorConstants.Black
|
544
|
+
)
|
545
|
+
darkPalette.setColor(
|
546
|
+
QtGui.QPalette.ColorGroup.Disabled,
|
547
|
+
QtGui.QPalette.ColorRole.HighlightedText,
|
548
|
+
disabledColor,
|
527
549
|
)
|
528
550
|
dark_button_style = (
|
529
551
|
"QPushButton {"
|
@@ -542,7 +564,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
542
564
|
)
|
543
565
|
self.current_palette = darkPalette
|
544
566
|
self.setPalette(darkPalette)
|
545
|
-
self.text_color =
|
567
|
+
self.text_color = QColorConstants.White
|
546
568
|
self.menuFile.setPalette(darkPalette)
|
547
569
|
self.menuHelp.setPalette(darkPalette)
|
548
570
|
self.menuOther.setPalette(darkPalette)
|
@@ -581,7 +603,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
581
603
|
self.other_1.setPalette(palette)
|
582
604
|
self.other_2.setPalette(palette)
|
583
605
|
self.cw_entry.setPalette(palette)
|
584
|
-
self.text_color =
|
606
|
+
self.text_color = QColorConstants.Black
|
585
607
|
light_button_style = (
|
586
608
|
"QPushButton {"
|
587
609
|
"background-color: rgb(245,245,245);"
|
@@ -750,11 +772,11 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
750
772
|
message_box = QtWidgets.QMessageBox()
|
751
773
|
if self.current_palette:
|
752
774
|
message_box.setPalette(self.current_palette)
|
753
|
-
message_box.setIcon(QtWidgets.QMessageBox.Information)
|
775
|
+
message_box.setIcon(QtWidgets.QMessageBox.Icon.Information)
|
754
776
|
message_box.setText(message)
|
755
777
|
message_box.setWindowTitle("Information")
|
756
|
-
message_box.setStandardButtons(QtWidgets.QMessageBox.Ok)
|
757
|
-
_ = message_box.
|
778
|
+
message_box.setStandardButtons(QtWidgets.QMessageBox.StandardButton.Ok)
|
779
|
+
_ = message_box.exec()
|
758
780
|
|
759
781
|
def show_about_dialog(self) -> None:
|
760
782
|
"""
|
@@ -1339,9 +1361,10 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1339
1361
|
str: filename
|
1340
1362
|
"""
|
1341
1363
|
|
1342
|
-
options =
|
1343
|
-
|
1344
|
-
|
1364
|
+
options = (
|
1365
|
+
QFileDialog.Option.DontUseNativeDialog
|
1366
|
+
| QFileDialog.Option.DontConfirmOverwrite
|
1367
|
+
)
|
1345
1368
|
if action == "new":
|
1346
1369
|
file, _ = QFileDialog.getSaveFileName(
|
1347
1370
|
self,
|
@@ -1369,28 +1392,30 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1369
1392
|
"""Launch the log window"""
|
1370
1393
|
if not self.log_window:
|
1371
1394
|
self.log_window = LogWindow()
|
1372
|
-
self.addDockWidget(Qt.BottomDockWidgetArea, self.log_window)
|
1395
|
+
self.addDockWidget(Qt.DockWidgetArea.BottomDockWidgetArea, self.log_window)
|
1373
1396
|
self.log_window.show()
|
1374
1397
|
|
1375
1398
|
def launch_bandmap_window(self) -> None:
|
1376
1399
|
"""Launch the bandmap window"""
|
1377
1400
|
if not self.bandmap_window:
|
1378
1401
|
self.bandmap_window = BandMapWindow()
|
1379
|
-
self.addDockWidget(
|
1402
|
+
self.addDockWidget(
|
1403
|
+
Qt.DockWidgetArea.RightDockWidgetArea, self.bandmap_window
|
1404
|
+
)
|
1380
1405
|
self.bandmap_window.show()
|
1381
1406
|
|
1382
1407
|
def launch_check_window(self) -> None:
|
1383
1408
|
"""Launch the check window"""
|
1384
1409
|
if not self.check_window:
|
1385
1410
|
self.check_window = CheckWindow()
|
1386
|
-
self.addDockWidget(Qt.RightDockWidgetArea, self.check_window)
|
1411
|
+
self.addDockWidget(Qt.DockWidgetArea.RightDockWidgetArea, self.check_window)
|
1387
1412
|
self.check_window.show()
|
1388
1413
|
|
1389
1414
|
def launch_vfo(self) -> None:
|
1390
1415
|
"""Launch the VFO window"""
|
1391
1416
|
if not self.vfo_window:
|
1392
1417
|
self.vfo_window = VfoWindow()
|
1393
|
-
self.addDockWidget(Qt.RightDockWidgetArea, self.vfo_window)
|
1418
|
+
self.addDockWidget(Qt.DockWidgetArea.RightDockWidgetArea, self.vfo_window)
|
1394
1419
|
self.vfo_window.show()
|
1395
1420
|
|
1396
1421
|
def clear_band_indicators(self) -> None:
|
@@ -1407,8 +1432,8 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1407
1432
|
"""
|
1408
1433
|
for _, indicators in self.all_mode_indicators.items():
|
1409
1434
|
for _, indicator in indicators.items():
|
1410
|
-
indicator.setFrameShape(QtWidgets.QFrame.NoFrame)
|
1411
|
-
if self.text_color ==
|
1435
|
+
indicator.setFrameShape(QtWidgets.QFrame.Shape.NoFrame)
|
1436
|
+
if self.text_color == QColorConstants.Black:
|
1412
1437
|
indicator.setStyleSheet(
|
1413
1438
|
"font-family: JetBrains Mono; color: black;"
|
1414
1439
|
)
|
@@ -1433,7 +1458,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1433
1458
|
self.clear_band_indicators()
|
1434
1459
|
indicator = self.all_mode_indicators[self.current_mode].get(band, None)
|
1435
1460
|
if indicator:
|
1436
|
-
indicator.setFrameShape(QtWidgets.QFrame.Box)
|
1461
|
+
indicator.setFrameShape(QtWidgets.QFrame.Shape.Box)
|
1437
1462
|
indicator.setStyleSheet("font-family: JetBrains Mono; color: green;")
|
1438
1463
|
|
1439
1464
|
def closeEvent(self, _event) -> None:
|
@@ -1522,7 +1547,10 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1522
1547
|
if event.key() == Qt.Key.Key_K:
|
1523
1548
|
self.toggle_cw_entry()
|
1524
1549
|
return
|
1525
|
-
if
|
1550
|
+
if (
|
1551
|
+
event.key() == Qt.Key.Key_S
|
1552
|
+
and modifier == Qt.KeyboardModifier.ControlModifier
|
1553
|
+
):
|
1526
1554
|
freq = self.radio_state.get("vfoa")
|
1527
1555
|
dx = self.callsign.text()
|
1528
1556
|
if freq and dx:
|
@@ -1533,7 +1561,10 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1533
1561
|
cmd["freq"] = float(int(freq) / 1000)
|
1534
1562
|
self.multicast_interface.send_as_json(cmd)
|
1535
1563
|
return
|
1536
|
-
if
|
1564
|
+
if (
|
1565
|
+
event.key() == Qt.Key.Key_M
|
1566
|
+
and modifier == Qt.KeyboardModifier.ControlModifier
|
1567
|
+
):
|
1537
1568
|
freq = self.radio_state.get("vfoa")
|
1538
1569
|
dx = self.callsign.text()
|
1539
1570
|
if freq and dx:
|
@@ -1544,7 +1575,10 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1544
1575
|
cmd["freq"] = float(int(freq) / 1000)
|
1545
1576
|
self.multicast_interface.send_as_json(cmd)
|
1546
1577
|
return
|
1547
|
-
if
|
1578
|
+
if (
|
1579
|
+
event.key() == Qt.Key.Key_G
|
1580
|
+
and modifier == Qt.KeyboardModifier.ControlModifier
|
1581
|
+
):
|
1548
1582
|
dx = self.callsign.text()
|
1549
1583
|
if dx:
|
1550
1584
|
cmd = {}
|
@@ -1554,11 +1588,15 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1554
1588
|
self.multicast_interface.send_as_json(cmd)
|
1555
1589
|
return
|
1556
1590
|
if (
|
1557
|
-
event.key() == Qt.Key.Key_Escape
|
1591
|
+
event.key() == Qt.Key.Key_Escape
|
1592
|
+
and modifier != Qt.KeyboardModifier.ControlModifier
|
1558
1593
|
): # pylint: disable=no-member
|
1559
1594
|
self.clearinputs()
|
1560
1595
|
return
|
1561
|
-
if
|
1596
|
+
if (
|
1597
|
+
event.key() == Qt.Key.Key_Escape
|
1598
|
+
and modifier == Qt.KeyboardModifier.ControlModifier
|
1599
|
+
):
|
1562
1600
|
if self.cw is not None:
|
1563
1601
|
if self.cw.servertype == 1:
|
1564
1602
|
self.cw.sendcw("\x1b4")
|
@@ -1575,7 +1613,10 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1575
1613
|
cmd["station"] = platform.node()
|
1576
1614
|
self.multicast_interface.send_as_json(cmd)
|
1577
1615
|
return
|
1578
|
-
if
|
1616
|
+
if (
|
1617
|
+
event.key() == Qt.Key.Key_PageUp
|
1618
|
+
and modifier != Qt.KeyboardModifier.ControlModifier
|
1619
|
+
):
|
1579
1620
|
if self.cw is not None:
|
1580
1621
|
self.cw.speed += 1
|
1581
1622
|
self.cw_speed.setValue(self.cw.speed)
|
@@ -1584,7 +1625,10 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1584
1625
|
if self.cw.servertype == 2:
|
1585
1626
|
self.cw.set_winkeyer_speed(self.cw_speed.value())
|
1586
1627
|
return
|
1587
|
-
if
|
1628
|
+
if (
|
1629
|
+
event.key() == Qt.Key.Key_PageDown
|
1630
|
+
and modifier != Qt.KeyboardModifier.ControlModifier
|
1631
|
+
):
|
1588
1632
|
if self.cw is not None:
|
1589
1633
|
self.cw.speed -= 1
|
1590
1634
|
self.cw_speed.setValue(self.cw.speed)
|
@@ -1596,7 +1640,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1596
1640
|
if event.key() == Qt.Key.Key_Tab or event.key() == Qt.Key.Key_Backtab:
|
1597
1641
|
if self.sent.hasFocus():
|
1598
1642
|
logger.debug("From sent")
|
1599
|
-
if modifier == Qt.ShiftModifier:
|
1643
|
+
if modifier == Qt.KeyboardModifier.ShiftModifier:
|
1600
1644
|
prev_tab = self.tab_prev.get(self.sent)
|
1601
1645
|
prev_tab.setFocus()
|
1602
1646
|
prev_tab.deselect()
|
@@ -1609,7 +1653,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1609
1653
|
return
|
1610
1654
|
if self.receive.hasFocus():
|
1611
1655
|
logger.debug("From receive")
|
1612
|
-
if modifier == Qt.ShiftModifier:
|
1656
|
+
if modifier == Qt.KeyboardModifier.ShiftModifier:
|
1613
1657
|
prev_tab = self.tab_prev.get(self.receive)
|
1614
1658
|
prev_tab.setFocus()
|
1615
1659
|
prev_tab.deselect()
|
@@ -1622,7 +1666,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1622
1666
|
return
|
1623
1667
|
if self.other_1.hasFocus():
|
1624
1668
|
logger.debug("From other_1")
|
1625
|
-
if modifier == Qt.ShiftModifier:
|
1669
|
+
if modifier == Qt.KeyboardModifier.ShiftModifier:
|
1626
1670
|
prev_tab = self.tab_prev.get(self.other_1)
|
1627
1671
|
prev_tab.setFocus()
|
1628
1672
|
prev_tab.deselect()
|
@@ -1635,7 +1679,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1635
1679
|
return
|
1636
1680
|
if self.other_2.hasFocus():
|
1637
1681
|
logger.debug("From other_2")
|
1638
|
-
if modifier == Qt.ShiftModifier:
|
1682
|
+
if modifier == Qt.KeyboardModifier.ShiftModifier:
|
1639
1683
|
prev_tab = self.tab_prev.get(self.other_2)
|
1640
1684
|
prev_tab.setFocus()
|
1641
1685
|
prev_tab.deselect()
|
@@ -1653,7 +1697,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1653
1697
|
self.dupe_indicator.show()
|
1654
1698
|
else:
|
1655
1699
|
self.dupe_indicator.hide()
|
1656
|
-
if modifier == Qt.ShiftModifier:
|
1700
|
+
if modifier == Qt.KeyboardModifier.ShiftModifier:
|
1657
1701
|
prev_tab = self.tab_prev.get(self.callsign)
|
1658
1702
|
prev_tab.setFocus()
|
1659
1703
|
prev_tab.deselect()
|
@@ -1672,29 +1716,29 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1672
1716
|
next_tab.deselect()
|
1673
1717
|
next_tab.end(False)
|
1674
1718
|
return
|
1675
|
-
if event.key() == Qt.Key_F1:
|
1719
|
+
if event.key() == Qt.Key.Key_F1:
|
1676
1720
|
self.process_function_key(self.F1)
|
1677
|
-
if event.key() == Qt.Key_F2:
|
1721
|
+
if event.key() == Qt.Key.Key_F2:
|
1678
1722
|
self.process_function_key(self.F2)
|
1679
|
-
if event.key() == Qt.Key_F3:
|
1723
|
+
if event.key() == Qt.Key.Key_F3:
|
1680
1724
|
self.process_function_key(self.F3)
|
1681
|
-
if event.key() == Qt.Key_F4:
|
1725
|
+
if event.key() == Qt.Key.Key_F4:
|
1682
1726
|
self.process_function_key(self.F4)
|
1683
|
-
if event.key() == Qt.Key_F5:
|
1727
|
+
if event.key() == Qt.Key.Key_F5:
|
1684
1728
|
self.process_function_key(self.F5)
|
1685
|
-
if event.key() == Qt.Key_F6:
|
1729
|
+
if event.key() == Qt.Key.Key_F6:
|
1686
1730
|
self.process_function_key(self.F6)
|
1687
|
-
if event.key() == Qt.Key_F7:
|
1731
|
+
if event.key() == Qt.Key.Key_F7:
|
1688
1732
|
self.process_function_key(self.F7)
|
1689
|
-
if event.key() == Qt.Key_F8:
|
1733
|
+
if event.key() == Qt.Key.Key_F8:
|
1690
1734
|
self.process_function_key(self.F8)
|
1691
|
-
if event.key() == Qt.Key_F9:
|
1735
|
+
if event.key() == Qt.Key.Key_F9:
|
1692
1736
|
self.process_function_key(self.F9)
|
1693
|
-
if event.key() == Qt.Key_F10:
|
1737
|
+
if event.key() == Qt.Key.Key_F10:
|
1694
1738
|
self.process_function_key(self.F10)
|
1695
|
-
if event.key() == Qt.Key_F11:
|
1739
|
+
if event.key() == Qt.Key.Key_F11:
|
1696
1740
|
self.process_function_key(self.F11)
|
1697
|
-
if event.key() == Qt.Key_F12:
|
1741
|
+
if event.key() == Qt.Key.Key_F12:
|
1698
1742
|
self.process_function_key(self.F12)
|
1699
1743
|
|
1700
1744
|
def set_window_title(self) -> None:
|
not1mm/bandmap.py
CHANGED
@@ -16,8 +16,9 @@ from datetime import datetime, timezone
|
|
16
16
|
from decimal import Decimal
|
17
17
|
from json import loads
|
18
18
|
|
19
|
-
from
|
20
|
-
from
|
19
|
+
from PyQt6 import QtCore, QtGui, QtWidgets, uic, QtNetwork
|
20
|
+
from PyQt6.QtCore import Qt
|
21
|
+
from PyQt6.QtGui import QColorConstants
|
21
22
|
|
22
23
|
import not1mm.fsutils as fsutils
|
23
24
|
from not1mm.lib.multicast import Multicast
|
@@ -370,27 +371,47 @@ class BandMapWindow(QtWidgets.QDockWidget):
|
|
370
371
|
if setdarkmode:
|
371
372
|
darkPalette = QtGui.QPalette()
|
372
373
|
darkColor = QtGui.QColor(56, 56, 56)
|
373
|
-
self.text_color =
|
374
|
+
self.text_color = QColorConstants.White
|
374
375
|
disabledColor = QtGui.QColor(127, 127, 127)
|
375
|
-
darkPalette.setColor(QtGui.QPalette.Window, darkColor)
|
376
|
-
darkPalette.setColor(QtGui.QPalette.WindowText, Qt.white)
|
377
|
-
darkPalette.setColor(QtGui.QPalette.Base, QtGui.QColor(45, 45, 45))
|
378
|
-
darkPalette.setColor(QtGui.QPalette.AlternateBase, darkColor)
|
379
|
-
darkPalette.setColor(QtGui.QPalette.Text, Qt.white)
|
376
|
+
darkPalette.setColor(QtGui.QPalette.ColorRole.Window, darkColor)
|
380
377
|
darkPalette.setColor(
|
381
|
-
QtGui.QPalette.
|
378
|
+
QtGui.QPalette.ColorRole.WindowText, QColorConstants.White
|
382
379
|
)
|
383
|
-
darkPalette.setColor(QtGui.QPalette.Button, darkColor)
|
384
|
-
darkPalette.setColor(QtGui.QPalette.ButtonText, Qt.white)
|
385
380
|
darkPalette.setColor(
|
386
|
-
QtGui.QPalette.
|
381
|
+
QtGui.QPalette.ColorRole.Base, QtGui.QColor(45, 45, 45)
|
387
382
|
)
|
388
|
-
darkPalette.setColor(QtGui.QPalette.
|
389
|
-
darkPalette.setColor(QtGui.QPalette.
|
390
|
-
darkPalette.setColor(QtGui.QPalette.Highlight, QtGui.QColor(42, 130, 218))
|
391
|
-
darkPalette.setColor(QtGui.QPalette.HighlightedText, Qt.black)
|
383
|
+
darkPalette.setColor(QtGui.QPalette.ColorRole.AlternateBase, darkColor)
|
384
|
+
darkPalette.setColor(QtGui.QPalette.ColorRole.Text, QColorConstants.White)
|
392
385
|
darkPalette.setColor(
|
393
|
-
QtGui.QPalette.Disabled,
|
386
|
+
QtGui.QPalette.ColorGroup.Disabled,
|
387
|
+
QtGui.QPalette.ColorRole.Text,
|
388
|
+
disabledColor,
|
389
|
+
)
|
390
|
+
darkPalette.setColor(QtGui.QPalette.ColorRole.Button, darkColor)
|
391
|
+
darkPalette.setColor(
|
392
|
+
QtGui.QPalette.ColorRole.ButtonText, QColorConstants.White
|
393
|
+
)
|
394
|
+
darkPalette.setColor(
|
395
|
+
QtGui.QPalette.ColorGroup.Disabled,
|
396
|
+
QtGui.QPalette.ColorRole.ButtonText,
|
397
|
+
disabledColor,
|
398
|
+
)
|
399
|
+
darkPalette.setColor(
|
400
|
+
QtGui.QPalette.ColorRole.BrightText, QColorConstants.Red
|
401
|
+
)
|
402
|
+
darkPalette.setColor(
|
403
|
+
QtGui.QPalette.ColorRole.Link, QtGui.QColor(42, 130, 218)
|
404
|
+
)
|
405
|
+
darkPalette.setColor(
|
406
|
+
QtGui.QPalette.ColorRole.Highlight, QtGui.QColor(42, 130, 218)
|
407
|
+
)
|
408
|
+
darkPalette.setColor(
|
409
|
+
QtGui.QPalette.ColorRole.HighlightedText, QColorConstants.Black
|
410
|
+
)
|
411
|
+
darkPalette.setColor(
|
412
|
+
QtGui.QPalette.ColorGroup.Disabled,
|
413
|
+
QtGui.QPalette.ColorRole.HighlightedText,
|
414
|
+
disabledColor,
|
394
415
|
)
|
395
416
|
|
396
417
|
self.setPalette(darkPalette)
|
@@ -419,7 +440,7 @@ class BandMapWindow(QtWidgets.QDockWidget):
|
|
419
440
|
palette = self.style().standardPalette()
|
420
441
|
self.setPalette(palette)
|
421
442
|
self.callsignField.setPalette(palette)
|
422
|
-
self.text_color =
|
443
|
+
self.text_color = QColorConstants.Black
|
423
444
|
self.update()
|
424
445
|
light_button_style = (
|
425
446
|
"QPushButton {"
|
@@ -789,8 +810,8 @@ class BandMapWindow(QtWidgets.QDockWidget):
|
|
789
810
|
text.document().setDocumentMargin(0)
|
790
811
|
text.setPos(60, text_y - (text.boundingRect().height() / 2))
|
791
812
|
text.setFlags(
|
792
|
-
QtWidgets.QGraphicsItem.ItemIsFocusable
|
793
|
-
| QtWidgets.QGraphicsItem.ItemIsSelectable
|
813
|
+
QtWidgets.QGraphicsItem.GraphicsItemFlag.ItemIsFocusable
|
814
|
+
| QtWidgets.QGraphicsItem.GraphicsItemFlag.ItemIsSelectable
|
794
815
|
| text.flags()
|
795
816
|
)
|
796
817
|
text.setProperty("freq", items.get("freq"))
|
not1mm/checkwindow.py
CHANGED
@@ -12,10 +12,10 @@ import queue
|
|
12
12
|
from json import loads
|
13
13
|
import Levenshtein
|
14
14
|
|
15
|
-
from
|
16
|
-
from
|
17
|
-
from
|
18
|
-
from
|
15
|
+
from PyQt6 import QtGui, uic
|
16
|
+
from PyQt6.QtCore import Qt
|
17
|
+
from PyQt6.QtWidgets import QLabel, QVBoxLayout, QWidget, QDockWidget
|
18
|
+
from PyQt6.QtGui import QMouseEvent, QColorConstants
|
19
19
|
|
20
20
|
import not1mm.fsutils as fsutils
|
21
21
|
from not1mm.lib.database import DataBase
|
@@ -78,25 +78,45 @@ class CheckWindow(QDockWidget):
|
|
78
78
|
darkPalette = QtGui.QPalette()
|
79
79
|
darkColor = QtGui.QColor(56, 56, 56)
|
80
80
|
disabledColor = QtGui.QColor(127, 127, 127)
|
81
|
-
darkPalette.setColor(QtGui.QPalette.Window, darkColor)
|
82
|
-
darkPalette.setColor(QtGui.QPalette.WindowText, Qt.white)
|
83
|
-
darkPalette.setColor(QtGui.QPalette.Base, QtGui.QColor(45, 45, 45))
|
84
|
-
darkPalette.setColor(QtGui.QPalette.AlternateBase, darkColor)
|
85
|
-
darkPalette.setColor(QtGui.QPalette.Text, Qt.white)
|
81
|
+
darkPalette.setColor(QtGui.QPalette.ColorRole.Window, darkColor)
|
86
82
|
darkPalette.setColor(
|
87
|
-
QtGui.QPalette.
|
83
|
+
QtGui.QPalette.ColorRole.WindowText, QColorConstants.White
|
88
84
|
)
|
89
|
-
darkPalette.setColor(QtGui.QPalette.Button, darkColor)
|
90
|
-
darkPalette.setColor(QtGui.QPalette.ButtonText, Qt.white)
|
91
85
|
darkPalette.setColor(
|
92
|
-
QtGui.QPalette.
|
86
|
+
QtGui.QPalette.ColorRole.Base, QtGui.QColor(45, 45, 45)
|
93
87
|
)
|
94
|
-
darkPalette.setColor(QtGui.QPalette.
|
95
|
-
darkPalette.setColor(QtGui.QPalette.
|
96
|
-
darkPalette.setColor(QtGui.QPalette.Highlight, QtGui.QColor(42, 130, 218))
|
97
|
-
darkPalette.setColor(QtGui.QPalette.HighlightedText, Qt.black)
|
88
|
+
darkPalette.setColor(QtGui.QPalette.ColorRole.AlternateBase, darkColor)
|
89
|
+
darkPalette.setColor(QtGui.QPalette.ColorRole.Text, QColorConstants.White)
|
98
90
|
darkPalette.setColor(
|
99
|
-
QtGui.QPalette.Disabled,
|
91
|
+
QtGui.QPalette.ColorGroup.Disabled,
|
92
|
+
QtGui.QPalette.ColorRole.Text,
|
93
|
+
disabledColor,
|
94
|
+
)
|
95
|
+
darkPalette.setColor(QtGui.QPalette.ColorRole.Button, darkColor)
|
96
|
+
darkPalette.setColor(
|
97
|
+
QtGui.QPalette.ColorRole.ButtonText, QColorConstants.White
|
98
|
+
)
|
99
|
+
darkPalette.setColor(
|
100
|
+
QtGui.QPalette.ColorGroup.Disabled,
|
101
|
+
QtGui.QPalette.ColorRole.ButtonText,
|
102
|
+
disabledColor,
|
103
|
+
)
|
104
|
+
darkPalette.setColor(
|
105
|
+
QtGui.QPalette.ColorRole.BrightText, QColorConstants.Red
|
106
|
+
)
|
107
|
+
darkPalette.setColor(
|
108
|
+
QtGui.QPalette.ColorRole.Link, QtGui.QColor(42, 130, 218)
|
109
|
+
)
|
110
|
+
darkPalette.setColor(
|
111
|
+
QtGui.QPalette.ColorRole.Highlight, QtGui.QColor(42, 130, 218)
|
112
|
+
)
|
113
|
+
darkPalette.setColor(
|
114
|
+
QtGui.QPalette.ColorRole.HighlightedText, QColorConstants.Black
|
115
|
+
)
|
116
|
+
darkPalette.setColor(
|
117
|
+
QtGui.QPalette.ColorGroup.Disabled,
|
118
|
+
QtGui.QPalette.ColorRole.HighlightedText,
|
119
|
+
disabledColor,
|
100
120
|
)
|
101
121
|
|
102
122
|
self.setPalette(darkPalette)
|