Auto connect to DX cluster added (must be enabled in Preferences)

This commit is contained in:
Petr Hlozek 2015-09-06 09:55:53 +02:00
parent bf6c0c560f
commit e664f2c7f4
6 changed files with 772 additions and 742 deletions

View File

@ -10,6 +10,7 @@ Legend:
+ RBN monitor added + RBN monitor added
+ TRX configuration improved (you can choose rig from a list instead of entering Hamlib rig ID) + TRX configuration improved (you can choose rig from a list instead of entering Hamlib rig ID)
+ Remote mode for wsjt added (thanks to Saku, OH1KH) + Remote mode for wsjt added (thanks to Saku, OH1KH)
+ Auto connect to DX cluster added (must be enabled in Preferences)
- Export configuration of opened log doesn't reflect recent changes - fixed - Export configuration of opened log doesn't reflect recent changes - fixed
- station that were not added to DX cluster window (because of filter criteria) were added to bandmap - fixed - station that were not added to DX cluster window (because of filter criteria) were added to bandmap - fixed
- station name and QTH is replaced automatically when callsign is edited during the qso - station name and QTH is replaced automatically when callsign is edited during the qso

View File

@ -1,7 +1,7 @@
object frmDXCluster: TfrmDXCluster object frmDXCluster: TfrmDXCluster
Left = 497 Left = 497
Height = 219 Height = 219
Top = 527 Top = 548
Width = 564 Width = 564
HelpType = htKeyword HelpType = htKeyword
HelpKeyword = 'help/h21.html#ah19' HelpKeyword = 'help/h21.html#ah19'
@ -138,11 +138,11 @@ object frmDXCluster: TfrmDXCluster
object Panel4: TPanel object Panel4: TPanel
Left = 0 Left = 0
Height = 36 Height = 36
Top = 148 Top = 152
Width = 558 Width = 560
Align = alBottom Align = alBottom
ClientHeight = 36 ClientHeight = 36
ClientWidth = 558 ClientWidth = 560
TabOrder = 0 TabOrder = 0
object lblInfo: TLabel object lblInfo: TLabel
Left = 10 Left = 10
@ -152,7 +152,7 @@ object frmDXCluster: TfrmDXCluster
ParentColor = False ParentColor = False
end end
object btnWebConnect: TButton object btnWebConnect: TButton
Left = 469 Left = 471
Height = 25 Height = 25
Top = 6 Top = 6
Width = 84 Width = 84
@ -163,7 +163,7 @@ object frmDXCluster: TfrmDXCluster
TabOrder = 0 TabOrder = 0
end end
object btnClear: TButton object btnClear: TButton
Left = 387 Left = 389
Height = 25 Height = 25
Top = 6 Top = 6
Width = 75 Width = 75
@ -185,7 +185,7 @@ object frmDXCluster: TfrmDXCluster
Visible = False Visible = False
end end
object btnFont: TButton object btnFont: TButton
Left = 307 Left = 309
Height = 25 Height = 25
Top = 6 Top = 6
Width = 75 Width = 75
@ -198,9 +198,9 @@ object frmDXCluster: TfrmDXCluster
end end
object pnlWeb: TPanel object pnlWeb: TPanel
Left = 0 Left = 0
Height = 148 Height = 152
Top = 0 Top = 0
Width = 558 Width = 560
Align = alClient Align = alClient
Alignment = taLeftJustify Alignment = taLeftJustify
BevelInner = bvLowered BevelInner = bvLowered
@ -340,4 +340,11 @@ object frmDXCluster: TfrmDXCluster
left = 136 left = 136
top = 122 top = 122
end end
object tmrAutoConnect: TTimer
Enabled = False
Interval = 3000
OnTimer = tmrAutoConnectTimer
left = 246
top = 68
end
end end

View File

@ -2,7 +2,7 @@
LazarusResources.Add('TfrmDXCluster','FORMDATA',[ LazarusResources.Add('TfrmDXCluster','FORMDATA',[
'TPF0'#13'TfrmDXCluster'#12'frmDXCluster'#4'Left'#3#241#1#6'Height'#3#219#0#3 'TPF0'#13'TfrmDXCluster'#12'frmDXCluster'#4'Left'#3#241#1#6'Height'#3#219#0#3
+'Top'#3#15#2#5'Width'#3'4'#2#8'HelpType'#7#9'htKeyword'#11'HelpKeyword'#6#18 +'Top'#3'$'#2#5'Width'#3'4'#2#8'HelpType'#7#9'htKeyword'#11'HelpKeyword'#6#18
+'help/h21.html#ah19'#13'ActiveControl'#7#11'pgDXCluster'#7'Caption'#6#9'DXCl' +'help/h21.html#ah19'#13'ActiveControl'#7#11'pgDXCluster'#7'Caption'#6#9'DXCl'
+'uster'#12'ClientHeight'#3#219#0#11'ClientWidth'#3'4'#2#9'Icon.Data'#10#194 +'uster'#12'ClientHeight'#3#219#0#11'ClientWidth'#3'4'#2#9'Icon.Data'#10#194
+#12#0#0#190#12#0#0#0#0#1#0#1#0' '#0#0#1#0#24#0#168#12#0#0#22#0#0#0'('#0#0#0 +#12#0#0#190#12#0#0#0#0#1#0#1#0' '#0#0#1#0#24#0#168#12#0#0#22#0#0#0'('#0#0#0
@ -167,22 +167,22 @@ LazarusResources.Add('TfrmDXCluster','FORMDATA',[
+'Width'#3'4'#2#10'ActivePage'#7#9'tabTelnet'#5'Align'#7#8'alClient'#8'TabInd' +'Width'#3'4'#2#10'ActivePage'#7#9'tabTelnet'#5'Align'#7#8'alClient'#8'TabInd'
+'ex'#2#1#8'TabOrder'#2#0#0#9'TTabSheet'#6'tabWeb'#7'Caption'#6#3'Web'#12'Cli' +'ex'#2#1#8'TabOrder'#2#0#0#9'TTabSheet'#6'tabWeb'#7'Caption'#6#3'Web'#12'Cli'
+'entHeight'#3#188#0#11'ClientWidth'#3'0'#2#0#6'TPanel'#6'Panel4'#4'Left'#2#0 +'entHeight'#3#188#0#11'ClientWidth'#3'0'#2#0#6'TPanel'#6'Panel4'#4'Left'#2#0
+#6'Height'#2'$'#3'Top'#3#148#0#5'Width'#3'.'#2#5'Align'#7#8'alBottom'#12'Cli' +#6'Height'#2'$'#3'Top'#3#152#0#5'Width'#3'0'#2#5'Align'#7#8'alBottom'#12'Cli'
+'entHeight'#2'$'#11'ClientWidth'#3'.'#2#8'TabOrder'#2#0#0#6'TLabel'#7'lblInf' +'entHeight'#2'$'#11'ClientWidth'#3'0'#2#8'TabOrder'#2#0#0#6'TLabel'#7'lblInf'
+'o'#4'Left'#2#10#6'Height'#2#1#3'Top'#2#15#5'Width'#2#1#11'ParentColor'#8#0#0 +'o'#4'Left'#2#10#6'Height'#2#1#3'Top'#2#15#5'Width'#2#1#11'ParentColor'#8#0#0
+#7'TButton'#13'btnWebConnect'#4'Left'#3#213#1#6'Height'#2#25#3'Top'#2#6#5'Wi' +#7'TButton'#13'btnWebConnect'#4'Left'#3#215#1#6'Height'#2#25#3'Top'#2#6#5'Wi'
+'dth'#2'T'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorder' +'dth'#2'T'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorder'
+#2#4#7'Caption'#6#7'Connect'#7'OnClick'#7#18'btnWebConnectClick'#8'TabOrder' +#2#4#7'Caption'#6#7'Connect'#7'OnClick'#7#18'btnWebConnectClick'#8'TabOrder'
+#2#0#0#0#7'TButton'#8'btnClear'#4'Left'#3#131#1#6'Height'#2#25#3'Top'#2#6#5 +#2#0#0#0#7'TButton'#8'btnClear'#4'Left'#3#133#1#6'Height'#2#25#3'Top'#2#6#5
+'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorde' +'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorde'
+'r'#2#4#7'Caption'#6#5'Clear'#7'OnClick'#7#13'btnClearClick'#8'TabOrder'#2#1 +'r'#2#4#7'Caption'#6#5'Clear'#7'OnClick'#7#13'btnClearClick'#8'TabOrder'#2#1
+#0#0#7'TButton'#7'btnHelp'#4'Left'#3#142#0#6'Height'#2#25#3'Top'#2#6#5'Width' +#0#0#7'TButton'#7'btnHelp'#4'Left'#3#142#0#6'Height'#2#25#3'Top'#2#6#5'Width'
+#2'K'#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#4'Help'#7'OnClick'#7#12 +#2'K'#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#4'Help'#7'OnClick'#7#12
+'btnHelpClick'#8'TabOrder'#2#2#7'Visible'#8#0#0#7'TButton'#7'btnFont'#4'Left' +'btnHelpClick'#8'TabOrder'#2#2#7'Visible'#8#0#0#7'TButton'#7'btnFont'#4'Left'
+#3'3'#1#6'Height'#2#25#3'Top'#2#6#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akR' +#3'5'#1#6'Height'#2#25#3'Top'#2#6#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akR'
+'ight'#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#4'Font'#7'OnClick'#7 +'ight'#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#4'Font'#7'OnClick'#7
+#12'btnFontClick'#8'TabOrder'#2#3#0#0#0#6'TPanel'#6'pnlWeb'#4'Left'#2#0#6'He' +#12'btnFontClick'#8'TabOrder'#2#3#0#0#0#6'TPanel'#6'pnlWeb'#4'Left'#2#0#6'He'
+'ight'#3#148#0#3'Top'#2#0#5'Width'#3'.'#2#5'Align'#7#8'alClient'#9'Alignment' +'ight'#3#152#0#3'Top'#2#0#5'Width'#3'0'#2#5'Align'#7#8'alClient'#9'Alignment'
+#7#13'taLeftJustify'#10'BevelInner'#7#9'bvLowered'#10'BevelOuter'#7#9'bvLowe' +#7#13'taLeftJustify'#10'BevelInner'#7#9'bvLowered'#10'BevelOuter'#7#9'bvLowe'
+'red'#5'Color'#7#7'clWhite'#12'Font.CharSet'#7#12'ANSI_CHARSET'#11'Font.Heig' +'red'#5'Color'#7#7'clWhite'#12'Font.CharSet'#7#12'ANSI_CHARSET'#11'Font.Heig'
+'ht'#2#12#9'Font.Name'#6#19'DejaVu Sans Mono 12'#11'ParentColor'#8#10'Parent' +'ht'#2#12#9'Font.Name'#6#19'DejaVu Sans Mono 12'#11'ParentColor'#8#10'Parent'
@ -215,5 +215,7 @@ LazarusResources.Add('TfrmDXCluster','FORMDATA',[
+'clWhite'#11'ParentColor'#8#8'TabOrder'#2#2#0#0#0#0#6'TTimer'#8'tmrSpots'#7 +'clWhite'#11'ParentColor'#8#8'TabOrder'#2#2#0#0#0#0#6'TTimer'#8'tmrSpots'#7
+'Enabled'#8#8'Interval'#3' N'#7'OnTimer'#7#13'tmrSpotsTimer'#4'left'#2'X'#3 +'Enabled'#8#8'Interval'#3' N'#7'OnTimer'#7#13'tmrSpotsTimer'#4'left'#2'X'#3
+'top'#2'z'#0#0#11'TFontDialog'#8'dlgDXfnt'#11'MinFontSize'#2#0#11'MaxFontSiz' +'top'#2'z'#0#0#11'TFontDialog'#8'dlgDXfnt'#11'MinFontSize'#2#0#11'MaxFontSiz'
+'e'#2#0#4'left'#3#136#0#3'top'#2'z'#0#0#0 +'e'#2#0#4'left'#3#136#0#3'top'#2'z'#0#0#6'TTimer'#14'tmrAutoConnect'#7'Enabl'
+'ed'#8#8'Interval'#3#184#11#7'OnTimer'#7#19'tmrAutoConnectTimer'#4'left'#3
+#246#0#3'top'#2'D'#0#0#0
]); ]);

View File

@ -46,6 +46,7 @@ type
pnlWeb: TPanel; pnlWeb: TPanel;
tabTelnet: TTabSheet; tabTelnet: TTabSheet;
tabWeb: TTabSheet; tabWeb: TTabSheet;
tmrAutoConnect: TTimer;
tmrSpots: TTimer; tmrSpots: TTimer;
procedure Button2Click(Sender: TObject); procedure Button2Click(Sender: TObject);
procedure FormActivate(Sender: TObject); procedure FormActivate(Sender: TObject);
@ -61,6 +62,7 @@ type
procedure btnTelConnectClick(Sender: TObject); procedure btnTelConnectClick(Sender: TObject);
procedure btnWebConnectClick(Sender: TObject); procedure btnWebConnectClick(Sender: TObject);
procedure edtCommandKeyPress(Sender: TObject; var Key: char); procedure edtCommandKeyPress(Sender: TObject; var Key: char);
procedure tmrAutoConnectTimer(Sender: TObject);
procedure tmrSpotsTimer(Sender: TObject); procedure tmrSpotsTimer(Sender: TObject);
private private
telDesc : String; telDesc : String;
@ -404,7 +406,6 @@ begin
try try
f.Name := cqrini.ReadString('DXCluster','Font','DejaVu Sans Mono'); f.Name := cqrini.ReadString('DXCluster','Font','DejaVu Sans Mono');
f.Size := cqrini.ReadInteger('DXCluster','FontSize',12); f.Size := cqrini.ReadInteger('DXCluster','FontSize',12);
ConOnShow := cqrini.ReadBool('DXCluster','ConAfterRun',False);
WebSpots.nastav_font(f); WebSpots.nastav_font(f);
TelSpots.nastav_font(f) TelSpots.nastav_font(f)
finally finally
@ -419,7 +420,10 @@ begin
telPort := cqrini.ReadString('DXCluster','Port',''); telPort := cqrini.ReadString('DXCluster','Port','');
telUser := cqrini.ReadString('DXCluster','User',''); telUser := cqrini.ReadString('DXCluster','User','');
telPass := cqrini.ReadString('DXCluster','Pass',''); telPass := cqrini.ReadString('DXCluster','Pass','');
edtTelAddress.Text := telDesc edtTelAddress.Text := telDesc;
if cqrini.ReadBool('DXCluster', 'ConAfterRun', False) then
tmrAutoConnect.Enabled := True
end; end;
procedure TfrmDXCluster.btnClearClick(Sender: TObject); procedure TfrmDXCluster.btnClearClick(Sender: TObject);
@ -515,6 +519,21 @@ begin
end; end;
end; end;
procedure TfrmDXCluster.tmrAutoConnectTimer(Sender: TObject);
begin
Writeln('Trying to connect');
tmrAutoConnect.Enabled := False;
if pgDXCluster.ActivePageIndex = 0 then
begin
if not ConWeb then
btnWebConnectClick(nil)
end
else begin
if not ConTelnet then
btnTelConnectClick(nil)
end
end;
procedure TfrmDXCluster.lConnect(aSocket: TLSocket); procedure TfrmDXCluster.lConnect(aSocket: TLSocket);
begin begin
btnTelConnect.Caption := 'Disconnect'; btnTelConnect.Caption := 'Disconnect';

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff