Skip to content

Commit 676071c

Browse files
authored
Merge pull request #234 from mbridak/delete_marked_spots
@mbridak Add button to delete marked spots.
2 parents 14d9533 + b2b696f commit 676071c

File tree

6 files changed

+56
-33
lines changed

6 files changed

+56
-33
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Changelog
22

3+
- [24-12-3] Add button to bandmap to delete marked spots.
34
- [24-11-27] Added CAT poll interval.
45
- [24-11-26-1] Changed ESC to stop CW, CTRL-W to wipe input fields.
56
- [24-11-26] Trying something different with rigctld parsing.

README.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -207,25 +207,7 @@ generated, 'cause I'm lazy, list of those who've submitted PR's.
207207

208208
## Recent Changes (Polishing the Turd)
209209

210-
- [24-11-27] Added CAT poll interval.
211-
- [24-11-26-1] Changed ESC to stop CW, CTRL-W to wipe input fields.
212-
- [24-11-26] Trying something different with rigctld parsing.
213-
- [24-11-15] Fix CQWW points, fix mode showing as RPRT.
214-
- [24-11-24-1] Add ESM to CQ160, ARRL VHF, ARRL 10M, 10 10 contests.
215-
- [24-11-24] Added ESM to IARU HF and FieldDay.
216-
- [24-11-23] Made macros per contest.
217-
- [24-11-21] Merged PR from alduhoo setting CW Speed via rigctld, Added ESM and call history support for General Logging.
218-
- [24-11-19] Added ESM to Stew Perry, Phone Weekly, Medium Speed Test and JIDX.
219-
- [24-11-18] Accepted PR from dg9vh for the DARC XMAS Contest.
220-
- [24-11-17] Accepted PR from dg9vh for the LZ DX contest.
221-
- [24-11-15] Made checkwindow font bigger and match a little more contrasted.
222-
- [24-11-12] add check for ipv4 address for CAT.
223-
- [24-11-10] ReJiggered CAT/flrig interface to hopefull make it more workable.
224-
- [24-11-6] Added Call history to ARRL VHF, CQ160, CQWW, StewPerry, Weekly RTTY
225-
- [24-11-5] Fix crash with bad qrz credentials.
226-
- [24-11-3-1] Fixed CWT ESM, Add Call History to CWT, Helvetia, WFD, NAQP, K1USN. Add ESM Helvetia.
227-
- [24-11-3] Added RAEM contest
228-
- [24-11-2] Add beginning of call history files. Add command buttons.
210+
- [24-12-3] Add button to bandmap to delete marked spots.
229211

230212
See [CHANGELOG.md](CHANGELOG.md) for prior changes.
231213

not1mm/bandmap.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,10 @@ def delete_spots(self, minutes: int) -> None:
311311
(f"-{minutes} minutes",),
312312
)
313313

314+
def delete_marks(self) -> None:
315+
"""Delete marked spots."""
316+
self.cursor.execute("delete from spots where ts > datetime('now');")
317+
314318

315319
class BandMapWindow(QDockWidget):
316320
"""The BandMapWindow class."""
@@ -345,6 +349,7 @@ def __init__(self):
345349
self.agetime = self.clear_spot_olderSpinBox.value()
346350
self.clear_spot_olderSpinBox.valueChanged.connect(self.spot_aging_changed)
347351
self.clearButton.clicked.connect(self.clear_spots)
352+
self.clearmarkedButton.clicked.connect(self.clear_marked)
348353
self.zoominButton.clicked.connect(self.dec_zoom)
349354
self.zoomoutButton.clicked.connect(self.inc_zoom)
350355
self.connectButton.clicked.connect(self.connect)
@@ -873,6 +878,10 @@ def clear_spots(self) -> None:
873878
"""Delete all spots from the database."""
874879
self.spots.delete_spots(0)
875880

881+
def clear_marked(self) -> None:
882+
"""Delete all marked spots."""
883+
self.spots.delete_marks()
884+
876885
def spot_aging_changed(self) -> None:
877886
"""Called when spot aging spinbox is changed."""
878887
self.agetime = self.clear_spot_olderSpinBox.value()

not1mm/data/bandmap.ui

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>383</width>
9+
<width>342</width>
1010
<height>700</height>
1111
</rect>
1212
</property>
@@ -97,7 +97,7 @@
9797
<rect>
9898
<x>0</x>
9999
<y>0</y>
100-
<width>359</width>
100+
<width>326</width>
101101
<height>512</height>
102102
</rect>
103103
</property>
@@ -148,18 +148,49 @@
148148
<enum>Qt::NoFocus</enum>
149149
</property>
150150
<property name="accessibleName">
151-
<string>clear all</string>
151+
<string>clear spots</string>
152152
</property>
153153
<property name="accessibleDescription">
154154
<string>clear spots</string>
155155
</property>
156+
<property name="maximumSize">
157+
<size>
158+
<width>1110</width>
159+
<height>27</height>
160+
</size>
161+
</property>
162+
<property name="text">
163+
<string>🗑 Spots</string>
164+
</property>
165+
</widget>
166+
</item>
167+
<item>
168+
<widget class="QPushButton" name="clearmarkedButton">
169+
<property name="minimumSize">
170+
<size>
171+
<width>110</width>
172+
<height>0</height>
173+
</size>
174+
</property>
175+
<property name="maximumSize">
176+
<size>
177+
<width>1110</width>
178+
<height>27</height>
179+
</size>
180+
</property>
156181
<property name="text">
157-
<string>Clear All</string>
182+
<string>🗑 Marked</string>
158183
</property>
159184
</widget>
160185
</item>
161186
<item>
162187
<widget class="QPushButton" name="zoominButton">
188+
<property name="maximumSize">
189+
<size>
190+
<width>27</width>
191+
<height>27</height>
192+
</size>
193+
</property>
163194
<property name="focusPolicy">
164195
<enum>Qt::NoFocus</enum>
165196
</property>
@@ -170,12 +201,18 @@
170201
<string>zoom in</string>
171202
</property>
172203
<property name="text">
173-
<string>Zoom In</string>
204+
<string></string>
174205
</property>
175206
</widget>
176207
</item>
177208
<item>
178209
<widget class="QPushButton" name="zoomoutButton">
210+
<property name="maximumSize">
211+
<size>
212+
<width>27</width>
213+
<height>27</height>
214+
</size>
215+
</property>
179216
<property name="focusPolicy">
180217
<enum>Qt::NoFocus</enum>
181218
</property>
@@ -186,7 +223,7 @@
186223
<string>zoom out</string>
187224
</property>
188225
<property name="text">
189-
<string>Zoom Out</string>
226+
<string></string>
190227
</property>
191228
</widget>
192229
</item>
@@ -205,12 +242,6 @@
205242
</property>
206243
<item>
207244
<widget class="QLabel" name="clear_spot_olderLabel">
208-
<property name="font">
209-
<font>
210-
<family>JetBrains Mono ExtraLight</family>
211-
<pointsize>11</pointsize>
212-
</font>
213-
</property>
214245
<property name="text">
215246
<string>Clear older than </string>
216247
</property>

not1mm/lib/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""It's the version"""
22

3-
__version__ = "24.11.27"
3+
__version__ = "24.12.3"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "not1mm"
7-
version = "24.11.27"
7+
version = "24.12.3"
88
description = "NOT1MM Logger"
99
readme = "README.md"
1010
requires-python = ">=3.9"

0 commit comments

Comments
 (0)