not1mm 24.4.1.1__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 +119 -72
- 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.1.dist-info → not1mm-24.4.2.dist-info}/METADATA +6 -5
- {not1mm-24.4.1.1.dist-info → not1mm-24.4.2.dist-info}/RECORD +55 -55
- {not1mm-24.4.1.1.dist-info → not1mm-24.4.2.dist-info}/LICENSE +0 -0
- {not1mm-24.4.1.1.dist-info → not1mm-24.4.2.dist-info}/WHEEL +0 -0
- {not1mm-24.4.1.1.dist-info → not1mm-24.4.2.dist-info}/entry_points.txt +0 -0
- {not1mm-24.4.1.1.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,8 +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(
|
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)
|
193
197
|
data_path = fsutils.APP_DATA_PATH / "main.ui"
|
194
198
|
uic.loadUi(data_path, self)
|
195
199
|
self.cw_entry.hide()
|
@@ -262,40 +266,40 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
262
266
|
self.radio_green = QtGui.QPixmap(str(icon_path / "radio_green.png"))
|
263
267
|
self.radio_icon.setPixmap(self.radio_grey)
|
264
268
|
|
265
|
-
self.F1.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
269
|
+
self.F1.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
266
270
|
self.F1.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F1))
|
267
271
|
self.F1.clicked.connect(lambda x: self.process_function_key(self.F1))
|
268
|
-
self.F2.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
272
|
+
self.F2.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
269
273
|
self.F2.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F2))
|
270
274
|
self.F2.clicked.connect(lambda x: self.process_function_key(self.F2))
|
271
|
-
self.F3.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
275
|
+
self.F3.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
272
276
|
self.F3.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F3))
|
273
277
|
self.F3.clicked.connect(lambda x: self.process_function_key(self.F3))
|
274
|
-
self.F4.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
278
|
+
self.F4.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
275
279
|
self.F4.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F4))
|
276
280
|
self.F4.clicked.connect(lambda x: self.process_function_key(self.F4))
|
277
|
-
self.F5.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
281
|
+
self.F5.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
278
282
|
self.F5.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F5))
|
279
283
|
self.F5.clicked.connect(lambda x: self.process_function_key(self.F5))
|
280
|
-
self.F6.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
284
|
+
self.F6.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
281
285
|
self.F6.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F6))
|
282
286
|
self.F6.clicked.connect(lambda x: self.process_function_key(self.F6))
|
283
|
-
self.F7.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
287
|
+
self.F7.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
284
288
|
self.F7.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F7))
|
285
289
|
self.F7.clicked.connect(lambda x: self.process_function_key(self.F7))
|
286
|
-
self.F8.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
290
|
+
self.F8.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
287
291
|
self.F8.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F8))
|
288
292
|
self.F8.clicked.connect(lambda x: self.process_function_key(self.F8))
|
289
|
-
self.F9.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
293
|
+
self.F9.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
290
294
|
self.F9.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F9))
|
291
295
|
self.F9.clicked.connect(lambda x: self.process_function_key(self.F9))
|
292
|
-
self.F10.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
296
|
+
self.F10.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
293
297
|
self.F10.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F10))
|
294
298
|
self.F10.clicked.connect(lambda x: self.process_function_key(self.F10))
|
295
|
-
self.F11.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
299
|
+
self.F11.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
296
300
|
self.F11.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F11))
|
297
301
|
self.F11.clicked.connect(lambda x: self.process_function_key(self.F11))
|
298
|
-
self.F12.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
302
|
+
self.F12.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
299
303
|
self.F12.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F12))
|
300
304
|
self.F12.clicked.connect(lambda x: self.process_function_key(self.F12))
|
301
305
|
|
@@ -503,25 +507,45 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
503
507
|
darkPalette = QtGui.QPalette()
|
504
508
|
darkColor = QtGui.QColor(56, 56, 56)
|
505
509
|
disabledColor = QtGui.QColor(127, 127, 127)
|
506
|
-
darkPalette.setColor(QtGui.QPalette.Window, darkColor)
|
507
|
-
darkPalette.setColor(
|
508
|
-
|
509
|
-
|
510
|
-
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
|
+
)
|
528
|
+
darkPalette.setColor(
|
529
|
+
QtGui.QPalette.ColorGroup.Disabled,
|
530
|
+
QtGui.QPalette.ColorRole.ButtonText,
|
531
|
+
disabledColor,
|
532
|
+
)
|
533
|
+
darkPalette.setColor(
|
534
|
+
QtGui.QPalette.ColorRole.BrightText, QColorConstants.Red
|
535
|
+
)
|
536
|
+
darkPalette.setColor(
|
537
|
+
QtGui.QPalette.ColorRole.Link, QtGui.QColor(42, 130, 218)
|
538
|
+
)
|
511
539
|
darkPalette.setColor(
|
512
|
-
QtGui.QPalette.
|
540
|
+
QtGui.QPalette.ColorRole.Highlight, QtGui.QColor(42, 130, 218)
|
513
541
|
)
|
514
|
-
darkPalette.setColor(QtGui.QPalette.Button, darkColor)
|
515
|
-
darkPalette.setColor(QtGui.QPalette.ButtonText, Qt.white)
|
516
542
|
darkPalette.setColor(
|
517
|
-
QtGui.QPalette.
|
543
|
+
QtGui.QPalette.ColorRole.HighlightedText, QColorConstants.Black
|
518
544
|
)
|
519
|
-
darkPalette.setColor(QtGui.QPalette.BrightText, Qt.red)
|
520
|
-
darkPalette.setColor(QtGui.QPalette.Link, QtGui.QColor(42, 130, 218))
|
521
|
-
darkPalette.setColor(QtGui.QPalette.Highlight, QtGui.QColor(42, 130, 218))
|
522
|
-
darkPalette.setColor(QtGui.QPalette.HighlightedText, Qt.black)
|
523
545
|
darkPalette.setColor(
|
524
|
-
QtGui.QPalette.Disabled,
|
546
|
+
QtGui.QPalette.ColorGroup.Disabled,
|
547
|
+
QtGui.QPalette.ColorRole.HighlightedText,
|
548
|
+
disabledColor,
|
525
549
|
)
|
526
550
|
dark_button_style = (
|
527
551
|
"QPushButton {"
|
@@ -540,7 +564,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
540
564
|
)
|
541
565
|
self.current_palette = darkPalette
|
542
566
|
self.setPalette(darkPalette)
|
543
|
-
self.text_color =
|
567
|
+
self.text_color = QColorConstants.White
|
544
568
|
self.menuFile.setPalette(darkPalette)
|
545
569
|
self.menuHelp.setPalette(darkPalette)
|
546
570
|
self.menuOther.setPalette(darkPalette)
|
@@ -579,7 +603,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
579
603
|
self.other_1.setPalette(palette)
|
580
604
|
self.other_2.setPalette(palette)
|
581
605
|
self.cw_entry.setPalette(palette)
|
582
|
-
self.text_color =
|
606
|
+
self.text_color = QColorConstants.Black
|
583
607
|
light_button_style = (
|
584
608
|
"QPushButton {"
|
585
609
|
"background-color: rgb(245,245,245);"
|
@@ -748,11 +772,11 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
748
772
|
message_box = QtWidgets.QMessageBox()
|
749
773
|
if self.current_palette:
|
750
774
|
message_box.setPalette(self.current_palette)
|
751
|
-
message_box.setIcon(QtWidgets.QMessageBox.Information)
|
775
|
+
message_box.setIcon(QtWidgets.QMessageBox.Icon.Information)
|
752
776
|
message_box.setText(message)
|
753
777
|
message_box.setWindowTitle("Information")
|
754
|
-
message_box.setStandardButtons(QtWidgets.QMessageBox.Ok)
|
755
|
-
_ = message_box.
|
778
|
+
message_box.setStandardButtons(QtWidgets.QMessageBox.StandardButton.Ok)
|
779
|
+
_ = message_box.exec()
|
756
780
|
|
757
781
|
def show_about_dialog(self) -> None:
|
758
782
|
"""
|
@@ -1337,9 +1361,10 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1337
1361
|
str: filename
|
1338
1362
|
"""
|
1339
1363
|
|
1340
|
-
options =
|
1341
|
-
|
1342
|
-
|
1364
|
+
options = (
|
1365
|
+
QFileDialog.Option.DontUseNativeDialog
|
1366
|
+
| QFileDialog.Option.DontConfirmOverwrite
|
1367
|
+
)
|
1343
1368
|
if action == "new":
|
1344
1369
|
file, _ = QFileDialog.getSaveFileName(
|
1345
1370
|
self,
|
@@ -1367,28 +1392,30 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1367
1392
|
"""Launch the log window"""
|
1368
1393
|
if not self.log_window:
|
1369
1394
|
self.log_window = LogWindow()
|
1370
|
-
self.addDockWidget(Qt.BottomDockWidgetArea, self.log_window)
|
1395
|
+
self.addDockWidget(Qt.DockWidgetArea.BottomDockWidgetArea, self.log_window)
|
1371
1396
|
self.log_window.show()
|
1372
1397
|
|
1373
1398
|
def launch_bandmap_window(self) -> None:
|
1374
1399
|
"""Launch the bandmap window"""
|
1375
1400
|
if not self.bandmap_window:
|
1376
1401
|
self.bandmap_window = BandMapWindow()
|
1377
|
-
self.addDockWidget(
|
1402
|
+
self.addDockWidget(
|
1403
|
+
Qt.DockWidgetArea.RightDockWidgetArea, self.bandmap_window
|
1404
|
+
)
|
1378
1405
|
self.bandmap_window.show()
|
1379
1406
|
|
1380
1407
|
def launch_check_window(self) -> None:
|
1381
1408
|
"""Launch the check window"""
|
1382
1409
|
if not self.check_window:
|
1383
1410
|
self.check_window = CheckWindow()
|
1384
|
-
self.addDockWidget(Qt.RightDockWidgetArea, self.check_window)
|
1411
|
+
self.addDockWidget(Qt.DockWidgetArea.RightDockWidgetArea, self.check_window)
|
1385
1412
|
self.check_window.show()
|
1386
1413
|
|
1387
1414
|
def launch_vfo(self) -> None:
|
1388
1415
|
"""Launch the VFO window"""
|
1389
1416
|
if not self.vfo_window:
|
1390
1417
|
self.vfo_window = VfoWindow()
|
1391
|
-
self.addDockWidget(Qt.RightDockWidgetArea, self.vfo_window)
|
1418
|
+
self.addDockWidget(Qt.DockWidgetArea.RightDockWidgetArea, self.vfo_window)
|
1392
1419
|
self.vfo_window.show()
|
1393
1420
|
|
1394
1421
|
def clear_band_indicators(self) -> None:
|
@@ -1405,8 +1432,8 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1405
1432
|
"""
|
1406
1433
|
for _, indicators in self.all_mode_indicators.items():
|
1407
1434
|
for _, indicator in indicators.items():
|
1408
|
-
indicator.setFrameShape(QtWidgets.QFrame.NoFrame)
|
1409
|
-
if self.text_color ==
|
1435
|
+
indicator.setFrameShape(QtWidgets.QFrame.Shape.NoFrame)
|
1436
|
+
if self.text_color == QColorConstants.Black:
|
1410
1437
|
indicator.setStyleSheet(
|
1411
1438
|
"font-family: JetBrains Mono; color: black;"
|
1412
1439
|
)
|
@@ -1431,7 +1458,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1431
1458
|
self.clear_band_indicators()
|
1432
1459
|
indicator = self.all_mode_indicators[self.current_mode].get(band, None)
|
1433
1460
|
if indicator:
|
1434
|
-
indicator.setFrameShape(QtWidgets.QFrame.Box)
|
1461
|
+
indicator.setFrameShape(QtWidgets.QFrame.Shape.Box)
|
1435
1462
|
indicator.setStyleSheet("font-family: JetBrains Mono; color: green;")
|
1436
1463
|
|
1437
1464
|
def closeEvent(self, _event) -> None:
|
@@ -1520,7 +1547,10 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1520
1547
|
if event.key() == Qt.Key.Key_K:
|
1521
1548
|
self.toggle_cw_entry()
|
1522
1549
|
return
|
1523
|
-
if
|
1550
|
+
if (
|
1551
|
+
event.key() == Qt.Key.Key_S
|
1552
|
+
and modifier == Qt.KeyboardModifier.ControlModifier
|
1553
|
+
):
|
1524
1554
|
freq = self.radio_state.get("vfoa")
|
1525
1555
|
dx = self.callsign.text()
|
1526
1556
|
if freq and dx:
|
@@ -1531,7 +1561,10 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1531
1561
|
cmd["freq"] = float(int(freq) / 1000)
|
1532
1562
|
self.multicast_interface.send_as_json(cmd)
|
1533
1563
|
return
|
1534
|
-
if
|
1564
|
+
if (
|
1565
|
+
event.key() == Qt.Key.Key_M
|
1566
|
+
and modifier == Qt.KeyboardModifier.ControlModifier
|
1567
|
+
):
|
1535
1568
|
freq = self.radio_state.get("vfoa")
|
1536
1569
|
dx = self.callsign.text()
|
1537
1570
|
if freq and dx:
|
@@ -1542,7 +1575,10 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1542
1575
|
cmd["freq"] = float(int(freq) / 1000)
|
1543
1576
|
self.multicast_interface.send_as_json(cmd)
|
1544
1577
|
return
|
1545
|
-
if
|
1578
|
+
if (
|
1579
|
+
event.key() == Qt.Key.Key_G
|
1580
|
+
and modifier == Qt.KeyboardModifier.ControlModifier
|
1581
|
+
):
|
1546
1582
|
dx = self.callsign.text()
|
1547
1583
|
if dx:
|
1548
1584
|
cmd = {}
|
@@ -1552,11 +1588,15 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1552
1588
|
self.multicast_interface.send_as_json(cmd)
|
1553
1589
|
return
|
1554
1590
|
if (
|
1555
|
-
event.key() == Qt.Key.Key_Escape
|
1591
|
+
event.key() == Qt.Key.Key_Escape
|
1592
|
+
and modifier != Qt.KeyboardModifier.ControlModifier
|
1556
1593
|
): # pylint: disable=no-member
|
1557
1594
|
self.clearinputs()
|
1558
1595
|
return
|
1559
|
-
if
|
1596
|
+
if (
|
1597
|
+
event.key() == Qt.Key.Key_Escape
|
1598
|
+
and modifier == Qt.KeyboardModifier.ControlModifier
|
1599
|
+
):
|
1560
1600
|
if self.cw is not None:
|
1561
1601
|
if self.cw.servertype == 1:
|
1562
1602
|
self.cw.sendcw("\x1b4")
|
@@ -1573,7 +1613,10 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1573
1613
|
cmd["station"] = platform.node()
|
1574
1614
|
self.multicast_interface.send_as_json(cmd)
|
1575
1615
|
return
|
1576
|
-
if
|
1616
|
+
if (
|
1617
|
+
event.key() == Qt.Key.Key_PageUp
|
1618
|
+
and modifier != Qt.KeyboardModifier.ControlModifier
|
1619
|
+
):
|
1577
1620
|
if self.cw is not None:
|
1578
1621
|
self.cw.speed += 1
|
1579
1622
|
self.cw_speed.setValue(self.cw.speed)
|
@@ -1582,7 +1625,10 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1582
1625
|
if self.cw.servertype == 2:
|
1583
1626
|
self.cw.set_winkeyer_speed(self.cw_speed.value())
|
1584
1627
|
return
|
1585
|
-
if
|
1628
|
+
if (
|
1629
|
+
event.key() == Qt.Key.Key_PageDown
|
1630
|
+
and modifier != Qt.KeyboardModifier.ControlModifier
|
1631
|
+
):
|
1586
1632
|
if self.cw is not None:
|
1587
1633
|
self.cw.speed -= 1
|
1588
1634
|
self.cw_speed.setValue(self.cw.speed)
|
@@ -1594,7 +1640,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1594
1640
|
if event.key() == Qt.Key.Key_Tab or event.key() == Qt.Key.Key_Backtab:
|
1595
1641
|
if self.sent.hasFocus():
|
1596
1642
|
logger.debug("From sent")
|
1597
|
-
if modifier == Qt.ShiftModifier:
|
1643
|
+
if modifier == Qt.KeyboardModifier.ShiftModifier:
|
1598
1644
|
prev_tab = self.tab_prev.get(self.sent)
|
1599
1645
|
prev_tab.setFocus()
|
1600
1646
|
prev_tab.deselect()
|
@@ -1607,7 +1653,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1607
1653
|
return
|
1608
1654
|
if self.receive.hasFocus():
|
1609
1655
|
logger.debug("From receive")
|
1610
|
-
if modifier == Qt.ShiftModifier:
|
1656
|
+
if modifier == Qt.KeyboardModifier.ShiftModifier:
|
1611
1657
|
prev_tab = self.tab_prev.get(self.receive)
|
1612
1658
|
prev_tab.setFocus()
|
1613
1659
|
prev_tab.deselect()
|
@@ -1620,7 +1666,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1620
1666
|
return
|
1621
1667
|
if self.other_1.hasFocus():
|
1622
1668
|
logger.debug("From other_1")
|
1623
|
-
if modifier == Qt.ShiftModifier:
|
1669
|
+
if modifier == Qt.KeyboardModifier.ShiftModifier:
|
1624
1670
|
prev_tab = self.tab_prev.get(self.other_1)
|
1625
1671
|
prev_tab.setFocus()
|
1626
1672
|
prev_tab.deselect()
|
@@ -1633,7 +1679,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1633
1679
|
return
|
1634
1680
|
if self.other_2.hasFocus():
|
1635
1681
|
logger.debug("From other_2")
|
1636
|
-
if modifier == Qt.ShiftModifier:
|
1682
|
+
if modifier == Qt.KeyboardModifier.ShiftModifier:
|
1637
1683
|
prev_tab = self.tab_prev.get(self.other_2)
|
1638
1684
|
prev_tab.setFocus()
|
1639
1685
|
prev_tab.deselect()
|
@@ -1651,7 +1697,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1651
1697
|
self.dupe_indicator.show()
|
1652
1698
|
else:
|
1653
1699
|
self.dupe_indicator.hide()
|
1654
|
-
if modifier == Qt.ShiftModifier:
|
1700
|
+
if modifier == Qt.KeyboardModifier.ShiftModifier:
|
1655
1701
|
prev_tab = self.tab_prev.get(self.callsign)
|
1656
1702
|
prev_tab.setFocus()
|
1657
1703
|
prev_tab.deselect()
|
@@ -1670,29 +1716,29 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1670
1716
|
next_tab.deselect()
|
1671
1717
|
next_tab.end(False)
|
1672
1718
|
return
|
1673
|
-
if event.key() == Qt.Key_F1:
|
1719
|
+
if event.key() == Qt.Key.Key_F1:
|
1674
1720
|
self.process_function_key(self.F1)
|
1675
|
-
if event.key() == Qt.Key_F2:
|
1721
|
+
if event.key() == Qt.Key.Key_F2:
|
1676
1722
|
self.process_function_key(self.F2)
|
1677
|
-
if event.key() == Qt.Key_F3:
|
1723
|
+
if event.key() == Qt.Key.Key_F3:
|
1678
1724
|
self.process_function_key(self.F3)
|
1679
|
-
if event.key() == Qt.Key_F4:
|
1725
|
+
if event.key() == Qt.Key.Key_F4:
|
1680
1726
|
self.process_function_key(self.F4)
|
1681
|
-
if event.key() == Qt.Key_F5:
|
1727
|
+
if event.key() == Qt.Key.Key_F5:
|
1682
1728
|
self.process_function_key(self.F5)
|
1683
|
-
if event.key() == Qt.Key_F6:
|
1729
|
+
if event.key() == Qt.Key.Key_F6:
|
1684
1730
|
self.process_function_key(self.F6)
|
1685
|
-
if event.key() == Qt.Key_F7:
|
1731
|
+
if event.key() == Qt.Key.Key_F7:
|
1686
1732
|
self.process_function_key(self.F7)
|
1687
|
-
if event.key() == Qt.Key_F8:
|
1733
|
+
if event.key() == Qt.Key.Key_F8:
|
1688
1734
|
self.process_function_key(self.F8)
|
1689
|
-
if event.key() == Qt.Key_F9:
|
1735
|
+
if event.key() == Qt.Key.Key_F9:
|
1690
1736
|
self.process_function_key(self.F9)
|
1691
|
-
if event.key() == Qt.Key_F10:
|
1737
|
+
if event.key() == Qt.Key.Key_F10:
|
1692
1738
|
self.process_function_key(self.F10)
|
1693
|
-
if event.key() == Qt.Key_F11:
|
1739
|
+
if event.key() == Qt.Key.Key_F11:
|
1694
1740
|
self.process_function_key(self.F11)
|
1695
|
-
if event.key() == Qt.Key_F12:
|
1741
|
+
if event.key() == Qt.Key.Key_F12:
|
1696
1742
|
self.process_function_key(self.F12)
|
1697
1743
|
|
1698
1744
|
def set_window_title(self) -> None:
|
@@ -2499,6 +2545,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
2499
2545
|
and json_data.get("station", "") == platform.node()
|
2500
2546
|
):
|
2501
2547
|
self.callsign.setText(json_data.get("call", ""))
|
2548
|
+
self.callsign.setFocus()
|
2502
2549
|
|
2503
2550
|
def dark_mode_state_changed(self) -> None:
|
2504
2551
|
"""Called when the Dark Mode menu state is changed."""
|
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)
|