LazStats: fine-tuning and chm update of GroupFreqUnit.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8021 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2021-05-10 14:30:27 +00:00
parent 109bbaf9ce
commit 4c6e6ba31a
6 changed files with 39 additions and 24 deletions

Binary file not shown.

View File

@ -1,31 +1,43 @@
inherited GroupFreqForm: TGroupFreqForm inherited GroupFreqForm: TGroupFreqForm
Left = 665
Height = 279 Height = 279
Top = 202
Width = 673 Width = 673
HelpType = htKeyword
HelpKeyword = 'html/GroupFrequencyAnalysis.htm'
Caption = 'Group Frequency Analysis' Caption = 'Group Frequency Analysis'
ClientHeight = 279 ClientHeight = 279
ClientWidth = 673 ClientWidth = 673
inherited ParamsPanel: TPanel inherited ParamsPanel: TPanel
Height = 263 Height = 263
Width = 260
ClientHeight = 263 ClientHeight = 263
ClientWidth = 260
inherited CloseBtn: TButton inherited CloseBtn: TButton
Left = 205
Top = 238 Top = 238
TabOrder = 8 TabOrder = 8
end end
inherited ComputeBtn: TButton inherited ComputeBtn: TButton
Left = 121
Top = 238 Top = 238
TabOrder = 3 TabOrder = 3
end end
inherited ResetBtn: TButton inherited ResetBtn: TButton
Left = 59
Top = 238 Top = 238
TabOrder = 7 TabOrder = 7
end end
inherited HelpBtn: TButton inherited HelpBtn: TButton
Tag = 162 Tag = 162
Left = 0
Top = 238 Top = 238
TabOrder = 6 TabOrder = 6
Visible = False
end end
inherited ButtonBevel: TBevel inherited ButtonBevel: TBevel
Top = 222 Top = 222
Width = 260
end end
object Label1: TLabel[5] object Label1: TLabel[5]
AnchorSideLeft.Control = ParamsPanel AnchorSideLeft.Control = ParamsPanel
@ -46,7 +58,7 @@ inherited GroupFreqForm: TGroupFreqForm
Left = 0 Left = 0
Height = 205 Height = 205
Top = 17 Top = 17
Width = 126 Width = 111
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Top = 2 BorderSpacing.Top = 2
BorderSpacing.Right = 6 BorderSpacing.Right = 6
@ -59,7 +71,7 @@ inherited GroupFreqForm: TGroupFreqForm
AnchorSideLeft.Control = ParamsPanel AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = VarList AnchorSideTop.Control = VarList
Left = 132 Left = 117
Height = 26 Height = 26
Top = 17 Top = 17
Width = 26 Width = 26
@ -74,7 +86,7 @@ inherited GroupFreqForm: TGroupFreqForm
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = GrpInBtn AnchorSideTop.Control = GrpInBtn
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 132 Left = 117
Height = 26 Height = 26
Top = 47 Top = 47
Width = 26 Width = 26
@ -88,7 +100,7 @@ inherited GroupFreqForm: TGroupFreqForm
object Label2: TLabel[9] object Label2: TLabel[9]
AnchorSideLeft.Control = GrpVarEdit AnchorSideLeft.Control = GrpVarEdit
AnchorSideBottom.Control = GrpVarEdit AnchorSideBottom.Control = GrpVarEdit
Left = 164 Left = 149
Height = 15 Height = 15
Top = 21 Top = 21
Width = 77 Width = 77
@ -105,10 +117,10 @@ inherited GroupFreqForm: TGroupFreqForm
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = GrpOutBtn AnchorSideBottom.Control = GrpOutBtn
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 164 Left = 149
Height = 23 Height = 23
Top = 38 Top = 38
Width = 127 Width = 111
Anchors = [akLeft, akRight, akBottom] Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Top = 2 BorderSpacing.Top = 2
@ -121,15 +133,18 @@ inherited GroupFreqForm: TGroupFreqForm
AnchorSideLeft.Control = GrpInBtn AnchorSideLeft.Control = GrpInBtn
AnchorSideTop.Control = GrpOutBtn AnchorSideTop.Control = GrpOutBtn
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 132 AnchorSideRight.Control = ParamsPanel
Height = 79 AnchorSideRight.Side = asrBottom
Left = 117
Height = 81
Top = 97 Top = 97
Width = 147 Width = 143
Anchors = [akTop, akLeft, akRight]
AutoSize = True AutoSize = True
BorderSpacing.Top = 24 BorderSpacing.Top = 24
Caption = 'Plot Options' Caption = 'Plot Options'
ClientHeight = 59 ClientHeight = 61
ClientWidth = 143 ClientWidth = 139
TabOrder = 5 TabOrder = 5
object VertBarsBtn: TSpeedButton object VertBarsBtn: TSpeedButton
AnchorSideLeft.Control = PlotOptionsGroup AnchorSideLeft.Control = PlotOptionsGroup
@ -140,7 +155,7 @@ inherited GroupFreqForm: TGroupFreqForm
Width = 23 Width = 23
BorderSpacing.Left = 12 BorderSpacing.Left = 12
BorderSpacing.Top = 4 BorderSpacing.Top = 4
BorderSpacing.Bottom = 6 BorderSpacing.Bottom = 8
Down = True Down = True
GroupIndex = 1 GroupIndex = 1
Images = MainDataModule.ImageList Images = MainDataModule.ImageList
@ -180,7 +195,7 @@ inherited GroupFreqForm: TGroupFreqForm
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 12 Left = 12
Height = 19 Height = 19
Top = 32 Top = 34
Width = 123 Width = 123
BorderSpacing.Right = 8 BorderSpacing.Right = 8
BorderSpacing.Bottom = 8 BorderSpacing.Bottom = 8
@ -190,6 +205,7 @@ inherited GroupFreqForm: TGroupFreqForm
end end
end end
inherited ParamsSplitter: TSplitter inherited ParamsSplitter: TSplitter
Left = 272
Height = 279 Height = 279
end end
end end

View File

@ -71,15 +71,14 @@ end;
procedure TGroupFreqForm.AdjustConstraints; procedure TGroupFreqForm.AdjustConstraints;
begin begin
ParamsPanel.Constraints.MinWidth := MaxValueI( [ ParamsPanel.Constraints.MinWidth := MaxValueI( [
4*CloseBtn.Width + 3*CloseBtn.BorderSpacing.Left, CountUsedButtons*CloseBtn.Width + (CountUsedButtons-1)*CloseBtn.BorderSpacing.Left,
(PlotOptionsGroup.Width - GrpInBtn.Width div 2 + GrpVarEdit.BorderSpacing.Left)*2, PlotOptionsGroup.Width*2 - GrpInBtn.Width + GrpVaredit.BorderSpacing.Left,
(Max(Label1.Width, Label2.Width) + GrpvarEdit.BorderSpacing.Left) * 2 (Max(Label1.Width, Label2.Width) + GrpVarEdit.BorderSpacing.Left) * 2
]); ]);
ParamsPanel.Constraints.MinHeight := PlotOptionsGroup.Top + PlotOptionsGroup.Height +
ButtonBevel.Height + CloseBtn.BorderSpacing.Top + CloseBtn.Height;
Constraints.MinWidth := ParamsPanel.Constraints.MinWidth + 300; ParamsPanel.Constraints.MinHeight :=
Constraints.MinHeight := ParamsPanel.Constraints.MinHeight + ParamsPanel.BorderSpacing.Top * 2; PlotOptionsGroup.Top + PlotOptionsGroup.Height +
ButtonBevel.Height + CloseBtn.BorderSpacing.Top + CloseBtn.Height;
end; end;
@ -168,7 +167,7 @@ var
YTitle: String; YTitle: String;
i: Integer; i: Integer;
begin begin
// Erase the chart, if it has already been used. // Erase the chart, if it already has been used.
FChartFrame.Clear; FChartFrame.Clear;
FLabelsSource.Clear; FLabelsSource.Clear;

View File

@ -460,7 +460,7 @@ object OS3MainFrm: TOS3MainFrm
OnClick = mnuAnalysisDescr_FreqClick OnClick = mnuAnalysisDescr_FreqClick
end end
object mnuAnalysisDescr_GrpFreq: TMenuItem object mnuAnalysisDescr_GrpFreq: TMenuItem
Caption = 'Plot Group Frequencies' Caption = 'Group Frequency Analysis'
OnClick = mnuAnalysisDescr_GrpFreqClick OnClick = mnuAnalysisDescr_GrpFreqClick
end end
object mnuAnalysisDescr_Separator2: TMenuItem object mnuAnalysisDescr_Separator2: TMenuItem

View File

@ -180,7 +180,7 @@ begin
end; end;
// reimplements MaxValue of unit Math which cannot be compiled on 64 bit due // Reimplements MaxValue of unit Math which cannot be compiled on 64 bit due
// to "Can't determine which overloaded function to call". // to "Can't determine which overloaded function to call".
function MaxValueI(const AData: array of Integer): Integer; function MaxValueI(const AData: array of Integer): Integer;
var var
@ -188,7 +188,7 @@ var
begin begin
Result := -MaxInt; Result := -MaxInt;
for i := 0 to High(AData) do for i := 0 to High(AData) do
if Result > AData[i] then if Result < AData[i] then
Result := AData[i]; Result := AData[i];
end; end;