not1mm 25.5.14__py3-none-any.whl → 25.5.21__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 +76 -26
- not1mm/bandmap.py +5 -1
- not1mm/data/JetBrainsMono-Thin.ttf +0 -0
- not1mm/data/about.ui +1 -1
- not1mm/data/bandmap.ui +4 -4
- not1mm/data/checkwindow.ui +7 -7
- not1mm/data/configuration.ui +55 -55
- not1mm/data/editcontact.ui +3 -3
- not1mm/data/editmacro.ui +1 -1
- not1mm/data/logwindow.ui +2 -2
- not1mm/data/logwindowx.ui +2 -2
- not1mm/data/main.ui +36 -36
- not1mm/data/new_contest.ui +2 -2
- not1mm/data/opon.ui +1 -1
- not1mm/data/pickcontest.ui +1 -1
- not1mm/data/ratewindow.ui +2 -2
- not1mm/data/settings.ui +1 -1
- not1mm/data/statistics.ui +1 -1
- not1mm/data/vfo.ui +2 -2
- not1mm/lib/version.py +1 -1
- {not1mm-25.5.14.dist-info → not1mm-25.5.21.dist-info}/METADATA +38 -2
- {not1mm-25.5.14.dist-info → not1mm-25.5.21.dist-info}/RECORD +26 -26
- {not1mm-25.5.14.dist-info → not1mm-25.5.21.dist-info}/WHEEL +1 -1
- not1mm/data/JetBrainsMono-ExtraLight.ttf +0 -0
- {not1mm-25.5.14.dist-info → not1mm-25.5.21.dist-info}/entry_points.txt +0 -0
- {not1mm-25.5.14.dist-info → not1mm-25.5.21.dist-info}/licenses/LICENSE +0 -0
- {not1mm-25.5.14.dist-info → not1mm-25.5.21.dist-info}/top_level.txt +0 -0
not1mm/__main__.py
CHANGED
@@ -30,7 +30,7 @@ import notctyparser
|
|
30
30
|
|
31
31
|
from PyQt6 import QtCore, QtGui, QtWidgets, uic, QtNetwork
|
32
32
|
from PyQt6.QtCore import QDir, Qt, QThread, QSettings, QCoreApplication
|
33
|
-
from PyQt6.QtGui import QFontDatabase, QColorConstants, QPalette, QColor, QPixmap
|
33
|
+
from PyQt6.QtGui import QFontDatabase, QColorConstants, QPalette, QColor, QPixmap, QFont
|
34
34
|
from PyQt6.QtWidgets import QFileDialog, QSplashScreen, QApplication
|
35
35
|
from PyQt6.QtCore import QT_VERSION_STR, PYQT_VERSION_STR
|
36
36
|
|
@@ -212,7 +212,45 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
212
212
|
)
|
213
213
|
self.setCorner(Qt.Corner.TopLeftCorner, Qt.DockWidgetArea.LeftDockWidgetArea)
|
214
214
|
self.setCorner(Qt.Corner.BottomLeftCorner, Qt.DockWidgetArea.LeftDockWidgetArea)
|
215
|
+
self.fontfamily = self.load_fonts_from_dir(os.fspath(fsutils.APP_DATA_PATH))
|
215
216
|
uic.loadUi(fsutils.APP_DATA_PATH / "main.ui", self)
|
217
|
+
if sys.platform == "darwin":
|
218
|
+
def_font_size = 12
|
219
|
+
|
220
|
+
QApplication.instance().setFont(QFont(self.fontfamily, def_font_size))
|
221
|
+
self.F1.setFont(QFont(self.fontfamily, def_font_size))
|
222
|
+
self.F2.setFont(QFont(self.fontfamily, def_font_size))
|
223
|
+
self.F3.setFont(QFont(self.fontfamily, def_font_size))
|
224
|
+
self.F4.setFont(QFont(self.fontfamily, def_font_size))
|
225
|
+
self.F5.setFont(QFont(self.fontfamily, def_font_size))
|
226
|
+
self.F6.setFont(QFont(self.fontfamily, def_font_size))
|
227
|
+
self.F7.setFont(QFont(self.fontfamily, def_font_size))
|
228
|
+
self.F8.setFont(QFont(self.fontfamily, def_font_size))
|
229
|
+
self.F9.setFont(QFont(self.fontfamily, def_font_size))
|
230
|
+
self.F10.setFont(QFont(self.fontfamily, def_font_size))
|
231
|
+
self.F11.setFont(QFont(self.fontfamily, def_font_size))
|
232
|
+
self.F12.setFont(QFont(self.fontfamily, def_font_size))
|
233
|
+
self.radioButton_run.setFont(QFont(self.fontfamily, def_font_size))
|
234
|
+
self.radioButton_sp.setFont(QFont(self.fontfamily, def_font_size))
|
235
|
+
self.cw_speed.setFont(QFont(self.fontfamily, def_font_size))
|
236
|
+
self.callsign_label.setFont(QFont(self.fontfamily, def_font_size))
|
237
|
+
self.snt_label.setFont(QFont(self.fontfamily, def_font_size))
|
238
|
+
self.rcv_label.setFont(QFont(self.fontfamily, def_font_size))
|
239
|
+
self.other_label.setFont(QFont(self.fontfamily, def_font_size))
|
240
|
+
self.exch_label.setFont(QFont(self.fontfamily, def_font_size))
|
241
|
+
self.heading_distance.setFont(QFont(self.fontfamily, def_font_size))
|
242
|
+
self.history_info.setFont(QFont(self.fontfamily, def_font_size))
|
243
|
+
self.dx_entity.setFont(QFont(self.fontfamily, def_font_size))
|
244
|
+
self.score.setFont(QFont(self.fontfamily, def_font_size))
|
245
|
+
self.mults.setFont(QFont(self.fontfamily, def_font_size))
|
246
|
+
|
247
|
+
self.callsign.setFont(QFont(self.fontfamily, 20))
|
248
|
+
self.sent.setFont(QFont(self.fontfamily, 20))
|
249
|
+
self.receive.setFont(QFont(self.fontfamily, 20))
|
250
|
+
self.other_1.setFont(QFont(self.fontfamily, 20))
|
251
|
+
self.other_2.setFont(QFont(self.fontfamily, 20))
|
252
|
+
self.dupe_indicator.setFont(QFont(self.fontfamily, 20))
|
253
|
+
|
216
254
|
self.history_info.hide()
|
217
255
|
QApplication.instance().focusObjectChanged.connect(self.on_focus_changed)
|
218
256
|
QApplication.instance().styleHints().colorSchemeChanged.connect(
|
@@ -1990,11 +2028,11 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1990
2028
|
indicator.setFrameShape(QtWidgets.QFrame.Shape.NoFrame)
|
1991
2029
|
if self.text_color == QColorConstants.Black:
|
1992
2030
|
indicator.setStyleSheet(
|
1993
|
-
"font-family:
|
2031
|
+
f"font-family: {self.fontfamily}; color: black;"
|
1994
2032
|
)
|
1995
2033
|
else:
|
1996
2034
|
indicator.setStyleSheet(
|
1997
|
-
"font-family:
|
2035
|
+
f"font-family: {self.fontfamily}; color: white;"
|
1998
2036
|
)
|
1999
2037
|
|
2000
2038
|
def set_band_indicator(self, band: str) -> None:
|
@@ -2017,7 +2055,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
2017
2055
|
if indicator:
|
2018
2056
|
indicator.setFrameShape(QtWidgets.QFrame.Shape.Box)
|
2019
2057
|
indicator.setStyleSheet(
|
2020
|
-
"font-family:
|
2058
|
+
f"font-family: {self.fontfamily}; color: green;"
|
2021
2059
|
)
|
2022
2060
|
|
2023
2061
|
def closeEvent(self, _event) -> None:
|
@@ -2872,7 +2910,13 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
2872
2910
|
next_serial = "1"
|
2873
2911
|
macro = macro.upper()
|
2874
2912
|
if self.radio_state.get("mode") == "CW":
|
2875
|
-
macro = macro.replace(
|
2913
|
+
macro = macro.replace(
|
2914
|
+
"#",
|
2915
|
+
next_serial.rjust(
|
2916
|
+
self.pref.get("cwpaddinglength", 3),
|
2917
|
+
self.pref.get("cwpaddingchar", "T"),
|
2918
|
+
),
|
2919
|
+
)
|
2876
2920
|
else:
|
2877
2921
|
macro = macro.replace("#", next_serial)
|
2878
2922
|
macro = macro.replace("{MYCALL}", self.station.get("Call", ""))
|
@@ -2885,7 +2929,13 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
2885
2929
|
macro = macro.replace("{SNT}", self.sent.text())
|
2886
2930
|
if self.radio_state.get("mode") == "CW":
|
2887
2931
|
macro = macro.replace(
|
2888
|
-
"{SENTNR}",
|
2932
|
+
"{SENTNR}",
|
2933
|
+
self.other_1.text()
|
2934
|
+
.lstrip("0")
|
2935
|
+
.rjust(
|
2936
|
+
self.pref.get("cwpaddinglength", 3),
|
2937
|
+
self.pref.get("cwpaddingchar", "T"),
|
2938
|
+
),
|
2889
2939
|
)
|
2890
2940
|
else:
|
2891
2941
|
macro = macro.replace("{SENTNR}", self.other_1.text())
|
@@ -4177,26 +4227,26 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
4177
4227
|
logger.debug("******Cabrillo*****")
|
4178
4228
|
self.contest.cabrillo(self, file_encoding)
|
4179
4229
|
|
4230
|
+
def load_fonts_from_dir(self, directory: str) -> str:
|
4231
|
+
"""
|
4232
|
+
Well it loads fonts from a directory...
|
4180
4233
|
|
4181
|
-
|
4182
|
-
|
4183
|
-
|
4184
|
-
|
4185
|
-
Parameters
|
4186
|
-
----------
|
4187
|
-
directory : str
|
4188
|
-
The directory to load fonts from.
|
4234
|
+
Parameters
|
4235
|
+
----------
|
4236
|
+
directory : str
|
4237
|
+
The directory to load fonts from.
|
4189
4238
|
|
4190
|
-
|
4191
|
-
|
4192
|
-
|
4193
|
-
|
4194
|
-
|
4195
|
-
|
4196
|
-
|
4197
|
-
|
4198
|
-
|
4199
|
-
|
4239
|
+
Returns
|
4240
|
+
-------
|
4241
|
+
set
|
4242
|
+
A set of font families installed in the directory.
|
4243
|
+
"""
|
4244
|
+
font_families = set()
|
4245
|
+
for _fi in QDir(directory).entryInfoList(["*.ttf", "*.woff", "*.woff2"]):
|
4246
|
+
_id = QFontDatabase.addApplicationFont(_fi.absoluteFilePath())
|
4247
|
+
font_families |= set(QFontDatabase.applicationFontFamilies(_id))
|
4248
|
+
result = set((max(font_families, key=len),))
|
4249
|
+
return list(result)[0]
|
4200
4250
|
|
4201
4251
|
|
4202
4252
|
def install_icons() -> None:
|
@@ -4252,8 +4302,8 @@ def run() -> None:
|
|
4252
4302
|
)
|
4253
4303
|
QCoreApplication.processEvents()
|
4254
4304
|
|
4255
|
-
families = load_fonts_from_dir(os.fspath(fsutils.APP_DATA_PATH))
|
4256
|
-
logger.info(f"font families {families}")
|
4305
|
+
# families = load_fonts_from_dir(os.fspath(fsutils.APP_DATA_PATH))
|
4306
|
+
# logger.info(f"font families {families}")
|
4257
4307
|
window = MainWindow(splash)
|
4258
4308
|
window.callsign.setFocus()
|
4259
4309
|
splash.finish(window)
|
not1mm/bandmap.py
CHANGED
@@ -19,7 +19,7 @@ from decimal import Decimal
|
|
19
19
|
from json import loads
|
20
20
|
|
21
21
|
from PyQt6 import QtCore, QtGui, QtWidgets, uic, QtNetwork
|
22
|
-
from PyQt6.QtGui import QColorConstants, QPalette, QColor
|
22
|
+
from PyQt6.QtGui import QColorConstants, QPalette, QColor, QFont
|
23
23
|
from PyQt6.QtWidgets import QDockWidget
|
24
24
|
from PyQt6.QtCore import Qt, pyqtSignal
|
25
25
|
|
@@ -343,6 +343,8 @@ class BandMapWindow(QDockWidget):
|
|
343
343
|
self._udpwatch = None
|
344
344
|
|
345
345
|
uic.loadUi(fsutils.APP_DATA_PATH / "bandmap.ui", self)
|
346
|
+
self.thefont = QFont()
|
347
|
+
self.thefont.setFamily("JetBrains Mono")
|
346
348
|
self.settings = self.get_settings()
|
347
349
|
self.clear_spot_olderSpinBox.setValue(
|
348
350
|
int(self.settings.get("cluster_expire", 1))
|
@@ -581,6 +583,7 @@ class BandMapWindow(QDockWidget):
|
|
581
583
|
freq = self.currentBand.start + step * i
|
582
584
|
text = f"{freq:.3f}"
|
583
585
|
self.something = self.bandmap_scene.addText(text)
|
586
|
+
self.something.setFont(self.thefont)
|
584
587
|
self.something.setDefaultTextColor(self.text_color)
|
585
588
|
self.something.setPos(
|
586
589
|
-(self.something.boundingRect().width()) + 10,
|
@@ -726,6 +729,7 @@ class BandMapWindow(QDockWidget):
|
|
726
729
|
+ " "
|
727
730
|
+ items.get("ts").split()[1][:-3]
|
728
731
|
)
|
732
|
+
text.setFont(self.thefont)
|
729
733
|
text.document().setDocumentMargin(0)
|
730
734
|
text.setPos(60, text_y - (text.boundingRect().height() / 2))
|
731
735
|
text.setFlags(
|
Binary file
|
not1mm/data/about.ui
CHANGED
not1mm/data/bandmap.ui
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
</property>
|
13
13
|
<property name="font">
|
14
14
|
<font>
|
15
|
-
<family>JetBrains Mono
|
15
|
+
<family>JetBrains Mono</family>
|
16
16
|
</font>
|
17
17
|
</property>
|
18
18
|
<property name="windowTitle">
|
@@ -85,7 +85,7 @@
|
|
85
85
|
<widget class="QScrollArea" name="scrollArea">
|
86
86
|
<property name="font">
|
87
87
|
<font>
|
88
|
-
<family>JetBrains Mono
|
88
|
+
<family>JetBrains Mono</family>
|
89
89
|
<pointsize>9</pointsize>
|
90
90
|
</font>
|
91
91
|
</property>
|
@@ -106,7 +106,7 @@
|
|
106
106
|
</property>
|
107
107
|
<property name="font">
|
108
108
|
<font>
|
109
|
-
<family>JetBrains Mono
|
109
|
+
<family>JetBrains Mono</family>
|
110
110
|
<pointsize>9</pointsize>
|
111
111
|
</font>
|
112
112
|
</property>
|
@@ -115,7 +115,7 @@
|
|
115
115
|
<widget class="QGraphicsView" name="graphicsView">
|
116
116
|
<property name="font">
|
117
117
|
<font>
|
118
|
-
<family>JetBrains Mono
|
118
|
+
<family>JetBrains Mono</family>
|
119
119
|
<pointsize>6</pointsize>
|
120
120
|
</font>
|
121
121
|
</property>
|
not1mm/data/checkwindow.ui
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
</property>
|
13
13
|
<property name="font">
|
14
14
|
<font>
|
15
|
-
<family>JetBrains Mono
|
15
|
+
<family>JetBrains Mono</family>
|
16
16
|
</font>
|
17
17
|
</property>
|
18
18
|
<property name="focusPolicy">
|
@@ -33,7 +33,7 @@
|
|
33
33
|
</property>
|
34
34
|
<property name="font">
|
35
35
|
<font>
|
36
|
-
<family>JetBrains Mono
|
36
|
+
<family>JetBrains Mono</family>
|
37
37
|
<pointsize>12</pointsize>
|
38
38
|
</font>
|
39
39
|
</property>
|
@@ -70,7 +70,7 @@
|
|
70
70
|
</property>
|
71
71
|
<property name="font">
|
72
72
|
<font>
|
73
|
-
<family>JetBrains Mono
|
73
|
+
<family>JetBrains Mono</family>
|
74
74
|
<pointsize>12</pointsize>
|
75
75
|
</font>
|
76
76
|
</property>
|
@@ -107,7 +107,7 @@
|
|
107
107
|
</property>
|
108
108
|
<property name="font">
|
109
109
|
<font>
|
110
|
-
<family>JetBrains Mono
|
110
|
+
<family>JetBrains Mono</family>
|
111
111
|
<pointsize>12</pointsize>
|
112
112
|
</font>
|
113
113
|
</property>
|
@@ -141,7 +141,7 @@
|
|
141
141
|
<widget class="QLabel" name="logListLabel">
|
142
142
|
<property name="font">
|
143
143
|
<font>
|
144
|
-
<family>JetBrains Mono
|
144
|
+
<family>JetBrains Mono</family>
|
145
145
|
<pointsize>10</pointsize>
|
146
146
|
</font>
|
147
147
|
</property>
|
@@ -154,7 +154,7 @@
|
|
154
154
|
<widget class="QLabel" name="masterListLabel">
|
155
155
|
<property name="font">
|
156
156
|
<font>
|
157
|
-
<family>JetBrains Mono
|
157
|
+
<family>JetBrains Mono</family>
|
158
158
|
<pointsize>10</pointsize>
|
159
159
|
</font>
|
160
160
|
</property>
|
@@ -167,7 +167,7 @@
|
|
167
167
|
<widget class="QLabel" name="telnetListLabel">
|
168
168
|
<property name="font">
|
169
169
|
<font>
|
170
|
-
<family>JetBrains Mono
|
170
|
+
<family>JetBrains Mono</family>
|
171
171
|
<pointsize>10</pointsize>
|
172
172
|
</font>
|
173
173
|
</property>
|