not1mm 25.3.31.1__py3-none-any.whl → 25.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 +10 -33
- not1mm/checkwindow.py +2 -46
- not1mm/data/MASTER.SCP +4353 -4553
- not1mm/data/bandmap.ui +29 -11
- not1mm/data/cty.json +1 -1
- not1mm/data/main.ui +39 -30
- not1mm/data/ratewindow.ui +13 -396
- not1mm/lib/version.py +1 -1
- not1mm/logwindow.py +0 -49
- not1mm/ratewindow.py +0 -77
- not1mm/statistics.py +0 -50
- not1mm/vfo.py +0 -48
- {not1mm-25.3.31.1.dist-info → not1mm-25.4.2.dist-info}/METADATA +13 -23
- {not1mm-25.3.31.1.dist-info → not1mm-25.4.2.dist-info}/RECORD +18 -18
- {not1mm-25.3.31.1.dist-info → not1mm-25.4.2.dist-info}/WHEEL +0 -0
- {not1mm-25.3.31.1.dist-info → not1mm-25.4.2.dist-info}/entry_points.txt +0 -0
- {not1mm-25.3.31.1.dist-info → not1mm-25.4.2.dist-info}/licenses/LICENSE +0 -0
- {not1mm-25.3.31.1.dist-info → not1mm-25.4.2.dist-info}/top_level.txt +0 -0
not1mm/data/ratewindow.ui
CHANGED
@@ -7,9 +7,21 @@
|
|
7
7
|
<x>0</x>
|
8
8
|
<y>0</y>
|
9
9
|
<width>252</width>
|
10
|
-
<height>
|
10
|
+
<height>250</height>
|
11
11
|
</rect>
|
12
12
|
</property>
|
13
|
+
<property name="sizePolicy">
|
14
|
+
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
15
|
+
<horstretch>0</horstretch>
|
16
|
+
<verstretch>0</verstretch>
|
17
|
+
</sizepolicy>
|
18
|
+
</property>
|
19
|
+
<property name="minimumSize">
|
20
|
+
<size>
|
21
|
+
<width>200</width>
|
22
|
+
<height>200</height>
|
23
|
+
</size>
|
24
|
+
</property>
|
13
25
|
<property name="font">
|
14
26
|
<font>
|
15
27
|
<family>JetBrains Mono ExtraLight</family>
|
@@ -225,90 +237,6 @@
|
|
225
237
|
</property>
|
226
238
|
</widget>
|
227
239
|
</item>
|
228
|
-
<item>
|
229
|
-
<layout class="QFormLayout" name="formLayout_2">
|
230
|
-
<property name="sizeConstraint">
|
231
|
-
<enum>QLayout::SizeConstraint::SetMinimumSize</enum>
|
232
|
-
</property>
|
233
|
-
<property name="labelAlignment">
|
234
|
-
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
235
|
-
</property>
|
236
|
-
<property name="formAlignment">
|
237
|
-
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
238
|
-
</property>
|
239
|
-
<item row="0" column="0">
|
240
|
-
<widget class="QLabel" name="label_10">
|
241
|
-
<property name="minimumSize">
|
242
|
-
<size>
|
243
|
-
<width>112</width>
|
244
|
-
<height>0</height>
|
245
|
-
</size>
|
246
|
-
</property>
|
247
|
-
<property name="text">
|
248
|
-
<string>Time ON:</string>
|
249
|
-
</property>
|
250
|
-
<property name="alignment">
|
251
|
-
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
252
|
-
</property>
|
253
|
-
</widget>
|
254
|
-
</item>
|
255
|
-
<item row="0" column="1">
|
256
|
-
<widget class="QLabel" name="time_on">
|
257
|
-
<property name="maximumSize">
|
258
|
-
<size>
|
259
|
-
<width>112</width>
|
260
|
-
<height>16777215</height>
|
261
|
-
</size>
|
262
|
-
</property>
|
263
|
-
<property name="text">
|
264
|
-
<string>00:00</string>
|
265
|
-
</property>
|
266
|
-
<property name="alignment">
|
267
|
-
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
268
|
-
</property>
|
269
|
-
</widget>
|
270
|
-
</item>
|
271
|
-
<item row="1" column="0">
|
272
|
-
<widget class="QLabel" name="label_12">
|
273
|
-
<property name="text">
|
274
|
-
<string>Time off:</string>
|
275
|
-
</property>
|
276
|
-
<property name="alignment">
|
277
|
-
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
278
|
-
</property>
|
279
|
-
</widget>
|
280
|
-
</item>
|
281
|
-
<item row="1" column="1">
|
282
|
-
<widget class="QLabel" name="time_off">
|
283
|
-
<property name="maximumSize">
|
284
|
-
<size>
|
285
|
-
<width>112</width>
|
286
|
-
<height>16777215</height>
|
287
|
-
</size>
|
288
|
-
</property>
|
289
|
-
<property name="text">
|
290
|
-
<string>00:00</string>
|
291
|
-
</property>
|
292
|
-
<property name="alignment">
|
293
|
-
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
294
|
-
</property>
|
295
|
-
</widget>
|
296
|
-
</item>
|
297
|
-
</layout>
|
298
|
-
</item>
|
299
|
-
<item>
|
300
|
-
<widget class="Line" name="line_2">
|
301
|
-
<property name="lineWidth">
|
302
|
-
<number>4</number>
|
303
|
-
</property>
|
304
|
-
<property name="midLineWidth">
|
305
|
-
<number>0</number>
|
306
|
-
</property>
|
307
|
-
<property name="orientation">
|
308
|
-
<enum>Qt::Horizontal</enum>
|
309
|
-
</property>
|
310
|
-
</widget>
|
311
|
-
</item>
|
312
240
|
<item>
|
313
241
|
<layout class="QFormLayout" name="formLayout_3">
|
314
242
|
<property name="sizeConstraint">
|
@@ -432,317 +360,6 @@
|
|
432
360
|
</item>
|
433
361
|
</layout>
|
434
362
|
</item>
|
435
|
-
<item>
|
436
|
-
<widget class="Line" name="line_4">
|
437
|
-
<property name="lineWidth">
|
438
|
-
<number>4</number>
|
439
|
-
</property>
|
440
|
-
<property name="orientation">
|
441
|
-
<enum>Qt::Horizontal</enum>
|
442
|
-
</property>
|
443
|
-
</widget>
|
444
|
-
</item>
|
445
|
-
<item>
|
446
|
-
<widget class="QLabel" name="band_mode">
|
447
|
-
<property name="font">
|
448
|
-
<font>
|
449
|
-
<family>JetBrains Mono ExtraLight</family>
|
450
|
-
<bold>true</bold>
|
451
|
-
</font>
|
452
|
-
</property>
|
453
|
-
<property name="text">
|
454
|
-
<string>Band: 144 - Mode: CW 00 WPM</string>
|
455
|
-
</property>
|
456
|
-
<property name="alignment">
|
457
|
-
<set>Qt::AlignCenter</set>
|
458
|
-
</property>
|
459
|
-
</widget>
|
460
|
-
</item>
|
461
|
-
<item>
|
462
|
-
<layout class="QFormLayout" name="formLayout_4">
|
463
|
-
<property name="sizeConstraint">
|
464
|
-
<enum>QLayout::SizeConstraint::SetMinimumSize</enum>
|
465
|
-
</property>
|
466
|
-
<property name="labelAlignment">
|
467
|
-
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
468
|
-
</property>
|
469
|
-
<property name="formAlignment">
|
470
|
-
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
471
|
-
</property>
|
472
|
-
<property name="topMargin">
|
473
|
-
<number>0</number>
|
474
|
-
</property>
|
475
|
-
<property name="bottomMargin">
|
476
|
-
<number>0</number>
|
477
|
-
</property>
|
478
|
-
<item row="0" column="0">
|
479
|
-
<widget class="QLabel" name="label_23">
|
480
|
-
<property name="minimumSize">
|
481
|
-
<size>
|
482
|
-
<width>112</width>
|
483
|
-
<height>0</height>
|
484
|
-
</size>
|
485
|
-
</property>
|
486
|
-
<property name="text">
|
487
|
-
<string>Average km:</string>
|
488
|
-
</property>
|
489
|
-
<property name="alignment">
|
490
|
-
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
491
|
-
</property>
|
492
|
-
</widget>
|
493
|
-
</item>
|
494
|
-
<item row="0" column="1">
|
495
|
-
<widget class="QLabel" name="avg_km">
|
496
|
-
<property name="maximumSize">
|
497
|
-
<size>
|
498
|
-
<width>112</width>
|
499
|
-
<height>16777215</height>
|
500
|
-
</size>
|
501
|
-
</property>
|
502
|
-
<property name="text">
|
503
|
-
<string>0 km </string>
|
504
|
-
</property>
|
505
|
-
<property name="alignment">
|
506
|
-
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
507
|
-
</property>
|
508
|
-
</widget>
|
509
|
-
</item>
|
510
|
-
<item row="1" column="0">
|
511
|
-
<widget class="QLabel" name="label_25">
|
512
|
-
<property name="text">
|
513
|
-
<string>Average pts:</string>
|
514
|
-
</property>
|
515
|
-
<property name="alignment">
|
516
|
-
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
517
|
-
</property>
|
518
|
-
</widget>
|
519
|
-
</item>
|
520
|
-
<item row="1" column="1">
|
521
|
-
<widget class="QLabel" name="avg_pts">
|
522
|
-
<property name="maximumSize">
|
523
|
-
<size>
|
524
|
-
<width>112</width>
|
525
|
-
<height>16777215</height>
|
526
|
-
</size>
|
527
|
-
</property>
|
528
|
-
<property name="text">
|
529
|
-
<string>0 pts</string>
|
530
|
-
</property>
|
531
|
-
<property name="alignment">
|
532
|
-
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
533
|
-
</property>
|
534
|
-
</widget>
|
535
|
-
</item>
|
536
|
-
</layout>
|
537
|
-
</item>
|
538
|
-
<item>
|
539
|
-
<widget class="QLabel" name="best_dx">
|
540
|
-
<property name="text">
|
541
|
-
<string>9A5K JN85PO 1165km</string>
|
542
|
-
</property>
|
543
|
-
<property name="alignment">
|
544
|
-
<set>Qt::AlignCenter</set>
|
545
|
-
</property>
|
546
|
-
</widget>
|
547
|
-
</item>
|
548
|
-
<item>
|
549
|
-
<widget class="QLabel" name="label_26">
|
550
|
-
<property name="text">
|
551
|
-
<string>- Best DX (ODX) -</string>
|
552
|
-
</property>
|
553
|
-
<property name="alignment">
|
554
|
-
<set>Qt::AlignCenter</set>
|
555
|
-
</property>
|
556
|
-
</widget>
|
557
|
-
</item>
|
558
|
-
<item>
|
559
|
-
<widget class="Line" name="line_5">
|
560
|
-
<property name="lineWidth">
|
561
|
-
<number>4</number>
|
562
|
-
</property>
|
563
|
-
<property name="orientation">
|
564
|
-
<enum>Qt::Horizontal</enum>
|
565
|
-
</property>
|
566
|
-
</widget>
|
567
|
-
</item>
|
568
|
-
<item>
|
569
|
-
<widget class="QLabel" name="label_29">
|
570
|
-
<property name="text">
|
571
|
-
<string>All bands - All modes</string>
|
572
|
-
</property>
|
573
|
-
<property name="alignment">
|
574
|
-
<set>Qt::AlignCenter</set>
|
575
|
-
</property>
|
576
|
-
</widget>
|
577
|
-
</item>
|
578
|
-
<item>
|
579
|
-
<layout class="QFormLayout" name="formLayout_5">
|
580
|
-
<property name="sizeConstraint">
|
581
|
-
<enum>QLayout::SizeConstraint::SetMinimumSize</enum>
|
582
|
-
</property>
|
583
|
-
<property name="labelAlignment">
|
584
|
-
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
585
|
-
</property>
|
586
|
-
<property name="formAlignment">
|
587
|
-
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
588
|
-
</property>
|
589
|
-
<property name="topMargin">
|
590
|
-
<number>0</number>
|
591
|
-
</property>
|
592
|
-
<property name="bottomMargin">
|
593
|
-
<number>0</number>
|
594
|
-
</property>
|
595
|
-
<item row="0" column="0">
|
596
|
-
<widget class="QLabel" name="label_30">
|
597
|
-
<property name="minimumSize">
|
598
|
-
<size>
|
599
|
-
<width>112</width>
|
600
|
-
<height>0</height>
|
601
|
-
</size>
|
602
|
-
</property>
|
603
|
-
<property name="text">
|
604
|
-
<string>Time by mult:</string>
|
605
|
-
</property>
|
606
|
-
<property name="alignment">
|
607
|
-
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
608
|
-
</property>
|
609
|
-
</widget>
|
610
|
-
</item>
|
611
|
-
<item row="0" column="1">
|
612
|
-
<widget class="QLabel" name="time_by_mult">
|
613
|
-
<property name="minimumSize">
|
614
|
-
<size>
|
615
|
-
<width>112</width>
|
616
|
-
<height>0</height>
|
617
|
-
</size>
|
618
|
-
</property>
|
619
|
-
<property name="maximumSize">
|
620
|
-
<size>
|
621
|
-
<width>112</width>
|
622
|
-
<height>16777215</height>
|
623
|
-
</size>
|
624
|
-
</property>
|
625
|
-
<property name="text">
|
626
|
-
<string>0 min 0 sec</string>
|
627
|
-
</property>
|
628
|
-
<property name="alignment">
|
629
|
-
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
630
|
-
</property>
|
631
|
-
</widget>
|
632
|
-
</item>
|
633
|
-
<item row="1" column="0">
|
634
|
-
<widget class="QLabel" name="label_32">
|
635
|
-
<property name="text">
|
636
|
-
<string>1 QSO Counts:</string>
|
637
|
-
</property>
|
638
|
-
<property name="alignment">
|
639
|
-
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
640
|
-
</property>
|
641
|
-
</widget>
|
642
|
-
</item>
|
643
|
-
<item row="1" column="1">
|
644
|
-
<widget class="QLabel" name="qso_counts">
|
645
|
-
<property name="maximumSize">
|
646
|
-
<size>
|
647
|
-
<width>112</width>
|
648
|
-
<height>16777215</height>
|
649
|
-
</size>
|
650
|
-
</property>
|
651
|
-
<property name="text">
|
652
|
-
<string>0 pts</string>
|
653
|
-
</property>
|
654
|
-
<property name="alignment">
|
655
|
-
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
656
|
-
</property>
|
657
|
-
</widget>
|
658
|
-
</item>
|
659
|
-
<item row="2" column="0">
|
660
|
-
<widget class="QLabel" name="label_34">
|
661
|
-
<property name="text">
|
662
|
-
<string>1 Mult Counts:</string>
|
663
|
-
</property>
|
664
|
-
<property name="alignment">
|
665
|
-
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
666
|
-
</property>
|
667
|
-
</widget>
|
668
|
-
</item>
|
669
|
-
<item row="3" column="0">
|
670
|
-
<widget class="QLabel" name="label_35">
|
671
|
-
<property name="text">
|
672
|
-
<string>1 Mult Worth:</string>
|
673
|
-
</property>
|
674
|
-
<property name="alignment">
|
675
|
-
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
676
|
-
</property>
|
677
|
-
</widget>
|
678
|
-
</item>
|
679
|
-
<item row="2" column="1">
|
680
|
-
<widget class="QLabel" name="mult_counts">
|
681
|
-
<property name="maximumSize">
|
682
|
-
<size>
|
683
|
-
<width>112</width>
|
684
|
-
<height>16777215</height>
|
685
|
-
</size>
|
686
|
-
</property>
|
687
|
-
<property name="text">
|
688
|
-
<string>0 pts</string>
|
689
|
-
</property>
|
690
|
-
<property name="alignment">
|
691
|
-
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
692
|
-
</property>
|
693
|
-
</widget>
|
694
|
-
</item>
|
695
|
-
<item row="3" column="1">
|
696
|
-
<widget class="QLabel" name="mult_worth">
|
697
|
-
<property name="maximumSize">
|
698
|
-
<size>
|
699
|
-
<width>112</width>
|
700
|
-
<height>16777215</height>
|
701
|
-
</size>
|
702
|
-
</property>
|
703
|
-
<property name="text">
|
704
|
-
<string>0.0 QSO</string>
|
705
|
-
</property>
|
706
|
-
<property name="alignment">
|
707
|
-
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
708
|
-
</property>
|
709
|
-
</widget>
|
710
|
-
</item>
|
711
|
-
</layout>
|
712
|
-
</item>
|
713
|
-
<item>
|
714
|
-
<widget class="Line" name="line_6">
|
715
|
-
<property name="lineWidth">
|
716
|
-
<number>4</number>
|
717
|
-
</property>
|
718
|
-
<property name="orientation">
|
719
|
-
<enum>Qt::Horizontal</enum>
|
720
|
-
</property>
|
721
|
-
</widget>
|
722
|
-
</item>
|
723
|
-
<item>
|
724
|
-
<widget class="QLabel" name="label_38">
|
725
|
-
<property name="text">
|
726
|
-
<string>CW 00 WPM R11</string>
|
727
|
-
</property>
|
728
|
-
<property name="alignment">
|
729
|
-
<set>Qt::AlignCenter</set>
|
730
|
-
</property>
|
731
|
-
</widget>
|
732
|
-
</item>
|
733
|
-
<item>
|
734
|
-
<spacer name="verticalSpacer">
|
735
|
-
<property name="orientation">
|
736
|
-
<enum>Qt::Vertical</enum>
|
737
|
-
</property>
|
738
|
-
<property name="sizeHint" stdset="0">
|
739
|
-
<size>
|
740
|
-
<width>20</width>
|
741
|
-
<height>40</height>
|
742
|
-
</size>
|
743
|
-
</property>
|
744
|
-
</spacer>
|
745
|
-
</item>
|
746
363
|
</layout>
|
747
364
|
</item>
|
748
365
|
</layout>
|
not1mm/lib/version.py
CHANGED
not1mm/logwindow.py
CHANGED
@@ -20,7 +20,6 @@ import math
|
|
20
20
|
from PyQt6 import QtCore, QtGui, QtWidgets, uic
|
21
21
|
from PyQt6.QtCore import QItemSelectionModel
|
22
22
|
from PyQt6.QtWidgets import QDockWidget
|
23
|
-
from PyQt6.QtGui import QColorConstants, QPalette, QColor
|
24
23
|
from PyQt6.QtCore import pyqtSignal
|
25
24
|
|
26
25
|
import not1mm.fsutils as fsutils
|
@@ -193,59 +192,12 @@ class LogWindow(QDockWidget):
|
|
193
192
|
column = "Freq (Khz)"
|
194
193
|
self.generalLog.setColumnHidden(self.get_column(column), False)
|
195
194
|
self.focusedLog.setColumnHidden(self.get_column(column), False)
|
196
|
-
if msg.get("cmd", "") == "DARKMODE":
|
197
|
-
print(f".................{msg.get("state", False)=}")
|
198
|
-
self.set_dark_mode(msg.get("state", False))
|
199
195
|
|
200
196
|
def resize_headers_to_match(self) -> None:
|
201
197
|
""""""
|
202
198
|
for i in range(self.generalLog.columnCount()):
|
203
199
|
self.focusedLog.setColumnWidth(i, self.generalLog.columnWidth(i))
|
204
200
|
|
205
|
-
def set_dark_mode(self, dark: bool) -> None:
|
206
|
-
"""Forces a darkmode palette."""
|
207
|
-
return
|
208
|
-
|
209
|
-
if dark:
|
210
|
-
darkPalette = QPalette()
|
211
|
-
darkColor = QColor(56, 56, 56)
|
212
|
-
disabledColor = QColor(127, 127, 127)
|
213
|
-
darkPalette.setColor(QPalette.ColorRole.Window, darkColor)
|
214
|
-
darkPalette.setColor(QPalette.ColorRole.WindowText, QColorConstants.White)
|
215
|
-
darkPalette.setColor(QPalette.ColorRole.Base, QColor(45, 45, 45))
|
216
|
-
darkPalette.setColor(QPalette.ColorRole.AlternateBase, darkColor)
|
217
|
-
darkPalette.setColor(QPalette.ColorRole.Text, QColorConstants.White)
|
218
|
-
darkPalette.setColor(QPalette.ColorRole.Button, darkColor)
|
219
|
-
darkPalette.setColor(QPalette.ColorRole.ButtonText, QColorConstants.White)
|
220
|
-
darkPalette.setColor(QPalette.ColorRole.BrightText, QColorConstants.Red)
|
221
|
-
darkPalette.setColor(QPalette.ColorRole.Link, QColor(42, 130, 218))
|
222
|
-
darkPalette.setColor(QPalette.ColorRole.Highlight, QColor(42, 130, 218))
|
223
|
-
darkPalette.setColor(
|
224
|
-
QPalette.ColorRole.HighlightedText, QColorConstants.Black
|
225
|
-
)
|
226
|
-
darkPalette.setColor(
|
227
|
-
QPalette.ColorGroup.Disabled,
|
228
|
-
QPalette.ColorRole.ButtonText,
|
229
|
-
disabledColor,
|
230
|
-
)
|
231
|
-
darkPalette.setColor(
|
232
|
-
QPalette.ColorGroup.Disabled,
|
233
|
-
QPalette.ColorRole.HighlightedText,
|
234
|
-
disabledColor,
|
235
|
-
)
|
236
|
-
darkPalette.setColor(
|
237
|
-
QPalette.ColorGroup.Disabled,
|
238
|
-
QPalette.ColorRole.Text,
|
239
|
-
disabledColor,
|
240
|
-
)
|
241
|
-
|
242
|
-
self.setPalette(darkPalette)
|
243
|
-
self.current_palette = darkPalette
|
244
|
-
else:
|
245
|
-
palette = self.style().standardPalette()
|
246
|
-
self.setPalette(palette)
|
247
|
-
self.current_palette = palette
|
248
|
-
|
249
201
|
def get_column(self, name: str) -> int:
|
250
202
|
"""
|
251
203
|
Returns the column number of the given column name.
|
@@ -303,7 +255,6 @@ class LogWindow(QDockWidget):
|
|
303
255
|
self.n1mm.send_lookup_packets = self.pref.get("send_n1mm_lookup", False)
|
304
256
|
self.n1mm.send_score_packets = self.pref.get("send_n1mm_score", False)
|
305
257
|
self.n1mm.radio_info["StationName"] = self.pref.get("n1mm_station_name", "")
|
306
|
-
self.set_dark_mode(self.pref.get("darkmode", False))
|
307
258
|
|
308
259
|
def load_new_db(self) -> None:
|
309
260
|
"""
|
not1mm/ratewindow.py
CHANGED
@@ -15,7 +15,6 @@ import os
|
|
15
15
|
|
16
16
|
from PyQt6 import uic
|
17
17
|
from PyQt6.QtWidgets import QDockWidget
|
18
|
-
from PyQt6.QtGui import QColorConstants, QPalette, QColor
|
19
18
|
from PyQt6.QtCore import pyqtSignal, QTimer
|
20
19
|
|
21
20
|
import not1mm.fsutils as fsutils
|
@@ -46,16 +45,12 @@ class RateWindow(QDockWidget):
|
|
46
45
|
self.database.current_contest = self.pref.get("contest", 0)
|
47
46
|
|
48
47
|
uic.loadUi(fsutils.APP_DATA_PATH / "ratewindow.ui", self)
|
49
|
-
self.hide_unused()
|
50
48
|
self.timer = QTimer()
|
51
49
|
self.timer.timeout.connect(self.get_run_and_total_qs)
|
52
50
|
self.timer.start(1000)
|
53
51
|
|
54
52
|
def msg_from_main(self, packet):
|
55
53
|
""""""
|
56
|
-
if packet.get("cmd", "") == "DARKMODE":
|
57
|
-
self.setDarkMode(packet.get("state", False))
|
58
|
-
return
|
59
54
|
|
60
55
|
if self.active is False:
|
61
56
|
return
|
@@ -71,47 +66,6 @@ class RateWindow(QDockWidget):
|
|
71
66
|
def setActive(self, mode: bool):
|
72
67
|
self.active = bool(mode)
|
73
68
|
|
74
|
-
def setDarkMode(self, dark: bool) -> None:
|
75
|
-
"""Forces a darkmode palette."""
|
76
|
-
return
|
77
|
-
if dark:
|
78
|
-
darkPalette = QPalette()
|
79
|
-
darkColor = QColor(56, 56, 56)
|
80
|
-
disabledColor = QColor(127, 127, 127)
|
81
|
-
darkPalette.setColor(QPalette.ColorRole.Window, darkColor)
|
82
|
-
darkPalette.setColor(QPalette.ColorRole.WindowText, QColorConstants.White)
|
83
|
-
darkPalette.setColor(QPalette.ColorRole.Base, QColor(45, 45, 45))
|
84
|
-
darkPalette.setColor(QPalette.ColorRole.AlternateBase, darkColor)
|
85
|
-
darkPalette.setColor(QPalette.ColorRole.Text, QColorConstants.White)
|
86
|
-
darkPalette.setColor(QPalette.ColorRole.Button, darkColor)
|
87
|
-
darkPalette.setColor(QPalette.ColorRole.ButtonText, QColorConstants.White)
|
88
|
-
darkPalette.setColor(QPalette.ColorRole.BrightText, QColorConstants.Red)
|
89
|
-
darkPalette.setColor(QPalette.ColorRole.Link, QColor(42, 130, 218))
|
90
|
-
darkPalette.setColor(QPalette.ColorRole.Highlight, QColor(42, 130, 218))
|
91
|
-
darkPalette.setColor(
|
92
|
-
QPalette.ColorRole.HighlightedText, QColorConstants.Black
|
93
|
-
)
|
94
|
-
darkPalette.setColor(
|
95
|
-
QPalette.ColorGroup.Disabled,
|
96
|
-
QPalette.ColorRole.ButtonText,
|
97
|
-
disabledColor,
|
98
|
-
)
|
99
|
-
darkPalette.setColor(
|
100
|
-
QPalette.ColorGroup.Disabled,
|
101
|
-
QPalette.ColorRole.HighlightedText,
|
102
|
-
disabledColor,
|
103
|
-
)
|
104
|
-
darkPalette.setColor(
|
105
|
-
QPalette.ColorGroup.Disabled,
|
106
|
-
QPalette.ColorRole.Text,
|
107
|
-
disabledColor,
|
108
|
-
)
|
109
|
-
|
110
|
-
self.setPalette(darkPalette)
|
111
|
-
else:
|
112
|
-
palette = self.style().standardPalette()
|
113
|
-
self.setPalette(palette)
|
114
|
-
|
115
69
|
def load_pref(self) -> None:
|
116
70
|
"""
|
117
71
|
Load preference file to get current db filename and sets the initial darkmode state.
|
@@ -136,7 +90,6 @@ class RateWindow(QDockWidget):
|
|
136
90
|
|
137
91
|
except (IOError, JSONDecodeError) as exception:
|
138
92
|
logger.critical("Error: %s", exception)
|
139
|
-
self.setDarkMode(self.pref.get("darkmode", False))
|
140
93
|
|
141
94
|
def get_run_and_total_qs(self):
|
142
95
|
"""get numbers"""
|
@@ -222,7 +175,6 @@ class RateWindow(QDockWidget):
|
|
222
175
|
sandp = result.get("totalqs", 0) - result.get("runs", 0)
|
223
176
|
self.run_qso.setText(f"{result.get('runs', 0)}")
|
224
177
|
self.sandp_qso.setText(f"{sandp}")
|
225
|
-
self.qso_counts.setText(f"{result.get('totalqs', 0)} pts")
|
226
178
|
except TypeError:
|
227
179
|
...
|
228
180
|
|
@@ -235,32 +187,3 @@ class RateWindow(QDockWidget):
|
|
235
187
|
self.hour_sandp_qso.setText(f"{sandp}")
|
236
188
|
except TypeError:
|
237
189
|
...
|
238
|
-
|
239
|
-
def hide_unused(self):
|
240
|
-
self.line.hide()
|
241
|
-
self.label_10.hide()
|
242
|
-
self.time_on.hide()
|
243
|
-
self.label_12.hide()
|
244
|
-
self.time_off.hide()
|
245
|
-
|
246
|
-
self.band_mode.hide()
|
247
|
-
self.label_23.hide()
|
248
|
-
self.avg_km.hide()
|
249
|
-
self.label_25.hide()
|
250
|
-
self.avg_pts.hide()
|
251
|
-
self.best_dx.hide()
|
252
|
-
self.label_26.hide()
|
253
|
-
|
254
|
-
self.line_5.hide()
|
255
|
-
self.label_29.hide()
|
256
|
-
self.label_30.hide()
|
257
|
-
self.time_by_mult.hide()
|
258
|
-
self.label_32.hide()
|
259
|
-
self.qso_counts.hide()
|
260
|
-
self.label_34.hide()
|
261
|
-
self.mult_counts.hide()
|
262
|
-
self.label_35.hide()
|
263
|
-
self.mult_worth.hide()
|
264
|
-
|
265
|
-
self.line_6.hide()
|
266
|
-
self.label_38.hide()
|