You've already forked lazarus-ccr
LazStats: Inherit DescriptiveUnit from TBasicStatsReportForm. Fix related issues. Fix compilation with FPC trunk.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7729 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1519,12 +1519,12 @@
|
|||||||
<UnitName Value="GroupFreqUnit"/>
|
<UnitName Value="GroupFreqUnit"/>
|
||||||
</Unit177>
|
</Unit177>
|
||||||
<Unit178>
|
<Unit178>
|
||||||
<Filename Value="forms\misc\basicstatsreportfromunit.pas"/>
|
<Filename Value="forms\misc\basicstatsreportformunit.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<ComponentName Value="BasicStatsReportForm"/>
|
<ComponentName Value="BasicStatsReportForm"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="BasicStatsReportFromUnit"/>
|
<UnitName Value="BasicStatsReportFormUnit"/>
|
||||||
</Unit178>
|
</Unit178>
|
||||||
<Unit179>
|
<Unit179>
|
||||||
<Filename Value="forms\misc\basicstatsreportandchartformunit.pas"/>
|
<Filename Value="forms\misc\basicstatsreportandchartformunit.pas"/>
|
||||||
|
@ -8,8 +8,7 @@ uses
|
|||||||
{$ENDIF}{$ENDIF}
|
{$ENDIF}{$ENDIF}
|
||||||
Interfaces, // this includes the LCL widgetset
|
Interfaces, // this includes the LCL widgetset
|
||||||
Forms, tachartlazaruspkg, tachartprint, lhelpcontrolpkg, Globals, LicenseUnit,
|
Forms, tachartlazaruspkg, tachartprint, lhelpcontrolpkg, Globals, LicenseUnit,
|
||||||
OptionsUnit, MainDM, MainUnit, BasicStatsReportFromUnit,
|
OptionsUnit, MainDM, MainUnit;
|
||||||
BasicStatsReportAndChartFormUnit;
|
|
||||||
|
|
||||||
{$R LazStats.res}
|
{$R LazStats.res}
|
||||||
|
|
||||||
@ -29,8 +28,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
Application.CreateForm(TMainDataModule, MainDataModule);
|
Application.CreateForm(TMainDataModule, MainDataModule);
|
||||||
Application.CreateForm(TOS3MainFrm, OS3MainFrm);
|
Application.CreateForm(TOS3MainFrm, OS3MainFrm);
|
||||||
Application.CreateForm(TBasicStatsReportAndChartForm,
|
|
||||||
BasicStatsReportAndChartForm);
|
|
||||||
Application.Run;
|
Application.Run;
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
object DescriptiveFrm: TDescriptiveFrm
|
inherited DescriptiveFrm: TDescriptiveFrm
|
||||||
Left = 526
|
Left = 526
|
||||||
Height = 384
|
Height = 384
|
||||||
Top = 202
|
Top = 202
|
||||||
@ -8,32 +8,33 @@ object DescriptiveFrm: TDescriptiveFrm
|
|||||||
Caption = 'Descriptive Statistics'
|
Caption = 'Descriptive Statistics'
|
||||||
ClientHeight = 384
|
ClientHeight = 384
|
||||||
ClientWidth = 900
|
ClientWidth = 900
|
||||||
OnActivate = FormActivate
|
inherited ParamsPanel: TPanel
|
||||||
OnCreate = FormCreate
|
Left = 16
|
||||||
Position = poMainFormCenter
|
Height = 352
|
||||||
LCLVersion = '2.1.0.0'
|
Top = 16
|
||||||
object ReportPanel: TPanel
|
|
||||||
Left = 343
|
|
||||||
Height = 384
|
|
||||||
Top = 0
|
|
||||||
Width = 557
|
|
||||||
Align = alClient
|
|
||||||
Anchors = [akTop, akLeft, akRight]
|
|
||||||
BevelOuter = bvNone
|
|
||||||
TabOrder = 0
|
|
||||||
end
|
|
||||||
object ParamsPanel: TPanel
|
|
||||||
Left = 8
|
|
||||||
Height = 368
|
|
||||||
Top = 8
|
|
||||||
Width = 322
|
Width = 322
|
||||||
Align = alLeft
|
|
||||||
BorderSpacing.Around = 8
|
BorderSpacing.Around = 8
|
||||||
BevelOuter = bvNone
|
ClientHeight = 352
|
||||||
ClientHeight = 368
|
|
||||||
ClientWidth = 322
|
ClientWidth = 322
|
||||||
TabOrder = 1
|
inherited CloseBtn: TButton
|
||||||
object Label2: TLabel
|
TabOrder = 9
|
||||||
|
end
|
||||||
|
inherited ComputeBtn: TButton
|
||||||
|
AnchorSideBottom.Control = ParamsPanel
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
|
TabOrder = 10
|
||||||
|
end
|
||||||
|
inherited ResetBtn: TButton
|
||||||
|
TabOrder = 8
|
||||||
|
end
|
||||||
|
inherited HelpBtn: TButton
|
||||||
|
TabOrder = 7
|
||||||
|
end
|
||||||
|
inherited ButtonBevel: TBevel
|
||||||
|
Top = 311
|
||||||
|
Width = 322
|
||||||
|
end
|
||||||
|
object Label2: TLabel[5]
|
||||||
AnchorSideLeft.Control = ParamsPanel
|
AnchorSideLeft.Control = ParamsPanel
|
||||||
AnchorSideTop.Control = ParamsPanel
|
AnchorSideTop.Control = ParamsPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
@ -43,14 +44,14 @@ object DescriptiveFrm: TDescriptiveFrm
|
|||||||
Caption = 'Variables'
|
Caption = 'Variables'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object VarList: TListBox
|
object VarList: TListBox[6]
|
||||||
AnchorSideLeft.Control = ParamsPanel
|
AnchorSideLeft.Control = ParamsPanel
|
||||||
AnchorSideTop.Control = Label2
|
AnchorSideTop.Control = Label2
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = AllBtn
|
AnchorSideRight.Control = AllBtn
|
||||||
AnchorSideBottom.Control = OptionsGroup
|
AnchorSideBottom.Control = OptionsGroup
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 199
|
Height = 183
|
||||||
Top = 17
|
Top = 17
|
||||||
Width = 130
|
Width = 130
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
@ -63,7 +64,7 @@ object DescriptiveFrm: TDescriptiveFrm
|
|||||||
OnSelectionChange = VarListSelectionChange
|
OnSelectionChange = VarListSelectionChange
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object Label3: TLabel
|
object Label3: TLabel[7]
|
||||||
AnchorSideLeft.Control = SelList
|
AnchorSideLeft.Control = SelList
|
||||||
AnchorSideTop.Control = ParamsPanel
|
AnchorSideTop.Control = ParamsPanel
|
||||||
Left = 192
|
Left = 192
|
||||||
@ -73,7 +74,7 @@ object DescriptiveFrm: TDescriptiveFrm
|
|||||||
Caption = 'Selected'
|
Caption = 'Selected'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object SelList: TListBox
|
object SelList: TListBox[8]
|
||||||
AnchorSideLeft.Control = AllBtn
|
AnchorSideLeft.Control = AllBtn
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = Label3
|
AnchorSideTop.Control = Label3
|
||||||
@ -83,7 +84,7 @@ object DescriptiveFrm: TDescriptiveFrm
|
|||||||
AnchorSideBottom.Control = VarList
|
AnchorSideBottom.Control = VarList
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 192
|
Left = 192
|
||||||
Height = 199
|
Height = 183
|
||||||
Top = 17
|
Top = 17
|
||||||
Width = 130
|
Width = 130
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
@ -94,7 +95,7 @@ object DescriptiveFrm: TDescriptiveFrm
|
|||||||
OnSelectionChange = VarListSelectionChange
|
OnSelectionChange = VarListSelectionChange
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
object InBtn: TBitBtn
|
object InBtn: TBitBtn[9]
|
||||||
AnchorSideLeft.Control = ParamsPanel
|
AnchorSideLeft.Control = ParamsPanel
|
||||||
AnchorSideLeft.Side = asrCenter
|
AnchorSideLeft.Side = asrCenter
|
||||||
AnchorSideTop.Control = VarList
|
AnchorSideTop.Control = VarList
|
||||||
@ -109,7 +110,7 @@ object DescriptiveFrm: TDescriptiveFrm
|
|||||||
Spacing = 0
|
Spacing = 0
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object OutBtn: TBitBtn
|
object OutBtn: TBitBtn[10]
|
||||||
AnchorSideLeft.Control = ParamsPanel
|
AnchorSideLeft.Control = ParamsPanel
|
||||||
AnchorSideLeft.Side = asrCenter
|
AnchorSideLeft.Side = asrCenter
|
||||||
AnchorSideTop.Control = InBtn
|
AnchorSideTop.Control = InBtn
|
||||||
@ -126,7 +127,7 @@ object DescriptiveFrm: TDescriptiveFrm
|
|||||||
Spacing = 0
|
Spacing = 0
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object AllBtn: TBitBtn
|
object AllBtn: TBitBtn[11]
|
||||||
AnchorSideLeft.Control = ParamsPanel
|
AnchorSideLeft.Control = ParamsPanel
|
||||||
AnchorSideLeft.Side = asrCenter
|
AnchorSideLeft.Side = asrCenter
|
||||||
AnchorSideTop.Control = OutBtn
|
AnchorSideTop.Control = OutBtn
|
||||||
@ -141,60 +142,26 @@ object DescriptiveFrm: TDescriptiveFrm
|
|||||||
OnClick = AllBtnClick
|
OnClick = AllBtnClick
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
object CloseBtn: TButton
|
object Label1: TLabel[12]
|
||||||
AnchorSideRight.Control = ParamsPanel
|
|
||||||
AnchorSideRight.Side = asrBottom
|
|
||||||
AnchorSideBottom.Control = ParamsPanel
|
|
||||||
AnchorSideBottom.Side = asrBottom
|
|
||||||
Left = 267
|
|
||||||
Height = 25
|
|
||||||
Top = 343
|
|
||||||
Width = 55
|
|
||||||
Anchors = [akRight, akBottom]
|
|
||||||
AutoSize = True
|
|
||||||
BorderSpacing.Top = 8
|
|
||||||
Caption = 'Close'
|
|
||||||
ModalResult = 11
|
|
||||||
OnClick = CloseBtnClick
|
|
||||||
TabOrder = 9
|
|
||||||
end
|
|
||||||
object HelpBtn: TButton
|
|
||||||
Tag = 119
|
|
||||||
AnchorSideRight.Control = ResetBtn
|
|
||||||
AnchorSideBottom.Control = ParamsPanel
|
|
||||||
AnchorSideBottom.Side = asrBottom
|
|
||||||
Left = 62
|
|
||||||
Height = 25
|
|
||||||
Top = 343
|
|
||||||
Width = 51
|
|
||||||
Anchors = [akRight, akBottom]
|
|
||||||
AutoSize = True
|
|
||||||
BorderSpacing.Top = 8
|
|
||||||
BorderSpacing.Right = 8
|
|
||||||
Caption = 'Help'
|
|
||||||
OnClick = HelpBtnClick
|
|
||||||
TabOrder = 7
|
|
||||||
end
|
|
||||||
object Label1: TLabel
|
|
||||||
AnchorSideLeft.Control = OptionsGroup
|
AnchorSideLeft.Control = OptionsGroup
|
||||||
AnchorSideTop.Control = CIEdit
|
AnchorSideTop.Control = CIEdit
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
AnchorSideRight.Control = CIEdit
|
AnchorSideRight.Control = CIEdit
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 308
|
Top = 292
|
||||||
Width = 174
|
Width = 174
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
Caption = 'Confidence Interval for the Mean'
|
Caption = 'Confidence Interval for the Mean'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object OptionsGroup: TGroupBox
|
object OptionsGroup: TGroupBox[13]
|
||||||
AnchorSideLeft.Control = ParamsPanel
|
AnchorSideLeft.Control = ParamsPanel
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = CIEdit
|
AnchorSideBottom.Control = CIEdit
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 72
|
Height = 72
|
||||||
Top = 224
|
Top = 208
|
||||||
Width = 306
|
Width = 306
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
@ -253,42 +220,13 @@ object DescriptiveFrm: TDescriptiveFrm
|
|||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object Bevel1: TBevel
|
object CIEdit: TEdit[14]
|
||||||
AnchorSideLeft.Control = ParamsPanel
|
|
||||||
AnchorSideRight.Control = ParamsPanel
|
|
||||||
AnchorSideRight.Side = asrBottom
|
|
||||||
AnchorSideBottom.Control = CloseBtn
|
|
||||||
Left = 0
|
|
||||||
Height = 8
|
|
||||||
Top = 327
|
|
||||||
Width = 322
|
|
||||||
Anchors = [akLeft, akRight, akBottom]
|
|
||||||
Shape = bsBottomLine
|
|
||||||
end
|
|
||||||
object ComputeBtn: TButton
|
|
||||||
AnchorSideRight.Control = CloseBtn
|
|
||||||
AnchorSideBottom.Control = ParamsPanel
|
|
||||||
AnchorSideBottom.Side = asrBottom
|
|
||||||
Left = 183
|
|
||||||
Height = 25
|
|
||||||
Top = 343
|
|
||||||
Width = 76
|
|
||||||
Anchors = [akRight, akBottom]
|
|
||||||
AutoSize = True
|
|
||||||
BorderSpacing.Top = 8
|
|
||||||
BorderSpacing.Right = 8
|
|
||||||
Caption = 'Compute'
|
|
||||||
OnClick = ComputeBtnClick
|
|
||||||
TabOrder = 10
|
|
||||||
end
|
|
||||||
object CIEdit: TEdit
|
|
||||||
AnchorSideLeft.Control = Label1
|
AnchorSideLeft.Control = Label1
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = Bevel1
|
|
||||||
Left = 182
|
Left = 182
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 304
|
Top = 288
|
||||||
Width = 41
|
Width = 41
|
||||||
Alignment = taRightJustify
|
Alignment = taRightJustify
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
@ -296,29 +234,19 @@ object DescriptiveFrm: TDescriptiveFrm
|
|||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
Text = '95.0'
|
Text = '95.0'
|
||||||
end
|
end
|
||||||
object ResetBtn: TButton
|
|
||||||
AnchorSideRight.Control = ComputeBtn
|
|
||||||
AnchorSideBottom.Control = ParamsPanel
|
|
||||||
AnchorSideBottom.Side = asrBottom
|
|
||||||
Left = 121
|
|
||||||
Height = 25
|
|
||||||
Top = 343
|
|
||||||
Width = 54
|
|
||||||
Anchors = [akRight, akBottom]
|
|
||||||
AutoSize = True
|
|
||||||
BorderSpacing.Left = 8
|
|
||||||
BorderSpacing.Top = 8
|
|
||||||
BorderSpacing.Right = 8
|
|
||||||
Caption = 'Reset'
|
|
||||||
OnClick = ResetBtnClick
|
|
||||||
TabOrder = 8
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
object Splitter1: TSplitter
|
inherited ParamsSplitter: TSplitter
|
||||||
Left = 338
|
Left = 350
|
||||||
|
Height = 384
|
||||||
|
end
|
||||||
|
object ReportPanel: TPanel[2]
|
||||||
|
Left = 355
|
||||||
Height = 384
|
Height = 384
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 5
|
Width = 545
|
||||||
ResizeStyle = rsPattern
|
Align = alClient
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BevelOuter = bvNone
|
||||||
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -7,60 +7,48 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
|
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
|
||||||
StdCtrls, ExtCtrls, Buttons,
|
StdCtrls, ExtCtrls, Buttons,
|
||||||
MainUnit, Globals, FunctionsLib, BasicStatsFormUnit,
|
MainUnit, Globals, FunctionsLib, BasicStatsReportFormUnit,
|
||||||
ReportFrameUnit, DataProcs, DictionaryUnit, ContextHelpUnit;
|
DataProcs, DictionaryUnit;
|
||||||
|
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
{ TDescriptiveFrm }
|
{ TDescriptiveFrm }
|
||||||
|
|
||||||
TDescriptiveFrm = class(TBasicStatsForm)
|
TDescriptiveFrm = class(TBasicStatsReportForm)
|
||||||
Bevel1: TBevel;
|
|
||||||
ComputeBtn: TButton;
|
|
||||||
CaseChk: TCheckBox;
|
CaseChk: TCheckBox;
|
||||||
ZScoresToGridChk: TCheckBox;
|
ZScoresToGridChk: TCheckBox;
|
||||||
AllQrtilesChk: TCheckBox;
|
AllQrtilesChk: TCheckBox;
|
||||||
HelpBtn: TButton;
|
|
||||||
Label2: TLabel;
|
Label2: TLabel;
|
||||||
Label3: TLabel;
|
Label3: TLabel;
|
||||||
ReportPanel: TPanel;
|
ReportPanel: TPanel;
|
||||||
ParamsPanel: TPanel;
|
|
||||||
PcntileChk: TCheckBox;
|
PcntileChk: TCheckBox;
|
||||||
OptionsGroup: TGroupBox;
|
OptionsGroup: TGroupBox;
|
||||||
InBtn: TBitBtn;
|
InBtn: TBitBtn;
|
||||||
OutBtn: TBitBtn;
|
OutBtn: TBitBtn;
|
||||||
AllBtn: TBitBtn;
|
AllBtn: TBitBtn;
|
||||||
ResetBtn: TButton;
|
|
||||||
CloseBtn: TButton;
|
|
||||||
CIEdit: TEdit;
|
CIEdit: TEdit;
|
||||||
Label1: TLabel;
|
Label1: TLabel;
|
||||||
Splitter1: TSplitter;
|
|
||||||
VarList: TListBox;
|
VarList: TListBox;
|
||||||
SelList: TListBox;
|
SelList: TListBox;
|
||||||
procedure AllBtnClick(Sender: TObject);
|
procedure AllBtnClick(Sender: TObject);
|
||||||
procedure CloseBtnClick(Sender: TObject);
|
|
||||||
procedure ComputeBtnClick(Sender: TObject);
|
|
||||||
procedure FormActivate(Sender: TObject);
|
|
||||||
procedure FormCreate(Sender: TObject);
|
|
||||||
procedure HelpBtnClick(Sender: TObject);
|
|
||||||
procedure InBtnClick(Sender: TObject);
|
procedure InBtnClick(Sender: TObject);
|
||||||
procedure OutBtnClick(Sender: TObject);
|
procedure OutBtnClick(Sender: TObject);
|
||||||
procedure ResetBtnClick(Sender: TObject);
|
|
||||||
procedure SelListDblClick(Sender: TObject);
|
procedure SelListDblClick(Sender: TObject);
|
||||||
procedure VarListDblClick(Sender: TObject);
|
procedure VarListDblClick(Sender: TObject);
|
||||||
procedure VarListSelectionChange(Sender: TObject; User: boolean);
|
procedure VarListSelectionChange(Sender: TObject; {%H-}User: boolean);
|
||||||
|
|
||||||
private
|
private
|
||||||
{ private declarations }
|
{ private declarations }
|
||||||
FReportFrame: TReportFrame;
|
|
||||||
FAutoSized: Boolean;
|
|
||||||
sum, variance, stddev, value, mean, min, max, range, skew, prob, df, CI : double;
|
sum, variance, stddev, value, mean, min, max, range, skew, prob, df, CI : double;
|
||||||
kurtosis, z, semean, seskew, sekurtosis, deviation, devsqr, M2, M3, M4 : double;
|
kurtosis, z, semean, seskew, sekurtosis, deviation, devsqr, M2, M3, M4 : double;
|
||||||
procedure UpdateBtnStates;
|
|
||||||
|
protected
|
||||||
|
procedure AdjustConstraints; override;
|
||||||
|
procedure Compute; override;
|
||||||
|
procedure UpdateBtnStates; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
{ public declarations }
|
|
||||||
procedure Reset; override;
|
procedure Reset; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -77,6 +65,18 @@ uses
|
|||||||
|
|
||||||
{ TDescriptiveFrm }
|
{ TDescriptiveFrm }
|
||||||
|
|
||||||
|
procedure TDescriptiveFrm.AdjustConstraints;
|
||||||
|
begin
|
||||||
|
ParamsPanel.Constraints.MinHeight := AllBtn.Top + AllBtn.Height + OptionsGroup.Height +
|
||||||
|
CIEdit.Height + ButtonBevel.Height + CloseBtn.Height + VarList.BorderSpacing.Bottom +
|
||||||
|
OptionsGroup.BorderSpacing.Bottom + CloseBtn.BorderSpacing.Top;
|
||||||
|
ParamsPanel.Constraints.MinWidth := Math.Max(
|
||||||
|
4*CloseBtn.Width + 3*HelpBtn.BorderSpacing.Right,
|
||||||
|
OptionsGroup.Width
|
||||||
|
);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TDescriptiveFrm.AllBtnClick(Sender: TObject);
|
procedure TDescriptiveFrm.AllBtnClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
i : integer;
|
i : integer;
|
||||||
@ -88,61 +88,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TDescriptiveFrm.CloseBtnClick(Sender: TObject);
|
procedure TDescriptiveFrm.Compute;
|
||||||
begin
|
|
||||||
Close;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TDescriptiveFrm.FormActivate(Sender: TObject);
|
|
||||||
var
|
|
||||||
w: Integer;
|
|
||||||
begin
|
|
||||||
if FAutoSized then
|
|
||||||
exit;
|
|
||||||
|
|
||||||
ParamsPanel.AutoSize := true;
|
|
||||||
w := MaxValue([HelpBtn.Width, ResetBtn.Width, ComputeBtn.Width, CloseBtn.Width]);
|
|
||||||
HelpBtn.Constraints.MinWidth := w;
|
|
||||||
ResetBtn.Constraints.MinWidth := w;
|
|
||||||
ComputeBtn.Constraints.MinWidth := w;
|
|
||||||
CloseBtn.Constraints.MinWidth := w;
|
|
||||||
ParamsPanel.Constraints.MinHeight := AllBtn.Top + AllBtn.Height + OptionsGroup.Height +
|
|
||||||
CIEdit.Height + Bevel1.Height + CloseBtn.Height + VarList.BorderSpacing.Bottom +
|
|
||||||
OptionsGroup.BorderSpacing.Bottom + CloseBtn.BorderSpacing.Top;
|
|
||||||
ParamsPanel.Constraints.MinWidth := Math.Max(
|
|
||||||
4*w + 3*HelpBtn.BorderSpacing.Right,
|
|
||||||
OptionsGroup.Width
|
|
||||||
);
|
|
||||||
ParamsPanel.AutoSize := false;
|
|
||||||
|
|
||||||
Constraints.MinHeight := ParamsPanel.Constraints.MinHeight + ParamsPanel.BorderSpacing.Around*2;
|
|
||||||
Constraints.MinWidth := ParamsPanel.Constraints.MinWidth + ParamsPanel.BorderSpacing.Around*2;
|
|
||||||
|
|
||||||
Position := poDesigned;
|
|
||||||
FAutoSized := true;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TDescriptiveFrm.FormCreate(Sender: TObject);
|
|
||||||
begin
|
|
||||||
Assert(OS3MainFrm <> nil);
|
|
||||||
if DictionaryFrm = nil then Application.CreateForm(TDictionaryFrm, DictionaryFrm);
|
|
||||||
|
|
||||||
Width := Scale96ToFont(DEFAULT_WIDTH);
|
|
||||||
Height := Scale96ToFont(DEFAULT_HEIGHT);
|
|
||||||
|
|
||||||
FReportFrame := TReportFrame.Create(self);
|
|
||||||
FReportFrame.Parent := ReportPanel;
|
|
||||||
FReportFrame.Align := alClient;
|
|
||||||
FReportFrame.ReportToolBar.Align := alRight;
|
|
||||||
FReportFrame.ReportToolbar.EdgeBorders := [];
|
|
||||||
|
|
||||||
Reset;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TDescriptiveFrm.ComputeBtnClick(Sender: TObject);
|
|
||||||
var
|
var
|
||||||
i, j, k, m: integer;
|
i, j, k, m: integer;
|
||||||
nCases, noSelected: integer;
|
nCases, noSelected: integer;
|
||||||
@ -417,14 +363,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TDescriptiveFrm.HelpBtnClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if ContextHelpForm = nil then
|
|
||||||
Application.CreateForm(TContextHelpForm, ContextHelpForm);
|
|
||||||
ContextHelpForm.HelpMessage((Sender as TButton).tag);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TDescriptiveFrm.InBtnClick(Sender: TObject);
|
procedure TDescriptiveFrm.InBtnClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
@ -462,23 +400,18 @@ begin
|
|||||||
UpdateBtnStates;
|
UpdateBtnStates;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TDescriptiveFrm.Reset;
|
procedure TDescriptiveFrm.Reset;
|
||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
begin
|
begin
|
||||||
|
inherited;
|
||||||
CIEdit.Text := FormatFloat('0.0', DEFAULT_CONFIDENCE_LEVEL_PERCENT);
|
CIEdit.Text := FormatFloat('0.0', DEFAULT_CONFIDENCE_LEVEL_PERCENT);
|
||||||
VarList.Clear;
|
VarList.Clear;
|
||||||
SelList.Clear;
|
SelList.Clear;
|
||||||
for i := 1 to NoVariables do
|
for i := 1 to NoVariables do
|
||||||
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
|
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
|
||||||
UpdateBtnStates;
|
UpdateBtnStates;
|
||||||
FReportFrame.Clear;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TDescriptiveFrm.ResetBtnClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
Reset;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -515,6 +448,8 @@ var
|
|||||||
lSelected: Boolean;
|
lSelected: Boolean;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
|
inherited;
|
||||||
|
|
||||||
lSelected := false;
|
lSelected := false;
|
||||||
for i := 0 to VarList.Items.Count-1 do
|
for i := 0 to VarList.Items.Count-1 do
|
||||||
if VarList.Selected[i] then
|
if VarList.Selected[i] then
|
||||||
|
@ -101,7 +101,7 @@ var
|
|||||||
grps: StrDyneVec = nil;
|
grps: StrDyneVec = nil;
|
||||||
means: array[0..1] of Double = (0.0, 0.0);
|
means: array[0..1] of Double = (0.0, 0.0);
|
||||||
stdDevs: array[0..1] of Double = (0.0, 0.0);
|
stdDevs: array[0..1] of Double = (0.0, 0.0);
|
||||||
selected: array[0..2] of Integer = (0, 0, 0);
|
selected: array of Integer = nil;
|
||||||
begin
|
begin
|
||||||
// Get selected variables
|
// Get selected variables
|
||||||
xCol := 0;
|
xCol := 0;
|
||||||
@ -120,6 +120,7 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
SetLength(selected, 3);
|
||||||
selected[0] := xCol;
|
selected[0] := xCol;
|
||||||
selected[1] := yCol;
|
selected[1] := yCol;
|
||||||
selected[2] := grpCol;
|
selected[2] := grpCol;
|
||||||
|
@ -11,8 +11,7 @@ inherited NormalityFrm: TNormalityFrm
|
|||||||
OnActivate = FormActivate
|
OnActivate = FormActivate
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
Position = poMainFormCenter
|
Position = poMainFormCenter
|
||||||
LCLVersion = '2.1.0.0'
|
object ParamsPanel: TPanel[0]
|
||||||
object ParamsPanel: TPanel
|
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 500
|
Height = 500
|
||||||
Top = 8
|
Top = 8
|
||||||
@ -192,14 +191,14 @@ inherited NormalityFrm: TNormalityFrm
|
|||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object ParamsSplitter: TSplitter
|
object ParamsSplitter: TSplitter[1]
|
||||||
Left = 332
|
Left = 332
|
||||||
Height = 516
|
Height = 516
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 5
|
Width = 5
|
||||||
ResizeStyle = rsPattern
|
ResizeStyle = rsPattern
|
||||||
end
|
end
|
||||||
object PageControl: TPageControl
|
object PageControl: TPageControl[2]
|
||||||
Left = 341
|
Left = 341
|
||||||
Height = 500
|
Height = 500
|
||||||
Top = 8
|
Top = 8
|
||||||
|
@ -125,7 +125,7 @@ var
|
|||||||
DP: DblDyneVec = nil;
|
DP: DblDyneVec = nil;
|
||||||
mean, variance, stddev: Double;
|
mean, variance, stddev: Double;
|
||||||
deviation, devSqr: Double;
|
deviation, devSqr: Double;
|
||||||
M2, M3, M4, F1, DPP, t2: Double;
|
M2, M3, M4, DPP, t2: Double;
|
||||||
A0, C1, D025, D05, D10, D15: Double;
|
A0, C1, D025, D05, D10, D15: Double;
|
||||||
begin
|
begin
|
||||||
// Count of data values
|
// Count of data values
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
object PlotXYFrm: TPlotXYFrm
|
inherited PlotXYFrm: TPlotXYFrm
|
||||||
Left = 427
|
Left = 427
|
||||||
Height = 500
|
Height = 500
|
||||||
Top = 175
|
Top = 175
|
||||||
@ -11,8 +11,7 @@ object PlotXYFrm: TPlotXYFrm
|
|||||||
OnActivate = FormActivate
|
OnActivate = FormActivate
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
Position = poMainFormCenter
|
Position = poMainFormCenter
|
||||||
LCLVersion = '2.1.0.0'
|
object ParamsPanel: TPanel[0]
|
||||||
object ParamsPanel: TPanel
|
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 484
|
Height = 484
|
||||||
Top = 8
|
Top = 8
|
||||||
@ -324,14 +323,14 @@ object PlotXYFrm: TPlotXYFrm
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object ParamsSplitter: TSplitter
|
object ParamsSplitter: TSplitter[1]
|
||||||
Left = 392
|
Left = 392
|
||||||
Height = 500
|
Height = 500
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 5
|
Width = 5
|
||||||
ResizeStyle = rsPattern
|
ResizeStyle = rsPattern
|
||||||
end
|
end
|
||||||
object PageControl1: TPageControl
|
object PageControl1: TPageControl[2]
|
||||||
Left = 405
|
Left = 405
|
||||||
Height = 484
|
Height = 484
|
||||||
Top = 8
|
Top = 8
|
||||||
|
@ -414,7 +414,7 @@ end;
|
|||||||
procedure TPlotXYFrm.PlotXY(XPoints, YPoints, UpConf, LowConf: DblDyneVec;
|
procedure TPlotXYFrm.PlotXY(XPoints, YPoints, UpConf, LowConf: DblDyneVec;
|
||||||
XMean, YMean, R, Slope, Intercept: Double);
|
XMean, YMean, R, Slope, Intercept: Double);
|
||||||
var
|
var
|
||||||
tmpX, tmpY: array[0..1] of Double;
|
tmpX, tmpY: array of Double;
|
||||||
xmin, xmax, ymin, ymax: Double;
|
xmin, xmax, ymin, ymax: Double;
|
||||||
rightLabels: TListChartSource;
|
rightLabels: TListChartSource;
|
||||||
topLabels: TListChartSource;
|
topLabels: TListChartSource;
|
||||||
@ -467,8 +467,9 @@ begin
|
|||||||
// Draw regression line
|
// Draw regression line
|
||||||
if LineChk.Checked then
|
if LineChk.Checked then
|
||||||
begin
|
begin
|
||||||
tmpX[0] := xmin; tmpY[0] := tmpX[0] * slope + intercept;
|
SetLength(tmpX, 2); SetLength(tmpY, 2);
|
||||||
tmpX[1] := xmax; tmpY[1] := tmpX[1] * slope + intercept;
|
tmpX[0] := xmin; tmpY[0] := tmpX[0] * slope + intercept;
|
||||||
|
tmpX[1] := xmax; tmpY[1] := tmpX[1] * slope + intercept;
|
||||||
ser := FChartFrame.PlotXY(ptLines, tmpX, tmpY, nil, nil, 'Predicted', clBlack);
|
ser := FChartFrame.PlotXY(ptLines, tmpX, tmpY, nil, nil, 'Predicted', clBlack);
|
||||||
rightLabels.Add(tmpY[1], tmpY[1], 'Predicted');
|
rightLabels.Add(tmpY[1], tmpY[1], 'Predicted');
|
||||||
end;
|
end;
|
||||||
|
@ -204,6 +204,8 @@ var
|
|||||||
grp: String;
|
grp: String;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
|
Result := nil;
|
||||||
|
|
||||||
SetLength(ColNoSelected, 2);
|
SetLength(ColNoSelected, 2);
|
||||||
ColNoSelected[0] := GrpVar;
|
ColNoSelected[0] := GrpVar;
|
||||||
ColNoSelected[1] := MeasVar;
|
ColNoSelected[1] := MeasVar;
|
||||||
@ -401,8 +403,6 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
function TBasicSPCForm.Validate(out AMsg: String; out AControl: TWinControl): Boolean;
|
function TBasicSPCForm.Validate(out AMsg: String; out AControl: TWinControl): Boolean;
|
||||||
var
|
|
||||||
x: Double;
|
|
||||||
begin
|
begin
|
||||||
Result := false;
|
Result := false;
|
||||||
if GroupEdit.Visible and (GroupEdit.Text = '') then begin
|
if GroupEdit.Visible and (GroupEdit.Text = '') then begin
|
||||||
|
@ -105,7 +105,7 @@ end;
|
|||||||
|
|
||||||
procedure TXBarChartForm.Compute;
|
procedure TXBarChartForm.Compute;
|
||||||
var
|
var
|
||||||
i, j: Integer;
|
i: Integer;
|
||||||
upperSpec: Double = NaN;
|
upperSpec: Double = NaN;
|
||||||
lowerSpec: Double = NaN;
|
lowerSpec: Double = NaN;
|
||||||
targetSpec: Double = NaN;
|
targetSpec: Double = NaN;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
object BasicStatsForm: TBasicStatsForm
|
object BasicStatsForm: TBasicStatsForm
|
||||||
Left = 519
|
Left = 519
|
||||||
Height = 459
|
Height = 452
|
||||||
Top = 260
|
Top = 260
|
||||||
Width = 717
|
Width = 715
|
||||||
Caption = 'BasicStatsForm'
|
Caption = 'BasicStatsForm'
|
||||||
LCLVersion = '2.1.0.0'
|
LCLVersion = '2.1.0.0'
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
inherited BasicStatsParamsForm: TBasicStatsParamsForm
|
inherited BasicStatsParamsForm: TBasicStatsParamsForm
|
||||||
|
Width = 709
|
||||||
Caption = 'BasicStatsParamsForm'
|
Caption = 'BasicStatsParamsForm'
|
||||||
|
ClientWidth = 709
|
||||||
Position = poMainFormCenter
|
Position = poMainFormCenter
|
||||||
object ParamsPanel: TPanel[0]
|
object ParamsPanel: TPanel[0]
|
||||||
Left = 8
|
Left = 8
|
||||||
|
@ -31,7 +31,7 @@ type
|
|||||||
procedure Activate; override;
|
procedure Activate; override;
|
||||||
procedure AdjustConstraints; virtual;
|
procedure AdjustConstraints; virtual;
|
||||||
procedure Compute; virtual;
|
procedure Compute; virtual;
|
||||||
procedure InitForm;
|
procedure InitForm; virtual;
|
||||||
procedure UpdateBtnStates; virtual;
|
procedure UpdateBtnStates; virtual;
|
||||||
function Validate(out AMsg: String; out AControl: TWinControl): Boolean; virtual;
|
function Validate(out AMsg: String; out AControl: TWinControl): Boolean; virtual;
|
||||||
|
|
||||||
|
@ -1,9 +1,36 @@
|
|||||||
inherited BasicStatsReportAndChartForm: TBasicStatsReportAndChartForm
|
inherited BasicStatsReportAndChartForm: TBasicStatsReportAndChartForm
|
||||||
|
Height = 450
|
||||||
|
Width = 716
|
||||||
|
Caption = 'BasicStatsReportAndChartForm'
|
||||||
|
ClientHeight = 450
|
||||||
|
ClientWidth = 716
|
||||||
|
inherited ParamsPanel: TPanel
|
||||||
|
Height = 434
|
||||||
|
ClientHeight = 434
|
||||||
|
inherited CloseBtn: TButton
|
||||||
|
Top = 409
|
||||||
|
end
|
||||||
|
inherited ComputeBtn: TButton
|
||||||
|
Top = 409
|
||||||
|
end
|
||||||
|
inherited ResetBtn: TButton
|
||||||
|
Top = 409
|
||||||
|
end
|
||||||
|
inherited HelpBtn: TButton
|
||||||
|
Top = 409
|
||||||
|
end
|
||||||
|
inherited ButtonBevel: TBevel
|
||||||
|
Top = 393
|
||||||
|
end
|
||||||
|
end
|
||||||
|
inherited ParamsSplitter: TSplitter
|
||||||
|
Height = 450
|
||||||
|
end
|
||||||
object PageControl: TPageControl[2]
|
object PageControl: TPageControl[2]
|
||||||
Left = 312
|
Left = 312
|
||||||
Height = 443
|
Height = 434
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 397
|
Width = 396
|
||||||
ActivePage = ReportPage
|
ActivePage = ReportPage
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.Left = 4
|
BorderSpacing.Left = 4
|
||||||
|
@ -54,6 +54,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TBasicStatsReportAndChartForm.InitForm;
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
PageControl.ActivePageIndex := 0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TBasicStatsReportAndChartForm.Reset;
|
procedure TBasicStatsReportAndChartForm.Reset;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
@ -1,4 +1,29 @@
|
|||||||
inherited BasicStatsReportForm: TBasicStatsReportForm
|
inherited BasicStatsReportForm: TBasicStatsReportForm
|
||||||
|
Height = 449
|
||||||
|
Width = 711
|
||||||
Caption = 'BasicStatsReportForm'
|
Caption = 'BasicStatsReportForm'
|
||||||
OnCreate = FormCreate
|
ClientHeight = 449
|
||||||
|
ClientWidth = 711
|
||||||
|
inherited ParamsPanel: TPanel
|
||||||
|
Height = 433
|
||||||
|
ClientHeight = 433
|
||||||
|
inherited CloseBtn: TButton
|
||||||
|
Top = 408
|
||||||
|
end
|
||||||
|
inherited ComputeBtn: TButton
|
||||||
|
Top = 408
|
||||||
|
end
|
||||||
|
inherited ResetBtn: TButton
|
||||||
|
Top = 408
|
||||||
|
end
|
||||||
|
inherited HelpBtn: TButton
|
||||||
|
Top = 408
|
||||||
|
end
|
||||||
|
inherited ButtonBevel: TBevel
|
||||||
|
Top = 392
|
||||||
|
end
|
||||||
|
end
|
||||||
|
inherited ParamsSplitter: TSplitter
|
||||||
|
Height = 449
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -275,7 +275,7 @@ end;
|
|||||||
DF degrees of freedom. }
|
DF degrees of freedom. }
|
||||||
function ProbT(t, DF1: double): double;
|
function ProbT(t, DF1: double): double;
|
||||||
var
|
var
|
||||||
F, prob: double;
|
F: double;
|
||||||
begin
|
begin
|
||||||
F := t * t;
|
F := t * t;
|
||||||
Result := ProbF(F, 1.0, DF1);
|
Result := ProbF(F, 1.0, DF1);
|
||||||
|
Reference in New Issue
Block a user