not1mm 24.3.19__py3-none-any.whl → 24.3.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.
Files changed (66) hide show
  1. not1mm/__main__.py +289 -123
  2. not1mm/bandmap.py +168 -163
  3. not1mm/checkwindow.py +55 -107
  4. not1mm/data/MASTER.SCP +1077 -749
  5. not1mm/data/bandmap.ui +4 -4
  6. not1mm/data/checkwindow.ui +9 -16
  7. not1mm/data/logwindow.ui +16 -11
  8. not1mm/data/main.ui +16 -6
  9. not1mm/data/vfo.ui +64 -52
  10. not1mm/data/vfo2.ui +84 -0
  11. not1mm/fsutils.py +38 -0
  12. not1mm/lib/about.py +4 -2
  13. not1mm/lib/cat_interface.py +1 -1
  14. not1mm/lib/cwinterface.py +1 -1
  15. not1mm/lib/database.py +4 -4
  16. not1mm/lib/edit_contact.py +2 -2
  17. not1mm/lib/edit_macro.py +2 -3
  18. not1mm/lib/edit_opon.py +2 -2
  19. not1mm/lib/edit_station.py +3 -3
  20. not1mm/lib/ham_utility.py +1 -1
  21. not1mm/lib/lookup.py +1 -1
  22. not1mm/lib/multicast.py +9 -4
  23. not1mm/lib/n1mm.py +1 -1
  24. not1mm/lib/new_contest.py +2 -2
  25. not1mm/lib/select_contest.py +2 -2
  26. not1mm/lib/settings.py +3 -4
  27. not1mm/lib/super_check_partial.py +6 -5
  28. not1mm/lib/version.py +1 -1
  29. not1mm/logwindow.py +60 -104
  30. not1mm/plugins/10_10_fall_cw.py +1 -1
  31. not1mm/plugins/10_10_spring_cw.py +1 -1
  32. not1mm/plugins/10_10_summer_phone.py +1 -1
  33. not1mm/plugins/10_10_winter_phone.py +1 -1
  34. not1mm/plugins/arrl_10m.py +1 -1
  35. not1mm/plugins/arrl_dx_cw.py +1 -1
  36. not1mm/plugins/arrl_dx_ssb.py +1 -1
  37. not1mm/plugins/arrl_field_day.py +1 -1
  38. not1mm/plugins/arrl_ss_cw.py +1 -1
  39. not1mm/plugins/arrl_ss_phone.py +1 -1
  40. not1mm/plugins/arrl_vhf_jan.py +1 -1
  41. not1mm/plugins/arrl_vhf_jun.py +1 -1
  42. not1mm/plugins/arrl_vhf_sep.py +1 -1
  43. not1mm/plugins/canada_day.py +1 -1
  44. not1mm/plugins/cq_160_cw.py +1 -1
  45. not1mm/plugins/cq_160_ssb.py +1 -1
  46. not1mm/plugins/cq_wpx_cw.py +1 -1
  47. not1mm/plugins/cq_wpx_ssb.py +1 -1
  48. not1mm/plugins/cq_ww_cw.py +1 -1
  49. not1mm/plugins/cq_ww_ssb.py +1 -1
  50. not1mm/plugins/cwt.py +1 -1
  51. not1mm/plugins/general_logging.py +1 -1
  52. not1mm/plugins/iaru_hf.py +1 -1
  53. not1mm/plugins/jidx_cw.py +1 -1
  54. not1mm/plugins/jidx_ph.py +1 -1
  55. not1mm/plugins/naqp_cw.py +1 -1
  56. not1mm/plugins/naqp_ssb.py +1 -1
  57. not1mm/plugins/phone_weekly_test.py +1 -1
  58. not1mm/plugins/stew_perry_topband.py +1 -1
  59. not1mm/plugins/winter_field_day.py +1 -1
  60. not1mm/vfo.py +77 -98
  61. {not1mm-24.3.19.dist-info → not1mm-24.3.21.dist-info}/METADATA +3 -1
  62. {not1mm-24.3.19.dist-info → not1mm-24.3.21.dist-info}/RECORD +66 -64
  63. {not1mm-24.3.19.dist-info → not1mm-24.3.21.dist-info}/LICENSE +0 -0
  64. {not1mm-24.3.19.dist-info → not1mm-24.3.21.dist-info}/WHEEL +0 -0
  65. {not1mm-24.3.19.dist-info → not1mm-24.3.21.dist-info}/entry_points.txt +0 -0
  66. {not1mm-24.3.19.dist-info → not1mm-24.3.21.dist-info}/top_level.txt +0 -0
not1mm/data/bandmap.ui CHANGED
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <ui version="4.0">
3
- <class>MainWindow</class>
4
- <widget class="QMainWindow" name="MainWindow">
3
+ <class>BandMapWindow</class>
4
+ <widget class="QDockWidget" name="BandMapWindow">
5
5
  <property name="geometry">
6
6
  <rect>
7
7
  <x>0</x>
@@ -18,7 +18,7 @@
18
18
  <property name="windowTitle">
19
19
  <string>BandMap</string>
20
20
  </property>
21
- <widget class="QWidget" name="centralwidget">
21
+ <widget class="QWidget">
22
22
  <layout class="QVBoxLayout" name="verticalLayout_2">
23
23
  <property name="spacing">
24
24
  <number>6</number>
@@ -50,7 +50,7 @@
50
50
  <string>callsign</string>
51
51
  </property>
52
52
  <property name="accessibleDescription">
53
- <string>callsign used to sign in to d x cluster.</string>
53
+ <string>callsign used to sign in to dx cluster.</string>
54
54
  </property>
55
55
  <property name="styleSheet">
56
56
  <string notr="true">text-transform: uppercase;</string>
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <ui version="4.0">
3
- <class>MainWindow</class>
4
- <widget class="QMainWindow" name="MainWindow">
3
+ <class>CheckWindow</class>
4
+ <widget class="QWidget" name="CheckWindow">
5
5
  <property name="geometry">
6
6
  <rect>
7
7
  <x>0</x>
@@ -13,14 +13,17 @@
13
13
  <property name="font">
14
14
  <font>
15
15
  <family>JetBrains Mono</family>
16
- <pointsize>14</pointsize>
16
+ <pointsize>12</pointsize>
17
17
  </font>
18
18
  </property>
19
19
  <property name="windowTitle">
20
- <string>CheckWindow</string>
20
+ <string>Check Partial</string>
21
21
  </property>
22
- <widget class="QWidget" name="centralwidget">
23
22
  <layout class="QGridLayout" name="gridLayout">
23
+ <property name="bottomMargin"><number>2</number></property>
24
+ <property name="topMargin"><number>2</number></property>
25
+ <property name="leftMargin"><number>2</number></property>
26
+ <property name="rightMargin"><number>2</number></property>
24
27
  <item row="1" column="1">
25
28
  <widget class="QListWidget" name="masterList"/>
26
29
  </item>
@@ -87,17 +90,7 @@
87
90
  </item>
88
91
  </layout>
89
92
  </widget>
90
- <widget class="QMenuBar" name="menubar">
91
- <property name="geometry">
92
- <rect>
93
- <x>0</x>
94
- <y>0</y>
95
- <width>310</width>
96
- <height>36</height>
97
- </rect>
98
- </property>
99
- </widget>
100
- </widget>
93
+
101
94
  <resources/>
102
95
  <connections/>
103
96
  </ui>
not1mm/data/logwindow.ui CHANGED
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <ui version="4.0">
3
- <class>MainWindow</class>
4
- <widget class="QMainWindow" name="MainWindow">
3
+ <class>LogWindow</class>
4
+ <widget class="QWidget" name="LogWindow">
5
5
  <property name="geometry">
6
6
  <rect>
7
7
  <x>0</x>
@@ -11,11 +11,18 @@
11
11
  </rect>
12
12
  </property>
13
13
  <property name="windowTitle">
14
- <string>MainWindow</string>
14
+ <string>QSO Logs</string>
15
15
  </property>
16
- <widget class="QWidget" name="centralwidget">
17
- <layout class="QGridLayout" name="gridLayout">
18
- <item row="0" column="0">
16
+ <layout class="QVBoxLayout" name="verticalLayout">
17
+ <property name="bottomMargin"><number>2</number></property>
18
+ <property name="topMargin"><number>2</number></property>
19
+ <property name="leftMargin"><number>2</number></property>
20
+ <property name="rightMargin"><number>2</number></property>
21
+ <item>
22
+ <widget class="QSplitter" name="splitter">
23
+ <property name="orientation">
24
+ <enum>Qt::Vertical</enum>
25
+ </property>
19
26
  <widget class="QTableWidget" name="generalLog">
20
27
  <property name="font">
21
28
  <font>
@@ -23,8 +30,6 @@
23
30
  </font>
24
31
  </property>
25
32
  </widget>
26
- </item>
27
- <item row="1" column="0">
28
33
  <widget class="QTableWidget" name="focusedLog">
29
34
  <property name="font">
30
35
  <font>
@@ -32,9 +37,9 @@
32
37
  </font>
33
38
  </property>
34
39
  </widget>
35
- </item>
36
- </layout>
37
- </widget>
40
+ </widget>
41
+ </item>
42
+ </layout>
38
43
  </widget>
39
44
  <resources/>
40
45
  <connections/>
not1mm/data/main.ui CHANGED
@@ -9,8 +9,8 @@
9
9
  <rect>
10
10
  <x>0</x>
11
11
  <y>0</y>
12
- <width>866</width>
13
- <height>400</height>
12
+ <width>878</width>
13
+ <height>475</height>
14
14
  </rect>
15
15
  </property>
16
16
  <property name="sizePolicy">
@@ -894,6 +894,7 @@
894
894
  <item>
895
895
  <widget class="QFrame" name="Button_Row1">
896
896
  <layout class="QHBoxLayout" name="ButtonRow1">
897
+
897
898
  <property name="sizeConstraint">
898
899
  <enum>QLayout::SetNoConstraint</enum>
899
900
  </property>
@@ -1281,8 +1282,8 @@
1281
1282
  <rect>
1282
1283
  <x>0</x>
1283
1284
  <y>0</y>
1284
- <width>866</width>
1285
- <height>25</height>
1285
+ <width>878</width>
1286
+ <height>30</height>
1286
1287
  </rect>
1287
1288
  </property>
1288
1289
  <property name="nativeMenuBar">
@@ -1332,6 +1333,7 @@
1332
1333
  <string>View</string>
1333
1334
  </property>
1334
1335
  <addaction name="actionCW_Macros"/>
1336
+ <addaction name="actionDark_Mode_2"/>
1335
1337
  </widget>
1336
1338
  <widget class="QMenu" name="menuWindow">
1337
1339
  <property name="title">
@@ -1542,7 +1544,7 @@
1542
1544
  </action>
1543
1545
  <action name="actionLog_Window">
1544
1546
  <property name="text">
1545
- <string>Log Window</string>
1547
+ <string>QSO Log</string>
1546
1548
  </property>
1547
1549
  <property name="font">
1548
1550
  <font>
@@ -1742,7 +1744,7 @@
1742
1744
  </action>
1743
1745
  <action name="actionCheck_Window">
1744
1746
  <property name="text">
1745
- <string>Check Window</string>
1747
+ <string>Check Partial</string>
1746
1748
  </property>
1747
1749
  </action>
1748
1750
  <action name="actionVFO">
@@ -1750,6 +1752,14 @@
1750
1752
  <string>VFO</string>
1751
1753
  </property>
1752
1754
  </action>
1755
+ <action name="actionDark_Mode_2">
1756
+ <property name="checkable">
1757
+ <bool>true</bool>
1758
+ </property>
1759
+ <property name="text">
1760
+ <string>Dark Mode</string>
1761
+ </property>
1762
+ </action>
1753
1763
  </widget>
1754
1764
  <resources/>
1755
1765
  <connections/>
not1mm/data/vfo.ui CHANGED
@@ -1,66 +1,78 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <ui version="4.0">
3
- <class>MainWindow</class>
4
- <widget class="QMainWindow" name="MainWindow">
3
+ <class>VfoWindow</class>
4
+ <widget class="QWidget" name="VfoWindow">
5
5
  <property name="geometry">
6
6
  <rect>
7
7
  <x>0</x>
8
8
  <y>0</y>
9
- <width>367</width>
10
- <height>135</height>
9
+ <width>570</width>
10
+ <height>130</height>
11
11
  </rect>
12
12
  </property>
13
13
  <property name="windowTitle">
14
14
  <string>MainWindow</string>
15
15
  </property>
16
- <widget class="QWidget" name="centralwidget">
17
- <layout class="QGridLayout" name="gridLayout">
18
- <item row="0" column="0">
19
- <widget class="QFrame" name="frame">
20
- <property name="frameShape">
21
- <enum>QFrame::StyledPanel</enum>
22
- </property>
23
- <property name="frameShadow">
24
- <enum>QFrame::Raised</enum>
25
- </property>
26
- <layout class="QGridLayout" name="gridLayout_2">
27
- <item row="0" column="0">
28
- <widget class="QLCDNumber" name="lcdNumber">
29
- <property name="autoFillBackground">
30
- <bool>false</bool>
31
- </property>
32
- <property name="smallDecimalPoint">
33
- <bool>false</bool>
34
- </property>
35
- <property name="digitCount">
36
- <number>11</number>
37
- </property>
38
- <property name="mode">
39
- <enum>QLCDNumber::Dec</enum>
40
- </property>
41
- <property name="segmentStyle">
42
- <enum>QLCDNumber::Flat</enum>
43
- </property>
44
- <property name="intValue" stdset="0">
45
- <number>14032000</number>
46
- </property>
47
- </widget>
48
- </item>
49
- </layout>
50
- </widget>
51
- </item>
52
- </layout>
53
- </widget>
54
- <widget class="QMenuBar" name="menubar">
55
- <property name="geometry">
56
- <rect>
57
- <x>0</x>
58
- <y>0</y>
59
- <width>367</width>
60
- <height>28</height>
61
- </rect>
62
- </property>
63
- </widget>
16
+ <layout class="QGridLayout" name="gridLayout_3">
17
+ <item row="0" column="0">
18
+ <widget class="QMenuBar" name="menubar"/>
19
+ </item>
20
+ <item row="1" column="0">
21
+ <layout class="QGridLayout" name="gridLayout">
22
+ <item row="0" column="0">
23
+ <widget class="QFrame" name="frame">
24
+ <property name="sizePolicy">
25
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
26
+ <horstretch>0</horstretch>
27
+ <verstretch>0</verstretch>
28
+ </sizepolicy>
29
+ </property>
30
+ <property name="frameShape">
31
+ <enum>QFrame::StyledPanel</enum>
32
+ </property>
33
+ <property name="frameShadow">
34
+ <enum>QFrame::Raised</enum>
35
+ </property>
36
+ <layout class="QGridLayout" name="gridLayout_2">
37
+ <item row="0" column="0">
38
+ <widget class="QLCDNumber" name="lcdNumber">
39
+ <property name="sizePolicy">
40
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
41
+ <horstretch>0</horstretch>
42
+ <verstretch>0</verstretch>
43
+ </sizepolicy>
44
+ </property>
45
+ <property name="font">
46
+ <font>
47
+ <pointsize>25</pointsize>
48
+ </font>
49
+ </property>
50
+ <property name="autoFillBackground">
51
+ <bool>false</bool>
52
+ </property>
53
+ <property name="smallDecimalPoint">
54
+ <bool>false</bool>
55
+ </property>
56
+ <property name="digitCount">
57
+ <number>11</number>
58
+ </property>
59
+ <property name="mode">
60
+ <enum>QLCDNumber::Dec</enum>
61
+ </property>
62
+ <property name="segmentStyle">
63
+ <enum>QLCDNumber::Flat</enum>
64
+ </property>
65
+ <property name="intValue" stdset="0">
66
+ <number>14032000</number>
67
+ </property>
68
+ </widget>
69
+ </item>
70
+ </layout>
71
+ </widget>
72
+ </item>
73
+ </layout>
74
+ </item>
75
+ </layout>
64
76
  <action name="actionQuit">
65
77
  <property name="text">
66
78
  <string>Quit</string>
not1mm/data/vfo2.ui ADDED
@@ -0,0 +1,84 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ui version="4.0">
3
+ <class>VfoWindow</class>
4
+ <widget class="QWidget" name="VfoWindow">
5
+ <property name="geometry">
6
+ <rect>
7
+ <x>0</x>
8
+ <y>0</y>
9
+ <width>570</width>
10
+ <height>130</height>
11
+ </rect>
12
+ </property>
13
+ <property name="windowTitle">
14
+ <string>MainWindow</string>
15
+ </property>
16
+ <layout class="QGridLayout" name="gridLayout_3">
17
+ <item row="0" column="0">
18
+ <widget class="QMenuBar" name="menubar"/>
19
+ </item>
20
+ <item row="1" column="0">
21
+ <layout class="QGridLayout" name="gridLayout">
22
+ <item row="0" column="0">
23
+ <widget class="QFrame" name="frame">
24
+ <property name="sizePolicy">
25
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
26
+ <horstretch>0</horstretch>
27
+ <verstretch>0</verstretch>
28
+ </sizepolicy>
29
+ </property>
30
+ <property name="frameShape">
31
+ <enum>QFrame::StyledPanel</enum>
32
+ </property>
33
+ <property name="frameShadow">
34
+ <enum>QFrame::Raised</enum>
35
+ </property>
36
+ <layout class="QGridLayout" name="gridLayout_2">
37
+ <item row="0" column="0">
38
+ <widget class="QLCDNumber" name="lcdNumber">
39
+ <property name="sizePolicy">
40
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
41
+ <horstretch>0</horstretch>
42
+ <verstretch>0</verstretch>
43
+ </sizepolicy>
44
+ </property>
45
+ <property name="font">
46
+ <font>
47
+ <pointsize>25</pointsize>
48
+ </font>
49
+ </property>
50
+ <property name="autoFillBackground">
51
+ <bool>false</bool>
52
+ </property>
53
+ <property name="smallDecimalPoint">
54
+ <bool>false</bool>
55
+ </property>
56
+ <property name="digitCount">
57
+ <number>11</number>
58
+ </property>
59
+ <property name="mode">
60
+ <enum>QLCDNumber::Dec</enum>
61
+ </property>
62
+ <property name="segmentStyle">
63
+ <enum>QLCDNumber::Flat</enum>
64
+ </property>
65
+ <property name="intValue" stdset="0">
66
+ <number>14032000</number>
67
+ </property>
68
+ </widget>
69
+ </item>
70
+ </layout>
71
+ </widget>
72
+ </item>
73
+ </layout>
74
+ </item>
75
+ </layout>
76
+ <action name="actionQuit">
77
+ <property name="text">
78
+ <string>Quit</string>
79
+ </property>
80
+ </action>
81
+ </widget>
82
+ <resources/>
83
+ <connections/>
84
+ </ui>
not1mm/fsutils.py ADDED
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env python3
2
+
3
+ import os
4
+ import sys
5
+ import subprocess
6
+ from pathlib import Path
7
+
8
+ from appdata import AppDataPaths
9
+
10
+ WORKING_PATH = Path(os.path.dirname(os.path.abspath(__file__)))
11
+
12
+ MODULE_PATH = WORKING_PATH
13
+ APP_DATA_PATH = MODULE_PATH / "data"
14
+
15
+ _app_paths = AppDataPaths(name='not1mm')
16
+ _app_paths.setup()
17
+
18
+ LOG_FILE = _app_paths.get_log_file_path(name='appplication.log')
19
+ _DATA_PATH = Path(_app_paths.app_data_path)
20
+
21
+ if os.environ.get("XDG_DATA_HOME", None):
22
+ _DATA_PATH = Path(os.environ.get("XDG_DATA_HOME"))
23
+ LOG_FILE = _DATA_PATH / 'application.log'
24
+
25
+ USER_DATA_PATH = _DATA_PATH
26
+ CONFIG_PATH = USER_DATA_PATH
27
+ CONFIG_FILE = CONFIG_PATH / "not1mm.json"
28
+
29
+ DARK_STYLESHEET = ""
30
+
31
+ def openFileWithOS(file):
32
+ if sys.platform == 'win32':
33
+ os.startfile(file)
34
+ elif sys.platform == 'darwin':
35
+ subprocess.Popen(['open', file])
36
+ else:
37
+ subprocess.Popen(['xdg-open', file])
38
+ #os.system(f"xdg-open {fsutils.USER_DATA_PATH / macro_file}")
not1mm/lib/about.py CHANGED
@@ -1,15 +1,17 @@
1
1
  """The About Dialog"""
2
2
 
3
+ # pylint: disable=c-extension-no-member
4
+
3
5
  from PyQt5 import QtWidgets, uic
4
6
 
5
7
 
6
8
  class About(QtWidgets.QDialog):
7
9
  """Waste of code space"""
8
10
 
9
- def __init__(self, WORKING_PATH):
11
+ def __init__(self, app_data_path):
10
12
  parent = None
11
13
  super().__init__(parent)
12
- uic.loadUi(WORKING_PATH + "/data/about.ui", self)
14
+ uic.loadUi(app_data_path / "about.ui", self)
13
15
  # self.buttonBox.clicked.connect(self.store)
14
16
 
15
17
  # def store(self):
@@ -12,7 +12,7 @@ import http
12
12
  if __name__ == "__main__":
13
13
  print("I'm not the program you are looking for.")
14
14
 
15
- logger = logging.getLogger("__main__")
15
+ logger = logging.getLogger("cat_interface")
16
16
 
17
17
 
18
18
  class CAT:
not1mm/lib/cwinterface.py CHANGED
@@ -11,7 +11,7 @@ import logging
11
11
  if __name__ == "__main__":
12
12
  print("I'm not the program you are looking for.")
13
13
 
14
- logger = logging.getLogger("__main__")
14
+ logger = logging.getLogger("cwinterface")
15
15
 
16
16
 
17
17
  class CW:
not1mm/lib/database.py CHANGED
@@ -15,7 +15,7 @@ import sqlite3
15
15
  if __name__ == "__main__":
16
16
  print("I'm not the program you are looking for.")
17
17
 
18
- logger = logging.getLogger("__main__")
18
+ logger = logging.getLogger("database")
19
19
 
20
20
 
21
21
  class DataBase:
@@ -23,10 +23,10 @@ class DataBase:
23
23
 
24
24
  current_contest = 1
25
25
 
26
- def __init__(self, database: str, working_path: str):
26
+ def __init__(self, database: str, app_data_dir: str):
27
27
  """initializes DataBase instance"""
28
28
  logger.debug("Database: %s", database)
29
- self.working_path = working_path
29
+ self.app_data_dir = app_data_dir
30
30
  self.empty_contact = {
31
31
  "TS": "",
32
32
  "Call": "",
@@ -198,7 +198,7 @@ class DataBase:
198
198
  result = cursor.fetchall()
199
199
  if len(result) == 0:
200
200
  with open(
201
- self.working_path + "/data/contests.sql", encoding="utf-8"
201
+ self.app_data_dir / "contests.sql", encoding="utf-8"
202
202
  ) as data:
203
203
  for line in data.readlines():
204
204
  cursor.execute(line)
@@ -6,9 +6,9 @@ from PyQt5 import QtWidgets, uic
6
6
  class EditContact(QtWidgets.QDialog):
7
7
  """Edit Contact"""
8
8
 
9
- def __init__(self, WORKING_PATH):
9
+ def __init__(self, app_data_path):
10
10
  super().__init__(None)
11
- uic.loadUi(WORKING_PATH + "/data/editcontact.ui", self)
11
+ uic.loadUi(app_data_path / "editcontact.ui", self)
12
12
  self.buttonBox.clicked.connect(self.store)
13
13
 
14
14
  def store(self):
not1mm/lib/edit_macro.py CHANGED
@@ -4,13 +4,12 @@ from PyQt5 import QtWidgets, uic
4
4
 
5
5
 
6
6
  class EditMacro(QtWidgets.QDialog):
7
- """Change the current operator"""
8
7
 
9
- def __init__(self, function_key, WORKING_PATH):
8
+ def __init__(self, function_key, app_data_path):
10
9
  self.function_key = function_key
11
10
  parent = None
12
11
  super().__init__(parent)
13
- uic.loadUi(WORKING_PATH + "/data/editmacro.ui", self)
12
+ uic.loadUi(app_data_path / "editmacro.ui", self)
14
13
  self.buttonBox.clicked.connect(self.store)
15
14
  self.macro_label.setText(function_key.text())
16
15
  self.the_macro.setText(function_key.toolTip())
not1mm/lib/edit_opon.py CHANGED
@@ -6,9 +6,9 @@ from PyQt5 import QtWidgets, uic
6
6
  class OpOn(QtWidgets.QDialog):
7
7
  """Change the current operator"""
8
8
 
9
- def __init__(self, WORKING_PATH, parent=None):
9
+ def __init__(self, app_data_path, parent=None):
10
10
  super().__init__(parent)
11
- uic.loadUi(WORKING_PATH + "/data/opon.ui", self)
11
+ uic.loadUi(app_data_path / "opon.ui", self)
12
12
  self.buttonBox.clicked.connect(self.store)
13
13
 
14
14
  def store(self):
@@ -11,14 +11,14 @@ class EditStation(QtWidgets.QDialog):
11
11
 
12
12
  cty_file = {}
13
13
 
14
- def __init__(self, WORKING_PATH):
14
+ def __init__(self, app_data_path):
15
15
  super().__init__(None)
16
- uic.loadUi(WORKING_PATH + "/data/settings.ui", self)
16
+ uic.loadUi(app_data_path / "settings.ui", self)
17
17
  self.buttonBox.clicked.connect(self.store)
18
18
  self.GridSquare.textEdited.connect(self.gridchanged)
19
19
  self.Call.textEdited.connect(self.call_changed)
20
20
  with open(
21
- WORKING_PATH + "/data/cty.json", "rt", encoding="utf-8"
21
+ app_data_path / "cty.json", "rt", encoding="utf-8"
22
22
  ) as file_descriptor:
23
23
  self.cty_file = loads(file_descriptor.read())
24
24
 
not1mm/lib/ham_utility.py CHANGED
@@ -7,7 +7,7 @@ from datetime import datetime
7
7
  from math import asin, atan2, cos, pi, radians, sin, sqrt
8
8
  from decimal import Decimal
9
9
 
10
- logger = logging.getLogger("__main__")
10
+ logger = logging.getLogger("ham_utility")
11
11
 
12
12
 
13
13
  def calculate_wpx_prefix(the_call: str) -> str:
not1mm/lib/lookup.py CHANGED
@@ -9,7 +9,7 @@ import logging
9
9
  import xmltodict
10
10
  import requests
11
11
 
12
- logger = logging.getLogger("__main__")
12
+ logger = logging.getLogger("lookup")
13
13
 
14
14
 
15
15
  class HamDBlookup:
not1mm/lib/multicast.py CHANGED
@@ -12,7 +12,7 @@ from dicttoxml import dicttoxml
12
12
 
13
13
  from PyQt5 import QtNetwork
14
14
 
15
- logger = logging.getLogger("__main__")
15
+ logger = logging.getLogger("multicast")
16
16
 
17
17
  if __name__ == "__main__":
18
18
  print("I'm not the program you are looking for.")
@@ -26,12 +26,14 @@ class Multicast:
26
26
  self.multicast_port = int(multicast_port)
27
27
  self.interface_ip = interface_ip
28
28
  self.server_udp = QtNetwork.QUdpSocket()
29
- self.server_udp.bind(
29
+ b_result = self.server_udp.bind(
30
30
  QtNetwork.QHostAddress.AnyIPv4,
31
31
  int(self.multicast_port),
32
- QtNetwork.QUdpSocket.ShareAddress,
32
+ QtNetwork.QUdpSocket.ReuseAddressHint
33
33
  )
34
- self.server_udp.joinMulticastGroup(QtNetwork.QHostAddress(self.multicast_group))
34
+ logger.warn(f"multicast bind {b_result}")
35
+ join_result = self.server_udp.joinMulticastGroup(QtNetwork.QHostAddress(self.multicast_group))
36
+ logger.warn(f"joinMulticastGroup result {join_result}")
35
37
 
36
38
  def has_pending_datagrams(self) -> bool:
37
39
  """Check if there is a pending datagram"""
@@ -90,3 +92,6 @@ class Multicast:
90
92
  .data()
91
93
  )
92
94
  return packet
95
+
96
+ def close(self):
97
+ self.server_udp.close()
not1mm/lib/n1mm.py CHANGED
@@ -10,7 +10,7 @@ import socket
10
10
  # pip3 install -U dicttoxml
11
11
  from dicttoxml import dicttoxml
12
12
 
13
- logger = logging.getLogger("__main__")
13
+ logger = logging.getLogger("n1mmlib")
14
14
 
15
15
  if __name__ == "__main__":
16
16
  print("I'm not the program you are looking for.")