not1mm 25.4.28__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 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: JetBrains Mono ExtraLight; color: black;"
2031
+ f"font-family: {self.fontfamily}; color: black;"
1994
2032
  )
1995
2033
  else:
1996
2034
  indicator.setStyleSheet(
1997
- "font-family: JetBrains Mono ExtraLight; color: white"
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: JetBrains Mono ExtraLight; color: green;"
2058
+ f"font-family: {self.fontfamily}; color: green;"
2021
2059
  )
2022
2060
 
2023
2061
  def closeEvent(self, _event) -> None:
@@ -2121,6 +2159,9 @@ class MainWindow(QtWidgets.QMainWindow):
2121
2159
  if self.cw.servertype == 2:
2122
2160
  self.cw.winkeyer_stop()
2123
2161
  return
2162
+ if self.cw.servertype == 3:
2163
+ self.rig_control.cat.stopcwrigctl()
2164
+ return
2124
2165
  if self.rig_control:
2125
2166
  if self.rig_control.online:
2126
2167
  if self.pref.get("cwtype") == 3 and self.rig_control is not None:
@@ -2869,7 +2910,13 @@ class MainWindow(QtWidgets.QMainWindow):
2869
2910
  next_serial = "1"
2870
2911
  macro = macro.upper()
2871
2912
  if self.radio_state.get("mode") == "CW":
2872
- macro = macro.replace("#", next_serial.rjust(3, "T"))
2913
+ macro = macro.replace(
2914
+ "#",
2915
+ next_serial.rjust(
2916
+ self.pref.get("cwpaddinglength", 3),
2917
+ self.pref.get("cwpaddingchar", "T"),
2918
+ ),
2919
+ )
2873
2920
  else:
2874
2921
  macro = macro.replace("#", next_serial)
2875
2922
  macro = macro.replace("{MYCALL}", self.station.get("Call", ""))
@@ -2882,7 +2929,13 @@ class MainWindow(QtWidgets.QMainWindow):
2882
2929
  macro = macro.replace("{SNT}", self.sent.text())
2883
2930
  if self.radio_state.get("mode") == "CW":
2884
2931
  macro = macro.replace(
2885
- "{SENTNR}", self.other_1.text().lstrip("0").rjust(3, "T")
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
+ ),
2886
2939
  )
2887
2940
  else:
2888
2941
  macro = macro.replace("{SENTNR}", self.other_1.text())
@@ -4174,26 +4227,26 @@ class MainWindow(QtWidgets.QMainWindow):
4174
4227
  logger.debug("******Cabrillo*****")
4175
4228
  self.contest.cabrillo(self, file_encoding)
4176
4229
 
4230
+ def load_fonts_from_dir(self, directory: str) -> str:
4231
+ """
4232
+ Well it loads fonts from a directory...
4177
4233
 
4178
- def load_fonts_from_dir(directory: str) -> set:
4179
- """
4180
- Well it loads fonts from a directory...
4181
-
4182
- Parameters
4183
- ----------
4184
- directory : str
4185
- The directory to load fonts from.
4234
+ Parameters
4235
+ ----------
4236
+ directory : str
4237
+ The directory to load fonts from.
4186
4238
 
4187
- Returns
4188
- -------
4189
- set
4190
- A set of font families installed in the directory.
4191
- """
4192
- font_families = set()
4193
- for _fi in QDir(directory).entryInfoList(["*.ttf", "*.woff", "*.woff2"]):
4194
- _id = QFontDatabase.addApplicationFont(_fi.absoluteFilePath())
4195
- font_families |= set(QFontDatabase.applicationFontFamilies(_id))
4196
- return font_families
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]
4197
4250
 
4198
4251
 
4199
4252
  def install_icons() -> None:
@@ -4249,8 +4302,8 @@ def run() -> None:
4249
4302
  )
4250
4303
  QCoreApplication.processEvents()
4251
4304
 
4252
- families = load_fonts_from_dir(os.fspath(fsutils.APP_DATA_PATH))
4253
- 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}")
4254
4307
  window = MainWindow(splash)
4255
4308
  window.callsign.setFocus()
4256
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
@@ -18,7 +18,7 @@
18
18
  <widget class="QLabel" name="label">
19
19
  <property name="font">
20
20
  <font>
21
- <family>JetBrains Mono ExtraLight</family>
21
+ <family>JetBrains Mono</family>
22
22
  <pointsize>30</pointsize>
23
23
  </font>
24
24
  </property>
not1mm/data/bandmap.ui CHANGED
@@ -12,7 +12,7 @@
12
12
  </property>
13
13
  <property name="font">
14
14
  <font>
15
- <family>JetBrains Mono ExtraLight</family>
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 ExtraLight</family>
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 ExtraLight</family>
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 ExtraLight</family>
118
+ <family>JetBrains Mono</family>
119
119
  <pointsize>6</pointsize>
120
120
  </font>
121
121
  </property>
@@ -12,7 +12,7 @@
12
12
  </property>
13
13
  <property name="font">
14
14
  <font>
15
- <family>JetBrains Mono ExtraLight</family>
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 ExtraLight</family>
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 ExtraLight</family>
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 ExtraLight</family>
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 ExtraLight</family>
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 ExtraLight</family>
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 ExtraLight</family>
170
+ <family>JetBrains Mono</family>
171
171
  <pointsize>10</pointsize>
172
172
  </font>
173
173
  </property>