1313import logging
1414import os
1515import platform
16+ import re
1617import sqlite3
1718from datetime import datetime , timezone
1819from decimal import Decimal
1920from json import loads
2021
2122from PyQt6 import QtCore , QtGui , QtWidgets , uic , QtNetwork
2223from PyQt6 .QtGui import QColorConstants , QFont , QColor
23- from PyQt6 .QtWidgets import QDockWidget
24+ from PyQt6 .QtWidgets import QDockWidget , QStyle
2425from PyQt6 .QtCore import Qt , pyqtSignal
2526
2627import not1mm .fsutils as fsutils
@@ -344,6 +345,7 @@ class BandMapWindow(QDockWidget):
344345 text_color = QColor (45 , 45 , 45 )
345346 cluster_expire = pyqtSignal (str )
346347 message = pyqtSignal (dict )
348+ date_pattern = r"^\d{2}-[A-Za-z]{3}-\d{4}$"
347349
348350 def __init__ (self , action ):
349351 super ().__init__ ()
@@ -362,7 +364,11 @@ def __init__(self, action):
362364 self .agetime = self .clear_spot_olderSpinBox .value ()
363365 self .clear_spot_olderSpinBox .valueChanged .connect (self .spot_aging_changed )
364366 self .clearButton .clicked .connect (self .clear_spots )
367+ pixmapi = QStyle .StandardPixmap .SP_TrashIcon
368+ icon = self .style ().standardIcon (pixmapi )
369+ self .clearButton .setIcon (icon )
365370 self .clearmarkedButton .clicked .connect (self .clear_marked )
371+ self .clearmarkedButton .setIcon (icon )
366372 self .zoominButton .clicked .connect (self .dec_zoom )
367373 self .zoomoutButton .clicked .connect (self .inc_zoom )
368374 self .connectButton .clicked .connect (self .connect )
@@ -884,8 +890,20 @@ def receive(self) -> None:
884890 self .send_command (
885891 "set dx mode " + self .settings .get ("cluster_mode" , "OPEN" )
886892 )
893+ self .send_command ("sh ww" )
887894 logger .debug (f"callsign login acknowledged { data } " )
888895
896+ items = data .split ()
897+ if items :
898+ if re .match (self .date_pattern , items [0 ]):
899+ try :
900+ sfi = items [2 ]
901+ aindex = items [3 ]
902+ kindex = items [4 ]
903+ print (f"{ sfi = } { aindex = } { kindex = } " )
904+ except IndexError :
905+ ...
906+
889907 def maybeconnected (self ) -> None :
890908 """Update visual state of the connect button."""
891909 self .connectButton .setText ("Connecting" )
0 commit comments