mirror of
https://github.com/ok2cqr/cqrlog.git
synced 2024-09-21 10:27:17 +00:00
Filter do_date fix
This will fix calendar (TDateEdit) usage and allows to save filter with from_date and to_date empty. Some clean ups for code creating the SQLfilter (btnOK pressed) Version number update to help index page. Squashed commit of the following: commit 48a290c44aa6bf6d9fe48c8e7aebf8e3d367d42d Author: OH1KH <oh1kh@sral.fi> Date: Mon Dec 2 19:15:24 2019 +0200 cqrlog version to 2.4.0 at help index commitd5227f8dab
Author: OH1KH <oh1kh@sral.fi> Date: Sun Dec 1 12:03:07 2019 +0200 Date fixes commit913649f186
Merge:67d1330
e1d0d62
Author: OH1KH <oh1kh@sral.fi> Date: Sun Dec 1 10:56:38 2019 +0200 merged master commit67d13300ac
Merge:122db64
e9c4c88
Author: OH1KH <oh1kh@sral.fi> Date: Mon Nov 25 15:46:22 2019 +0200 Merge branch 'master' into filter_to_date commit122db64c54
Author: OH1KH <oh1kh@sral.fi> Date: Mon Nov 18 17:43:18 2019 +0200 Fixed date-to: save as empty
This commit is contained in:
parent
e1d0d621ee
commit
a9fa881838
@ -8,7 +8,7 @@
|
|||||||
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
||||||
<title>CQRLOG - Help Index</title></head>
|
<title>CQRLOG - Help Index</title></head>
|
||||||
<body>
|
<body>
|
||||||
<strong><h1>CQRLOG for LINUX (version 2.3.0)</h1></strong>
|
<strong><h1>CQRLOG for LINUX (version 2.4.0)</h1></strong>
|
||||||
by<br><br>
|
by<br><br>
|
||||||
<i>Petr Hlozek, OK7AN
|
<i>Petr Hlozek, OK7AN
|
||||||
[<a href="http://www.ok7an.com">http://www.ok7an.com</a>]</i>
|
[<a href="http://www.ok7an.com">http://www.ok7an.com</a>]</i>
|
||||||
|
@ -23,14 +23,14 @@
|
|||||||
<StringTable ProductVersion="0.3.1.2026"/>
|
<StringTable ProductVersion="0.3.1.2026"/>
|
||||||
</VersionInfo>
|
</VersionInfo>
|
||||||
<MacroValues Count="1">
|
<MacroValues Count="1">
|
||||||
<Macro1 Name="LCLWidgetType" Value="qt5"/>
|
<Macro3 Name="LCLWidgetType" Value="gtk2"/>
|
||||||
</MacroValues>
|
</MacroValues>
|
||||||
<BuildModes Count="1">
|
<BuildModes Count="1">
|
||||||
<Item1 Name="default" Default="True"/>
|
<Item1 Name="default" Default="True"/>
|
||||||
<SharedMatrixOptions Count="3">
|
<SharedMatrixOptions Count="3">
|
||||||
<Item1 ID="364409174580" Modes="default" Type="IDEMacro" MacroName="LCLWidgetType" Value="qt5"/>
|
<Item1 ID="364409174580" Type="IDEMacro" MacroName="LCLWidgetType" Value="qt5"/>
|
||||||
<Item2 ID="890734883088" Type="IDEMacro" MacroName="LCLWidgetType" Value="gtk3"/>
|
<Item2 ID="890734883088" Type="IDEMacro" MacroName="LCLWidgetType" Value="gtk3"/>
|
||||||
<Item3 ID="102898540782" Type="IDEMacro" MacroName="LCLWidgetType" Value="gtk2"/>
|
<Item3 ID="102898540782" Modes="default" Type="IDEMacro" MacroName="LCLWidgetType" Value="gtk2"/>
|
||||||
</SharedMatrixOptions>
|
</SharedMatrixOptions>
|
||||||
</BuildModes>
|
</BuildModes>
|
||||||
<PublishOptions>
|
<PublishOptions>
|
||||||
@ -820,7 +820,6 @@
|
|||||||
</CodeGeneration>
|
</CodeGeneration>
|
||||||
<Linking>
|
<Linking>
|
||||||
<Debugging>
|
<Debugging>
|
||||||
<GenerateDebugInfo Value="False"/>
|
|
||||||
<DebugInfoType Value="dsDwarf2Set"/>
|
<DebugInfoType Value="dsDwarf2Set"/>
|
||||||
</Debugging>
|
</Debugging>
|
||||||
</Linking>
|
</Linking>
|
||||||
|
@ -452,7 +452,6 @@ object frmFilter: TfrmFilter
|
|||||||
Top = 59
|
Top = 59
|
||||||
Width = 114
|
Width = 114
|
||||||
CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames, dsStartMonday]
|
CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames, dsStartMonday]
|
||||||
DefaultToday = True
|
|
||||||
DateOrder = doYMd
|
DateOrder = doYMd
|
||||||
DateFormat = 'YMD'
|
DateFormat = 'YMD'
|
||||||
ButtonWidth = 23
|
ButtonWidth = 23
|
||||||
@ -1377,7 +1376,6 @@ object frmFilter: TfrmFilter
|
|||||||
Height = 34
|
Height = 34
|
||||||
Top = 40
|
Top = 40
|
||||||
Width = 95
|
Width = 95
|
||||||
OnExit = edtDateToExit
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object edtPwrFrom: TEdit
|
object edtPwrFrom: TEdit
|
||||||
@ -1391,7 +1389,6 @@ object frmFilter: TfrmFilter
|
|||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
OnExit = edtDateFromExit
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object Label19: TLabel
|
object Label19: TLabel
|
||||||
|
236
src/fFilter.pas
236
src/fFilter.pas
@ -150,8 +150,6 @@ type
|
|||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure btnCancelClick(Sender: TObject);
|
procedure btnCancelClick(Sender: TObject);
|
||||||
procedure btnOKClick(Sender: TObject);
|
procedure btnOKClick(Sender: TObject);
|
||||||
procedure edtDateFromExit(Sender: TObject);
|
|
||||||
procedure edtDateToExit(Sender: TObject);
|
|
||||||
private
|
private
|
||||||
procedure saveFilter(filename:String);
|
procedure saveFilter(filename:String);
|
||||||
procedure loadFilter(filename:string);
|
procedure loadFilter(filename:string);
|
||||||
@ -176,176 +174,136 @@ var
|
|||||||
grb_by : String = '';
|
grb_by : String = '';
|
||||||
p : TExplodeArray;
|
p : TExplodeArray;
|
||||||
i : Integer = 0;
|
i : Integer = 0;
|
||||||
|
Mask : String = '';
|
||||||
|
sDate : String = '';
|
||||||
begin
|
begin
|
||||||
if chkRemember.Checked then saveFilter(dmData.HomeDir + C_FILTER_LAST_SETTINGS_FILE_NAME);
|
if chkRemember.Checked then saveFilter(dmData.HomeDir + C_FILTER_LAST_SETTINGS_FILE_NAME);
|
||||||
|
//if empty date-to make it as today. NOTE that empty calendar.Text is not empty string, but Date is =0!
|
||||||
|
if edtDateTo.Date = 0 then edtDateTo.Date := now;
|
||||||
|
|
||||||
tmp := '';
|
tmp := '';
|
||||||
if (edtCallSign.Text <> '') then
|
if (edtCallSign.Text <> '') then
|
||||||
begin
|
begin
|
||||||
if rbExactlyCall.Checked then
|
if rbExactlyCall.Checked then tmp := ' (callsign = ' + QuotedStr(edtCallSign.Text)+') AND'
|
||||||
tmp := ' (callsign = ' + QuotedStr(edtCallSign.Text)+')'
|
|
||||||
else
|
else
|
||||||
tmp := ' (callsign LIKE ''%' + edtCallSign.Text + '%'')';
|
tmp := ' (callsign LIKE ''%' + edtCallSign.Text + '%'') AND';
|
||||||
tmp := tmp + ' AND';
|
|
||||||
end;
|
|
||||||
if (edtDXCC.Text <> '') then
|
|
||||||
begin
|
|
||||||
tmp := tmp + ' (dxcc_ref = '+ QuotedStr(edtDXCC.Text)+')';
|
|
||||||
tmp := tmp + ' AND'
|
|
||||||
end;
|
|
||||||
if ((edtFreqFrom.Text <> '') and (edtFreqTo.Text <> '')) then
|
|
||||||
begin
|
|
||||||
tmp := tmp + ' (freq >= ' + edtFreqFrom.Text + ') AND '+
|
|
||||||
' (freq <= ' + edtFreqTo.Text + ')';
|
|
||||||
tmp := tmp + ' AND'
|
|
||||||
end;
|
|
||||||
if (cmbMode.Text <> '') then
|
|
||||||
begin
|
|
||||||
tmp := tmp + ' (mode = ' + QuotedStr(cmbMode.Text)+')';
|
|
||||||
tmp := tmp + ' AND'
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if (edtDXCC.Text <> '') then tmp := tmp + ' (dxcc_ref = '+ QuotedStr(edtDXCC.Text)+') AND';
|
||||||
|
|
||||||
|
if ((edtFreqFrom.Text <> '')
|
||||||
|
and (edtFreqTo.Text <> '')) then tmp := tmp + ' (freq >= ' + edtFreqFrom.Text + ') AND '+
|
||||||
|
' (freq <= ' + edtFreqTo.Text + ') AND';
|
||||||
|
|
||||||
|
if (cmbMode.Text <> '') then tmp := tmp + ' (mode = ' + QuotedStr(cmbMode.Text)+') AND';
|
||||||
|
|
||||||
if ( cmbContestName.Text <> '') then
|
if ( cmbContestName.Text <> '') then
|
||||||
begin
|
begin
|
||||||
if cbIncConName.Checked then
|
if cbIncConName.Checked then
|
||||||
tmp := tmp + ' (UPPER(contestname) LIKE ''%' + upcase(cmbContestName.Text) + '%'')'
|
tmp := tmp + ' (UPPER(contestname) LIKE ''%' +
|
||||||
|
upcase(cmbContestName.Text) + '%'') AND'
|
||||||
else
|
else
|
||||||
tmp := tmp + ' (UPPER(contestname) = ' + QuotedStr(upcase(cmbContestName.Text))+')';
|
tmp := tmp + ' (UPPER(contestname) = ' +
|
||||||
tmp := tmp + ' AND'
|
QuotedStr(upcase(cmbContestName.Text))+') AND';
|
||||||
end;
|
|
||||||
if (edtSTX.Text <> '') then
|
|
||||||
begin
|
|
||||||
tmp := tmp + ' (stx = ' + QuotedStr(edtSTX.Text)+')';
|
|
||||||
tmp := tmp + ' AND'
|
|
||||||
end;
|
|
||||||
if (edtSRX.Text <> '') then
|
|
||||||
begin
|
|
||||||
tmp := tmp + ' (srx = ' + QuotedStr(edtSRX.Text)+')';
|
|
||||||
tmp := tmp + ' AND'
|
|
||||||
end;
|
|
||||||
if (edtSTXstr.Text <> '') then
|
|
||||||
begin
|
|
||||||
tmp := tmp + ' (UPPER(stx_string) = ' + QuotedStr(upcase(edtSTXstr.Text))+')';
|
|
||||||
tmp := tmp + ' AND'
|
|
||||||
end;
|
|
||||||
if (edtSRXstr.Text <> '') then
|
|
||||||
begin
|
|
||||||
tmp := tmp + ' (UPPER(srx_string) = ' + QuotedStr(upcase(edtSRXstr.Text))+')';
|
|
||||||
tmp := tmp + ' AND'
|
|
||||||
end;
|
|
||||||
if (edtDateFrom.Text <> '') then
|
|
||||||
begin
|
|
||||||
tmp := tmp + ' (qsodate >= ' + QuotedStr(edtDateFrom.Text) + ') AND (qsodate <= ' +
|
|
||||||
QuotedStr(edtDateTo.Text) + ')';
|
|
||||||
tmp := tmp + ' AND'
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if (edtSTX.Text <> '') then tmp := tmp + ' (stx = ' + QuotedStr(edtSTX.Text)+') AND';
|
||||||
|
|
||||||
|
if (edtSRX.Text <> '') then tmp := tmp + ' (srx = ' + QuotedStr(edtSRX.Text)+') AND';
|
||||||
|
|
||||||
|
if (edtSTXstr.Text <> '') then tmp := tmp + ' (UPPER(stx_string) = ' + QuotedStr(upcase(edtSTXstr.Text))+') AND';
|
||||||
|
|
||||||
|
if (edtSRXstr.Text <> '') then tmp := tmp + ' (UPPER(srx_string) = ' + QuotedStr(upcase(edtSRXstr.Text))+') AND';
|
||||||
|
|
||||||
|
//NOTE that empty calendar.Text is not empty string, but Date is =0!
|
||||||
|
if edtDateFrom.Date <> 0 then tmp := tmp + ' (qsodate >= ' + QuotedStr(dmUtils.MyDateToStr(edtDateFrom.Date)) +
|
||||||
|
') AND (qsodate <= ' + QuotedStr(dmUtils.MyDateToStr(edtDateTo.Date)) +
|
||||||
|
') AND';
|
||||||
|
|
||||||
if (edtLocator.Text <> '') then
|
if (edtLocator.Text <> '') then
|
||||||
begin
|
begin
|
||||||
if rbExactlyLoc.Checked then
|
if rbExactlyLoc.Checked then
|
||||||
tmp := tmp + ' (loc = ' + QuotedStr(edtLocator.Text)+')'
|
tmp := tmp + ' (loc = ' + QuotedStr(edtLocator.Text)+') AND'
|
||||||
else
|
else
|
||||||
tmp := tmp + ' (loc LIKE ''%' + edtLocator.Text + '%'')';
|
tmp := tmp + ' (loc LIKE ''%' + edtLocator.Text + '%'') AND';
|
||||||
tmp := tmp + ' AND';
|
|
||||||
end;
|
end;
|
||||||
if (edtQTH.Text <> '') then
|
if (edtQTH.Text <> '') then
|
||||||
begin
|
begin
|
||||||
if rbExactlyQth.Checked then
|
if rbExactlyQth.Checked then
|
||||||
tmp := tmp + ' (qth = ' + QuotedStr(edtQTH.Text)+')'
|
tmp := tmp + ' (qth = ' + QuotedStr(edtQTH.Text)+') AND'
|
||||||
else
|
else
|
||||||
tmp := tmp + ' (qth LIKE ''%' + edtQTH.Text + '%'')';
|
tmp := tmp + ' (qth LIKE ''%' + edtQTH.Text + '%'') AND';
|
||||||
tmp := tmp + ' AND';
|
|
||||||
end;
|
|
||||||
if (edtQSLVia.Text <> '') then
|
|
||||||
begin
|
|
||||||
tmp := tmp + ' (qsl_via = ' + QuotedStr(edtQSLVia.Text)+')';
|
|
||||||
tmp := tmp + ' AND'
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if (edtQSLVia.Text <> '') then tmp := tmp + ' (qsl_via = ' + QuotedStr(edtQSLVia.Text)+') AND';
|
||||||
|
|
||||||
if (cmbQSL_S.Text <> '') then
|
if (cmbQSL_S.Text <> '') then
|
||||||
begin
|
begin
|
||||||
if cmbQSL_S.Text = 'S' then
|
if cmbQSL_S.Text = 'S' then
|
||||||
tmp := tmp + ' (qsl_s LIKE ''%' + cmbQSL_S.Text + '%'')'
|
tmp := tmp + ' (qsl_s LIKE ''%' + cmbQSL_S.Text + '%'') AND'
|
||||||
else begin
|
|
||||||
if cmbQSL_S.Text = 'Empty' then
|
|
||||||
tmp := tmp + '((qsl_s = ' + QuotedStr('')+') or (qsl_s is null))'
|
|
||||||
else
|
else
|
||||||
tmp := tmp + '(qsl_s = ' + QuotedStr(cmbQSL_S.Text)+')'
|
begin
|
||||||
|
if cmbQSL_S.Text = 'Empty' then
|
||||||
|
tmp := tmp + '((qsl_s = ' + QuotedStr('')+') or (qsl_s is null)) AND'
|
||||||
|
else
|
||||||
|
tmp := tmp + '(qsl_s = ' + QuotedStr(cmbQSL_S.Text)+') AND'
|
||||||
end;
|
end;
|
||||||
tmp := tmp + ' AND'
|
|
||||||
end;
|
end;
|
||||||
if (cmbQSL_R.Text <> '') then
|
if (cmbQSL_R.Text <> '') then
|
||||||
begin
|
begin
|
||||||
if cmbQSL_R.Text = 'Empty' then
|
if cmbQSL_R.Text = 'Empty' then
|
||||||
tmp := tmp + '((qsl_r = ' + QuotedStr('')+') or (qsl_r is null))'
|
tmp := tmp + '((qsl_r = ' + QuotedStr('')+') or (qsl_r is null)) AND'
|
||||||
else
|
else
|
||||||
tmp := tmp + '(qsl_r = ' + QuotedStr(cmbQSL_R.Text)+')';
|
tmp := tmp + '(qsl_r = ' + QuotedStr(cmbQSL_R.Text)+') AND';
|
||||||
tmp := tmp + ' AND'
|
|
||||||
end;
|
end;
|
||||||
if (edtIOTA.Text <> '') then
|
if (edtIOTA.Text <> '') then
|
||||||
begin
|
begin
|
||||||
if rbExactlyIOTA.Checked then
|
if rbExactlyIOTA.Checked then
|
||||||
tmp := tmp + ' (iota = ' + QuotedStr(edtIOTA.Text)+')'
|
tmp := tmp + ' (iota = ' + QuotedStr(edtIOTA.Text)+') AND'
|
||||||
else
|
else
|
||||||
tmp := tmp + ' (iota LIKE ''%' + edtIOTA.Text + '%'')';
|
tmp := tmp + ' (iota LIKE ''%' + edtIOTA.Text + '%'') AND';
|
||||||
tmp := tmp + ' AND'
|
|
||||||
end;
|
|
||||||
if chkIOTAOnly.Checked then
|
|
||||||
begin
|
|
||||||
tmp := tmp + ' (iota IS NOT NULL)';
|
|
||||||
tmp := tmp + ' AND'
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if chkIOTAOnly.Checked then tmp := tmp + ' (iota IS NOT NULL) AND';
|
||||||
|
|
||||||
if (edtReMarks.Text <> '') then
|
if (edtReMarks.Text <> '') then
|
||||||
begin
|
begin
|
||||||
if rbExactlyRem.Checked then
|
if rbExactlyRem.Checked then
|
||||||
tmp := tmp + ' (remarks = ' + QuotedStr(edtRemarks.Text)+')'
|
tmp := tmp + ' (remarks = ' + QuotedStr(edtRemarks.Text)+') AND'
|
||||||
else
|
else
|
||||||
tmp := tmp + ' (remarks LIKE ''%' + edtRemarks.Text + '%'')';
|
tmp := tmp + ' (remarks LIKE ''%' + edtRemarks.Text + '%'') AND';
|
||||||
tmp := tmp + ' AND';
|
|
||||||
end;
|
end;
|
||||||
if (edtDiplom.Text <> '') then
|
if (edtDiplom.Text <> '') then
|
||||||
begin
|
begin
|
||||||
if rbExactlyDiplom.Checked then
|
if rbExactlyDiplom.Checked then
|
||||||
tmp := tmp + ' (award = ' + QuotedStr(edtDiplom.Text)+')'
|
tmp := tmp + ' (award = ' + QuotedStr(edtDiplom.Text)+') AND'
|
||||||
else
|
else
|
||||||
tmp := tmp + ' (award LIKE ''%' + edtDiplom.Text + '%'')';
|
tmp := tmp + ' (award LIKE ''%' + edtDiplom.Text + '%'') AND';
|
||||||
tmp := tmp + ' AND';
|
|
||||||
end;
|
end;
|
||||||
if (edtMyLoc.Text <> '') then
|
if (edtMyLoc.Text <> '') then
|
||||||
begin
|
begin
|
||||||
if rbExactlyMyLoc.Checked then
|
if rbExactlyMyLoc.Checked then
|
||||||
tmp := tmp + ' (my_loc = ' + QuotedStr(edtMyLoc.Text)+')'
|
tmp := tmp + ' (my_loc = ' + QuotedStr(edtMyLoc.Text)+') AND'
|
||||||
else
|
else
|
||||||
tmp := tmp + ' (my_loc LIKE ''%' + edtMyLoc.Text + '%'')';
|
tmp := tmp + ' (my_loc LIKE ''%' + edtMyLoc.Text + '%'') AND';
|
||||||
tmp := tmp + ' AND';
|
|
||||||
end;
|
|
||||||
if (edtWAZ.Text <> '') then
|
|
||||||
begin
|
|
||||||
tmp := tmp + ' (waz = ' + edtWAZ.Text + ')';
|
|
||||||
tmp := tmp + ' AND';
|
|
||||||
end;
|
|
||||||
if (edtITU.Text <> '') then
|
|
||||||
begin
|
|
||||||
tmp := tmp + ' (itu = ' + edtITU.Text + ')';
|
|
||||||
tmp := tmp + ' AND';
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if (edtWAZ.Text <> '') then tmp := tmp + ' (waz = ' + edtWAZ.Text + ') AND';
|
||||||
|
|
||||||
|
if (edtITU.Text <> '') then tmp := tmp + ' (itu = ' + edtITU.Text + ') AND';
|
||||||
|
|
||||||
if (edtCounty.Text <> '') then
|
if (edtCounty.Text <> '') then
|
||||||
begin
|
begin
|
||||||
if rbExactlyCounty.Checked then
|
if rbExactlyCounty.Checked then
|
||||||
tmp := tmp + ' (county = ' + QuotedStr(edtCounty.Text)+')'
|
tmp := tmp + ' (county = ' + QuotedStr(edtCounty.Text)+') AND'
|
||||||
else
|
else
|
||||||
tmp := tmp + ' (county LIKE ''%' + edtCounty.Text + '%'')';
|
tmp := tmp + ' (county LIKE ''%' + edtCounty.Text + '%'') AND';
|
||||||
tmp := tmp + ' AND';
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if edtState.Text <> '' then
|
if edtState.Text <> '' then tmp := tmp + ' (state = ' + QuotedStr(edtState.Text)+') AND';
|
||||||
begin
|
|
||||||
tmp := tmp + ' (state = ' + QuotedStr(edtState.Text)+')';
|
|
||||||
tmp := tmp + ' AND';
|
|
||||||
end;
|
|
||||||
|
|
||||||
if cmbProfile.ItemIndex > 0 then
|
if cmbProfile.ItemIndex > 0 then tmp := tmp + '(profile = ' + IntToStr(dmData.GetNRFromProfile(cmbProfile.Text)) +
|
||||||
begin
|
') AND';
|
||||||
tmp := tmp + '(profile = ' + IntToStr(dmData.GetNRFromProfile(cmbProfile.Text)) + ')';
|
|
||||||
tmp := tmp + ' AND';
|
|
||||||
end;
|
|
||||||
|
|
||||||
if cmbLoTW_qsls.ItemIndex > 0 then
|
if cmbLoTW_qsls.ItemIndex > 0 then
|
||||||
begin
|
begin
|
||||||
@ -392,15 +350,12 @@ begin
|
|||||||
tmp := tmp + ' (eqsl_qsl_rcvd <> '+QuotedStr('E')+') AND'
|
tmp := tmp + ' (eqsl_qsl_rcvd <> '+QuotedStr('E')+') AND'
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if ((edtPwrFrom.Text <> '') and (edtPwrTo.Text <> '')) then
|
if ((edtPwrFrom.Text <> '') and (edtPwrTo.Text <> '')) then tmp := tmp + ' (pwr >= ' + edtPwrFrom.Text + ') AND '+
|
||||||
begin
|
' (pwr <= ' + edtPwrTo.Text + ') AND';
|
||||||
tmp := tmp + ' (pwr >= ' + edtPwrFrom.Text + ') AND '+
|
|
||||||
' (pwr <= ' + edtPwrTo.Text + ')';
|
|
||||||
tmp := tmp + ' AND'
|
|
||||||
end;
|
|
||||||
|
|
||||||
if cmbMembers.ItemIndex >0 then
|
|
||||||
tmp := tmp + ' (club_nr'+IntToStr(cmbMembers.ItemIndex)+' <> '+QuotedStr('')+') AND';
|
if cmbMembers.ItemIndex >0 then tmp := tmp + ' (club_nr'+IntToStr(cmbMembers.ItemIndex)+' <> '+
|
||||||
|
QuotedStr('')+') AND';
|
||||||
|
|
||||||
if (tmp <> '') then
|
if (tmp <> '') then
|
||||||
begin
|
begin
|
||||||
@ -462,24 +417,6 @@ begin
|
|||||||
ModalResult := mrOK;
|
ModalResult := mrOK;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmFilter.edtDateFromExit(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if Length(edtDateFrom.Text)=8 then
|
|
||||||
begin
|
|
||||||
tmp := edtDateFrom.Text;
|
|
||||||
edtDateFrom.Text := copy(tmp,1,4) + '-' + copy(tmp,5,2) + '-' + copy(tmp,7,2)
|
|
||||||
end
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmFilter.edtDateToExit(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if Length(edtDateTo.Text)=8 then
|
|
||||||
begin
|
|
||||||
tmp := edtDateTo.Text;
|
|
||||||
edtDateTo.Text := copy(tmp,1,4) + '-' + copy(tmp,5,2) + '-' + copy(tmp,7,2)
|
|
||||||
end
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmFilter.btnCancelClick(Sender: TObject);
|
procedure TfrmFilter.btnCancelClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Close
|
Close
|
||||||
@ -533,12 +470,9 @@ end;
|
|||||||
//creates and shows itself in every opening
|
//creates and shows itself in every opening
|
||||||
|
|
||||||
procedure TfrmFilter.FormShow(Sender: TObject);
|
procedure TfrmFilter.FormShow(Sender: TObject);
|
||||||
var
|
|
||||||
Mask, sDate : String;
|
|
||||||
begin
|
begin
|
||||||
dmUtils.LoadFontSettings(self);
|
dmUtils.LoadFontSettings(self);
|
||||||
Mask := '';
|
|
||||||
sDate := '';
|
|
||||||
dmUtils.InsertQSL_S(cmbQSL_S);
|
dmUtils.InsertQSL_S(cmbQSL_S);
|
||||||
cmbQSL_S.Items.Insert(9,'S');
|
cmbQSL_S.Items.Insert(9,'S');
|
||||||
cmbQSL_S.Items.Add('Empty');
|
cmbQSL_S.Items.Add('Empty');
|
||||||
@ -546,8 +480,7 @@ begin
|
|||||||
cmbQSL_R.Items.Add('Empty');
|
cmbQSL_R.Items.Add('Empty');
|
||||||
dmUtils.InsertModes(cmbMode);
|
dmUtils.InsertModes(cmbMode);
|
||||||
cmbMode.Items.Insert(0,'');
|
cmbMode.Items.Insert(0,'');
|
||||||
dmUtils.DateInRightFormat(now,Mask,sDate);
|
|
||||||
edtDateTo.Text := sDate;
|
|
||||||
dmData.InsertProfiles(cmbProfile,True);
|
dmData.InsertProfiles(cmbProfile,True);
|
||||||
cmbProfile.Text := dmData.GetDefaultProfileText;
|
cmbProfile.Text := dmData.GetDefaultProfileText;
|
||||||
cmbProfile.Items.Insert(0,'Any profile');
|
cmbProfile.Items.Insert(0,'Any profile');
|
||||||
@ -626,6 +559,7 @@ begin
|
|||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmFilter.edtLocatorChange(Sender: TObject);
|
procedure TfrmFilter.edtLocatorChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if rbExactlyLoc.Checked then
|
if rbExactlyLoc.Checked then
|
||||||
@ -670,8 +604,10 @@ begin
|
|||||||
edtFreqFrom.Text := '';
|
edtFreqFrom.Text := '';
|
||||||
edtFreqTo.Text := '';
|
edtFreqTo.Text := '';
|
||||||
cmbMode.Text := '';
|
cmbMode.Text := '';
|
||||||
edtDateFrom.Text := '';
|
edtDateFrom.Text := ''; //
|
||||||
edtDateTo.Text := dmUtils.MyDateToStr(now);
|
edtDateFrom.Date := 0; //I think one (date or Text) is enough, but for sure ...
|
||||||
|
edtDateTo.Text := ''; //
|
||||||
|
edtDateTo.Date := 0; //
|
||||||
edtLocator.Text := '';
|
edtLocator.Text := '';
|
||||||
edtQTH.Text := '';
|
edtQTH.Text := '';
|
||||||
cmbQSL_S.Text := '';
|
cmbQSL_S.Text := '';
|
||||||
@ -738,8 +674,11 @@ begin
|
|||||||
filini.WriteString('freq','freq_from',edtFreqFrom.Text);
|
filini.WriteString('freq','freq_from',edtFreqFrom.Text);
|
||||||
filini.WriteString('freq','freq_to',edtFreqTo.Text);
|
filini.WriteString('freq','freq_to',edtFreqTo.Text);
|
||||||
filini.WriteString('mode','mode',cmbMode.Text);
|
filini.WriteString('mode','mode',cmbMode.Text);
|
||||||
filini.WriteString('date','date_from',edtDateFrom.Text);
|
//NOTE that empty calendar is not empty string, but date is 0!
|
||||||
filini.WriteString('date','date_to',edtDateTo.Text);
|
if edtDateFrom.Date = 0 then filini.WriteString('date','date_from','')
|
||||||
|
else filini.WriteString('date','date_from',dmUtils.MyDateToStr(edtDateFrom.Date));
|
||||||
|
if edtDateTo.Date = 0 then filini.WriteString('date','date_to','')
|
||||||
|
else filini.WriteString('date','date_to',dmUtils.MyDateToStr(edtDateTo.Date));
|
||||||
filini.WriteString('locator','locator',edtLocator.Text);
|
filini.WriteString('locator','locator',edtLocator.Text);
|
||||||
filini.WriteBool('locator','exactly',rbExactlyLoc.Checked);
|
filini.WriteBool('locator','exactly',rbExactlyLoc.Checked);
|
||||||
filini.WriteString('qth','qth',edtQTH.Text);
|
filini.WriteString('qth','qth',edtQTH.Text);
|
||||||
@ -795,8 +734,9 @@ var
|
|||||||
edtFreqFrom.Text := filini.ReadString('freq','freq_from','');
|
edtFreqFrom.Text := filini.ReadString('freq','freq_from','');
|
||||||
edtFreqTo.Text := filini.ReadString('freq','freq_to','');
|
edtFreqTo.Text := filini.ReadString('freq','freq_to','');
|
||||||
cmbMode.Text := filini.ReadString('mode','mode','');
|
cmbMode.Text := filini.ReadString('mode','mode','');
|
||||||
|
//I think setting just .Text sets also .Date in case of empty
|
||||||
edtDateFrom.Text := filini.ReadString('date','date_from','');
|
edtDateFrom.Text := filini.ReadString('date','date_from','');
|
||||||
edtDateTo.Text := filini.ReadString('date','date_to',dmUtils.MyDateToStr(now));
|
edtDateTo.Text := filini.ReadString('date','date_to','');
|
||||||
edtLocator.Text := filini.ReadString('locator','locator','');
|
edtLocator.Text := filini.ReadString('locator','locator','');
|
||||||
rbIncludeLoc.Checked := not filini.ReadBool('locator','exactly',True);
|
rbIncludeLoc.Checked := not filini.ReadBool('locator','exactly',True);
|
||||||
edtQTH.Text := filini.ReadString('qth','qth','');
|
edtQTH.Text := filini.ReadString('qth','qth','');
|
||||||
|
@ -6931,7 +6931,6 @@ object frmPreferences: TfrmPreferences
|
|||||||
AutoSize = False
|
AutoSize = False
|
||||||
NumGlyphs = 1
|
NumGlyphs = 1
|
||||||
MaxLength = 10
|
MaxLength = 10
|
||||||
OnEditingDone = DateEditCallEditingDone
|
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
Text = ' . . '
|
Text = ' . . '
|
||||||
end
|
end
|
||||||
@ -6952,7 +6951,6 @@ object frmPreferences: TfrmPreferences
|
|||||||
BorderSpacing.Top = 10
|
BorderSpacing.Top = 10
|
||||||
NumGlyphs = 1
|
NumGlyphs = 1
|
||||||
MaxLength = 10
|
MaxLength = 10
|
||||||
OnEditingDone = DateEditLocEditingDone
|
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
Text = ' . . '
|
Text = ' . . '
|
||||||
end
|
end
|
||||||
|
@ -1025,8 +1025,6 @@ type
|
|||||||
procedure cmbSpeedR2Change(Sender : TObject);
|
procedure cmbSpeedR2Change(Sender : TObject);
|
||||||
procedure cmbStopBitsR1Change(Sender : TObject);
|
procedure cmbStopBitsR1Change(Sender : TObject);
|
||||||
procedure cmbStopBitsR2Change(Sender : TObject);
|
procedure cmbStopBitsR2Change(Sender : TObject);
|
||||||
procedure DateEditCallEditingDone(Sender: TObject);
|
|
||||||
procedure DateEditLocEditingDone(Sender: TObject);
|
|
||||||
procedure edtK3NGSerSpeedChange(Sender: TObject);
|
procedure edtK3NGSerSpeedChange(Sender: TObject);
|
||||||
procedure edtLocChange(Sender: TObject);
|
procedure edtLocChange(Sender: TObject);
|
||||||
procedure edtR1RigCtldArgsChange(Sender: TObject);
|
procedure edtR1RigCtldArgsChange(Sender: TObject);
|
||||||
@ -2369,16 +2367,6 @@ begin
|
|||||||
TRXChanged := True
|
TRXChanged := True
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmPreferences.DateEditCallEditingDone(Sender: TObject);
|
|
||||||
begin
|
|
||||||
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmPreferences.DateEditLocEditingDone(Sender: TObject);
|
|
||||||
begin
|
|
||||||
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmPreferences.edtK3NGSerSpeedChange(Sender: TObject);
|
procedure TfrmPreferences.edtK3NGSerSpeedChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
WinKeyerChanged := True
|
WinKeyerChanged := True
|
||||||
|
Loading…
Reference in New Issue
Block a user