You've already forked lazarus-ccr
LazStats: Inherit form of MultXvsYUnit from TBasicStatsReportAndChartFormUnit:
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7754 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -100,7 +100,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
if grpcol = 0 then
|
if grpcol = 0 then
|
||||||
begin
|
begin
|
||||||
MessageDlg('No variable selected.', mtError, [mbOK], 0);
|
ErrorMsg('No variable selected.');
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -1,138 +1,55 @@
|
|||||||
inherited MultXvsYFrm: TMultXvsYFrm
|
inherited MultXvsYFrm: TMultXvsYFrm
|
||||||
Left = 431
|
|
||||||
Height = 416
|
|
||||||
Top = 221
|
|
||||||
Width = 1065
|
|
||||||
HelpType = htKeyword
|
HelpType = htKeyword
|
||||||
HelpKeyword = 'html/MultipleGroupXVersusYPlot.htm'
|
HelpKeyword = 'html/MultipleGroupXVersusYPlot.htm'
|
||||||
Anchors = [akLeft]
|
|
||||||
Caption = 'Multiple X Versus Y Plot'
|
Caption = 'Multiple X Versus Y Plot'
|
||||||
ClientHeight = 416
|
inherited ParamsPanel: TPanel
|
||||||
ClientWidth = 1065
|
|
||||||
OnActivate = FormActivate
|
|
||||||
OnCreate = FormCreate
|
|
||||||
Position = poMainFormCenter
|
|
||||||
object ParamsPanel: TPanel[0]
|
|
||||||
Left = 8
|
|
||||||
Height = 400
|
|
||||||
Top = 8
|
|
||||||
Width = 344
|
Width = 344
|
||||||
Align = alLeft
|
|
||||||
BorderSpacing.Left = 8
|
|
||||||
BorderSpacing.Top = 8
|
|
||||||
BorderSpacing.Right = 4
|
|
||||||
BorderSpacing.Bottom = 8
|
|
||||||
BevelOuter = bvNone
|
|
||||||
ClientHeight = 400
|
|
||||||
ClientWidth = 344
|
ClientWidth = 344
|
||||||
TabOrder = 0
|
inherited CloseBtn: TButton
|
||||||
object ResetBtn: TButton
|
|
||||||
AnchorSideRight.Control = ComputeBtn
|
|
||||||
AnchorSideBottom.Control = ParamsPanel
|
|
||||||
AnchorSideBottom.Side = asrBottom
|
|
||||||
Left = 143
|
|
||||||
Height = 25
|
|
||||||
Top = 375
|
|
||||||
Width = 54
|
|
||||||
Anchors = [akRight, akBottom]
|
|
||||||
AutoSize = True
|
|
||||||
BorderSpacing.Left = 8
|
|
||||||
BorderSpacing.Top = 8
|
|
||||||
BorderSpacing.Right = 8
|
|
||||||
Caption = 'Reset'
|
|
||||||
OnClick = ResetBtnClick
|
|
||||||
TabOrder = 13
|
|
||||||
end
|
|
||||||
object ComputeBtn: TButton
|
|
||||||
AnchorSideRight.Control = CloseBtn
|
|
||||||
AnchorSideBottom.Control = ParamsPanel
|
|
||||||
AnchorSideBottom.Side = asrBottom
|
|
||||||
Left = 205
|
|
||||||
Height = 25
|
|
||||||
Top = 375
|
|
||||||
Width = 76
|
|
||||||
Anchors = [akRight, akBottom]
|
|
||||||
AutoSize = True
|
|
||||||
BorderSpacing.Left = 8
|
|
||||||
BorderSpacing.Top = 8
|
|
||||||
BorderSpacing.Right = 8
|
|
||||||
Caption = 'Compute'
|
|
||||||
OnClick = ComputeBtnClick
|
|
||||||
TabOrder = 14
|
|
||||||
end
|
|
||||||
object CloseBtn: TButton
|
|
||||||
AnchorSideRight.Control = ParamsPanel
|
|
||||||
AnchorSideRight.Side = asrBottom
|
|
||||||
AnchorSideBottom.Control = ParamsPanel
|
|
||||||
AnchorSideBottom.Side = asrBottom
|
|
||||||
Left = 289
|
Left = 289
|
||||||
Height = 25
|
|
||||||
Top = 375
|
|
||||||
Width = 55
|
|
||||||
Anchors = [akRight, akBottom]
|
|
||||||
AutoSize = True
|
|
||||||
BorderSpacing.Left = 8
|
|
||||||
BorderSpacing.Top = 8
|
|
||||||
Caption = 'Close'
|
|
||||||
ModalResult = 11
|
|
||||||
OnClick = CloseBtnClick
|
|
||||||
TabOrder = 15
|
TabOrder = 15
|
||||||
end
|
end
|
||||||
object HelpBtn: TButton
|
inherited ComputeBtn: TButton
|
||||||
Tag = 134
|
Left = 205
|
||||||
AnchorSideRight.Control = ResetBtn
|
TabOrder = 14
|
||||||
AnchorSideBottom.Control = ParamsPanel
|
end
|
||||||
AnchorSideBottom.Side = asrBottom
|
inherited ResetBtn: TButton
|
||||||
|
Left = 143
|
||||||
|
TabOrder = 13
|
||||||
|
end
|
||||||
|
inherited HelpBtn: TButton
|
||||||
Left = 84
|
Left = 84
|
||||||
Height = 25
|
|
||||||
Top = 375
|
|
||||||
Width = 51
|
|
||||||
Anchors = [akRight, akBottom]
|
|
||||||
AutoSize = True
|
|
||||||
BorderSpacing.Top = 8
|
|
||||||
BorderSpacing.Right = 8
|
|
||||||
Caption = 'Help'
|
|
||||||
OnClick = HelpBtnClick
|
|
||||||
TabOrder = 12
|
TabOrder = 12
|
||||||
end
|
end
|
||||||
object ButtonBevel: TBevel
|
inherited ButtonBevel: TBevel
|
||||||
AnchorSideLeft.Control = ParamsPanel
|
|
||||||
AnchorSideRight.Control = ParamsPanel
|
|
||||||
AnchorSideRight.Side = asrBottom
|
|
||||||
AnchorSideBottom.Control = CloseBtn
|
|
||||||
Left = 0
|
|
||||||
Height = 10
|
|
||||||
Top = 357
|
|
||||||
Width = 344
|
Width = 344
|
||||||
Anchors = [akLeft, akRight, akBottom]
|
|
||||||
Shape = bsBottomLine
|
|
||||||
end
|
end
|
||||||
object Label5: TLabel
|
object Label5: TLabel[5]
|
||||||
AnchorSideLeft.Control = ParamsPanel
|
AnchorSideLeft.Control = ParamsPanel
|
||||||
AnchorSideTop.Control = LabelEdit
|
AnchorSideTop.Control = LabelEdit
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 338
|
Top = 374
|
||||||
Width = 46
|
Width = 46
|
||||||
Caption = 'Plot Title'
|
Caption = 'Plot Title'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object LabelEdit: TEdit
|
object LabelEdit: TEdit[6]
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideRight.Control = ParamsPanel
|
AnchorSideRight.Control = ParamsPanel
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = ButtonBevel
|
AnchorSideBottom.Control = ButtonBevel
|
||||||
Left = 54
|
Left = 54
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 334
|
Top = 370
|
||||||
Width = 290
|
Width = 290
|
||||||
Anchors = [akLeft, akRight, akBottom]
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
TabOrder = 11
|
TabOrder = 11
|
||||||
TextHint = 'Text above the plot'
|
TextHint = 'Text above the plot'
|
||||||
end
|
end
|
||||||
object Label1: TLabel
|
object Label1: TLabel[7]
|
||||||
AnchorSideLeft.Control = ParamsPanel
|
AnchorSideLeft.Control = ParamsPanel
|
||||||
AnchorSideTop.Control = ParamsPanel
|
AnchorSideTop.Control = ParamsPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
@ -142,7 +59,7 @@ inherited MultXvsYFrm: TMultXvsYFrm
|
|||||||
Caption = 'Available Variables:'
|
Caption = 'Available Variables:'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object VarList: TListBox
|
object VarList: TListBox[8]
|
||||||
AnchorSideTop.Control = Label1
|
AnchorSideTop.Control = Label1
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = XInBtn
|
AnchorSideRight.Control = XInBtn
|
||||||
@ -159,7 +76,7 @@ inherited MultXvsYFrm: TMultXvsYFrm
|
|||||||
OnSelectionChange = VarListSelectionChange
|
OnSelectionChange = VarListSelectionChange
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object XInBtn: TBitBtn
|
object XInBtn: TBitBtn[9]
|
||||||
AnchorSideLeft.Control = ParamsPanel
|
AnchorSideLeft.Control = ParamsPanel
|
||||||
AnchorSideLeft.Side = asrCenter
|
AnchorSideLeft.Side = asrCenter
|
||||||
AnchorSideTop.Control = VarList
|
AnchorSideTop.Control = VarList
|
||||||
@ -173,7 +90,7 @@ inherited MultXvsYFrm: TMultXvsYFrm
|
|||||||
Spacing = 0
|
Spacing = 0
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object XOutBtn: TBitBtn
|
object XOutBtn: TBitBtn[10]
|
||||||
AnchorSideLeft.Control = ParamsPanel
|
AnchorSideLeft.Control = ParamsPanel
|
||||||
AnchorSideLeft.Side = asrCenter
|
AnchorSideLeft.Side = asrCenter
|
||||||
AnchorSideTop.Control = XInBtn
|
AnchorSideTop.Control = XInBtn
|
||||||
@ -189,7 +106,7 @@ inherited MultXvsYFrm: TMultXvsYFrm
|
|||||||
Spacing = 0
|
Spacing = 0
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object YInBtn: TBitBtn
|
object YInBtn: TBitBtn[11]
|
||||||
AnchorSideLeft.Control = ParamsPanel
|
AnchorSideLeft.Control = ParamsPanel
|
||||||
AnchorSideLeft.Side = asrCenter
|
AnchorSideLeft.Side = asrCenter
|
||||||
AnchorSideTop.Control = XOutBtn
|
AnchorSideTop.Control = XOutBtn
|
||||||
@ -205,7 +122,7 @@ inherited MultXvsYFrm: TMultXvsYFrm
|
|||||||
Spacing = 0
|
Spacing = 0
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
object YOutBtn: TBitBtn
|
object YOutBtn: TBitBtn[12]
|
||||||
AnchorSideLeft.Control = ParamsPanel
|
AnchorSideLeft.Control = ParamsPanel
|
||||||
AnchorSideLeft.Side = asrCenter
|
AnchorSideLeft.Side = asrCenter
|
||||||
AnchorSideTop.Control = YInBtn
|
AnchorSideTop.Control = YInBtn
|
||||||
@ -221,7 +138,7 @@ inherited MultXvsYFrm: TMultXvsYFrm
|
|||||||
Spacing = 0
|
Spacing = 0
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
end
|
end
|
||||||
object GroupInBtn: TBitBtn
|
object GroupInBtn: TBitBtn[13]
|
||||||
AnchorSideLeft.Control = ParamsPanel
|
AnchorSideLeft.Control = ParamsPanel
|
||||||
AnchorSideLeft.Side = asrCenter
|
AnchorSideLeft.Side = asrCenter
|
||||||
AnchorSideTop.Control = YOutBtn
|
AnchorSideTop.Control = YOutBtn
|
||||||
@ -237,7 +154,7 @@ inherited MultXvsYFrm: TMultXvsYFrm
|
|||||||
Spacing = 0
|
Spacing = 0
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
end
|
end
|
||||||
object GroupOutBtn: TBitBtn
|
object GroupOutBtn: TBitBtn[14]
|
||||||
AnchorSideLeft.Control = ParamsPanel
|
AnchorSideLeft.Control = ParamsPanel
|
||||||
AnchorSideLeft.Side = asrCenter
|
AnchorSideLeft.Side = asrCenter
|
||||||
AnchorSideTop.Control = GroupInBtn
|
AnchorSideTop.Control = GroupInBtn
|
||||||
@ -254,14 +171,14 @@ inherited MultXvsYFrm: TMultXvsYFrm
|
|||||||
Spacing = 0
|
Spacing = 0
|
||||||
TabOrder = 8
|
TabOrder = 8
|
||||||
end
|
end
|
||||||
object OptionsGroup: TGroupBox
|
object OptionsGroup: TGroupBox[15]
|
||||||
AnchorSideLeft.Control = GroupOutBtn
|
AnchorSideLeft.Control = GroupOutBtn
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = LabelEdit
|
AnchorSideBottom.Control = LabelEdit
|
||||||
Left = 159
|
Left = 159
|
||||||
Height = 49
|
Height = 49
|
||||||
Top = 277
|
Top = 313
|
||||||
Width = 182
|
Width = 182
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
@ -285,7 +202,7 @@ inherited MultXvsYFrm: TMultXvsYFrm
|
|||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object Label2: TLabel
|
object Label2: TLabel[16]
|
||||||
AnchorSideLeft.Control = XEdit
|
AnchorSideLeft.Control = XEdit
|
||||||
AnchorSideBottom.Control = XEdit
|
AnchorSideBottom.Control = XEdit
|
||||||
Left = 193
|
Left = 193
|
||||||
@ -297,7 +214,7 @@ inherited MultXvsYFrm: TMultXvsYFrm
|
|||||||
Caption = 'X Variable'
|
Caption = 'X Variable'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object XEdit: TEdit
|
object XEdit: TEdit[17]
|
||||||
AnchorSideLeft.Control = XOutBtn
|
AnchorSideLeft.Control = XOutBtn
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideRight.Control = ParamsPanel
|
AnchorSideRight.Control = ParamsPanel
|
||||||
@ -315,7 +232,7 @@ inherited MultXvsYFrm: TMultXvsYFrm
|
|||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
Text = 'XEdit'
|
Text = 'XEdit'
|
||||||
end
|
end
|
||||||
object Label3: TLabel
|
object Label3: TLabel[18]
|
||||||
AnchorSideLeft.Control = YEdit
|
AnchorSideLeft.Control = YEdit
|
||||||
AnchorSideBottom.Control = YEdit
|
AnchorSideBottom.Control = YEdit
|
||||||
Left = 193
|
Left = 193
|
||||||
@ -327,7 +244,7 @@ inherited MultXvsYFrm: TMultXvsYFrm
|
|||||||
Caption = 'Y Variable'
|
Caption = 'Y Variable'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object YEdit: TEdit
|
object YEdit: TEdit[19]
|
||||||
AnchorSideLeft.Control = YOutBtn
|
AnchorSideLeft.Control = YOutBtn
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideRight.Control = ParamsPanel
|
AnchorSideRight.Control = ParamsPanel
|
||||||
@ -345,7 +262,7 @@ inherited MultXvsYFrm: TMultXvsYFrm
|
|||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
Text = 'YEdit'
|
Text = 'YEdit'
|
||||||
end
|
end
|
||||||
object Label4: TLabel
|
object Label4: TLabel[20]
|
||||||
AnchorSideLeft.Control = GroupEdit
|
AnchorSideLeft.Control = GroupEdit
|
||||||
AnchorSideBottom.Control = GroupEdit
|
AnchorSideBottom.Control = GroupEdit
|
||||||
Left = 193
|
Left = 193
|
||||||
@ -357,7 +274,7 @@ inherited MultXvsYFrm: TMultXvsYFrm
|
|||||||
Caption = 'Group Variable'
|
Caption = 'Group Variable'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object GroupEdit: TEdit
|
object GroupEdit: TEdit[21]
|
||||||
AnchorSideLeft.Control = GroupOutBtn
|
AnchorSideLeft.Control = GroupOutBtn
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideRight.Control = ParamsPanel
|
AnchorSideRight.Control = ParamsPanel
|
||||||
@ -376,31 +293,11 @@ inherited MultXvsYFrm: TMultXvsYFrm
|
|||||||
Text = 'GroupEdit'
|
Text = 'GroupEdit'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object PageControl: TPageControl[1]
|
inherited ParamsSplitter: TSplitter
|
||||||
Left = 365
|
|
||||||
Height = 400
|
|
||||||
Top = 8
|
|
||||||
Width = 692
|
|
||||||
ActivePage = ReportPage
|
|
||||||
Align = alClient
|
|
||||||
BorderSpacing.Left = 4
|
|
||||||
BorderSpacing.Top = 8
|
|
||||||
BorderSpacing.Right = 8
|
|
||||||
BorderSpacing.Bottom = 8
|
|
||||||
TabIndex = 0
|
|
||||||
TabOrder = 1
|
|
||||||
object ReportPage: TTabSheet
|
|
||||||
Caption = 'Report'
|
|
||||||
end
|
|
||||||
object ChartPage: TTabSheet
|
|
||||||
Caption = 'Chart'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object ParamsSplitter: TSplitter[2]
|
|
||||||
Left = 356
|
Left = 356
|
||||||
Height = 416
|
end
|
||||||
Top = 0
|
inherited PageControl: TPageControl
|
||||||
Width = 5
|
Left = 365
|
||||||
ResizeStyle = rsPattern
|
Width = 343
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -9,30 +9,20 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
|
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
|
||||||
StdCtrls, ExtCtrls, Buttons, Clipbrd, ComCtrls,
|
StdCtrls, ExtCtrls, Buttons, Clipbrd, ComCtrls,
|
||||||
MainUnit, Globals, DataProcs, DictionaryUnit, ContextHelpUnit,
|
MainUnit, Globals, DataProcs, DictionaryUnit,
|
||||||
BasicStatsFormUnit, ReportFrameUnit, ChartFrameUnit;
|
BasicStatsReportAndChartFormUnit, ReportFrameUnit, ChartFrameUnit;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
{ TMultXvsYFrm }
|
{ TMultXvsYFrm }
|
||||||
|
|
||||||
TMultXvsYFrm = class(TBasicStatsForm)
|
TMultXvsYFrm = class(TBasicStatsReportAndChartForm)
|
||||||
ButtonBevel: TBevel;
|
|
||||||
HelpBtn: TButton;
|
|
||||||
PageControl: TPageControl;
|
|
||||||
ParamsPanel: TPanel;
|
|
||||||
ParamsSplitter: TSplitter;
|
|
||||||
ReportPage: TTabSheet;
|
|
||||||
ChartPage: TTabSheet;
|
|
||||||
XInBtn: TBitBtn;
|
XInBtn: TBitBtn;
|
||||||
XOutBtn: TBitBtn;
|
XOutBtn: TBitBtn;
|
||||||
YInBtn: TBitBtn;
|
YInBtn: TBitBtn;
|
||||||
YOutBtn: TBitBtn;
|
YOutBtn: TBitBtn;
|
||||||
GroupInBtn: TBitBtn;
|
GroupInBtn: TBitBtn;
|
||||||
GroupOutBtn: TBitBtn;
|
GroupOutBtn: TBitBtn;
|
||||||
ResetBtn: TButton;
|
|
||||||
ComputeBtn: TButton;
|
|
||||||
CloseBtn: TButton;
|
|
||||||
LinesChk: TCheckBox;
|
LinesChk: TCheckBox;
|
||||||
XEdit: TEdit;
|
XEdit: TEdit;
|
||||||
YEdit: TEdit;
|
YEdit: TEdit;
|
||||||
@ -45,30 +35,26 @@ type
|
|||||||
Label4: TLabel;
|
Label4: TLabel;
|
||||||
Label5: TLabel;
|
Label5: TLabel;
|
||||||
VarList: TListBox;
|
VarList: TListBox;
|
||||||
procedure CloseBtnClick(Sender: TObject);
|
|
||||||
procedure ComputeBtnClick(Sender: TObject);
|
|
||||||
procedure FormActivate(Sender: TObject);
|
|
||||||
procedure FormCreate(Sender: TObject);
|
|
||||||
procedure GroupInBtnClick(Sender: TObject);
|
procedure GroupInBtnClick(Sender: TObject);
|
||||||
procedure GroupOutBtnClick(Sender: TObject);
|
procedure GroupOutBtnClick(Sender: TObject);
|
||||||
procedure HelpBtnClick(Sender: TObject);
|
|
||||||
procedure ResetBtnClick(Sender: TObject);
|
|
||||||
procedure VarListDblClick(Sender: TObject);
|
procedure VarListDblClick(Sender: TObject);
|
||||||
procedure VarListSelectionChange(Sender: TObject; {%H-}User: boolean);
|
procedure VarListSelectionChange(Sender: TObject; {%H-}User: boolean);
|
||||||
procedure XInBtnClick(Sender: TObject);
|
procedure XInBtnClick(Sender: TObject);
|
||||||
procedure XOutBtnClick(Sender: TObject);
|
procedure XOutBtnClick(Sender: TObject);
|
||||||
procedure YInBtnClick(Sender: TObject);
|
procedure YInBtnClick(Sender: TObject);
|
||||||
procedure YOutBtnClick(Sender: TObject);
|
procedure YOutBtnClick(Sender: TObject);
|
||||||
|
|
||||||
private
|
private
|
||||||
{ private declarations }
|
|
||||||
FAutoSized: Boolean;
|
|
||||||
FReportFrame: TReportFrame;
|
|
||||||
FChartFrame: TChartFrame;
|
|
||||||
procedure PlotXY(const XValues, YValues: DblDyneMat; const Groups: StrDyneVec);
|
procedure PlotXY(const XValues, YValues: DblDyneMat; const Groups: StrDyneVec);
|
||||||
procedure UpdateBtnStates;
|
|
||||||
|
protected
|
||||||
|
procedure AdjustConstraints; override;
|
||||||
|
procedure Compute; override;
|
||||||
|
procedure UpdateBtnStates; override;
|
||||||
|
procedure WriteToReport(const AMeans, AStdDevs: DblDyneVec);
|
||||||
|
|
||||||
public
|
public
|
||||||
{ public declarations }
|
constructor Create(AOwner: TComponent); override;
|
||||||
procedure Reset; override;
|
procedure Reset; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -86,9 +72,25 @@ uses
|
|||||||
|
|
||||||
{ TMultXvsYFrm }
|
{ TMultXvsYFrm }
|
||||||
|
|
||||||
procedure TMultXvsYFrm.ComputeBtnClick(Sender: TObject);
|
constructor TMultXvsYFrm.Create(AOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TMultXvsYFrm.AdjustConstraints;
|
||||||
|
begin
|
||||||
|
ParamsPanel.Constraints.MinWidth := Max(
|
||||||
|
4*CloseBtn.Width + 3*CloseBtn.BorderSpacing.Left,
|
||||||
|
OptionsGroup.Width - XInBtn.Width div 2);
|
||||||
|
ParamsPanel.Constraints.MinHeight := GroupOutBtn.Top + GroupOutBtn.Height +
|
||||||
|
OptionsGroup.BorderSpacing.Top + OptionsGroup.Height + OptionsGroup.BorderSpacing.Bottom +
|
||||||
|
LabelEdit.Height + ButtonBevel.Height + CloseBtn.BorderSpacing.Top + CloseBtn.Height;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TMultXvsYFrm.Compute;
|
||||||
var
|
var
|
||||||
lReport: TStrings;
|
|
||||||
i, N, xCol, yCol, grpCol, grp, numGrps: integer;
|
i, N, xCol, yCol, grpCol, grp, numGrps: integer;
|
||||||
grpName: String;
|
grpName: String;
|
||||||
//minX, maxX, minY, maxY,
|
//minX, maxX, minY, maxY,
|
||||||
@ -178,30 +180,12 @@ begin
|
|||||||
for i := 0 to 1 do
|
for i := 0 to 1 do
|
||||||
begin
|
begin
|
||||||
stdDevs[i] := stdDevs[i] - sqr(means[i]) / N;
|
stdDevs[i] := stdDevs[i] - sqr(means[i]) / N;
|
||||||
stdDevs[i] := sqrt(StdDevs[i] / (N - 1));
|
stdDevs[i] := sqrt(stdDevs[i] / (N - 1));
|
||||||
means[i] := means[i] / N;
|
means[i] := means[i] / N;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// Print out descriptive data to report frame
|
// Print out descriptive data to report frame
|
||||||
lReport := TStringList.Create;
|
WriteToReport(means, stdDevs);
|
||||||
try
|
|
||||||
lReport.Add('X VERSUS Y FOR GROUPS PLOT');
|
|
||||||
lReport.Add('');
|
|
||||||
lReport.Add('X variable: ' + XEdit.Text);
|
|
||||||
lReport.Add('Y variable: ' + YEdit.Text);
|
|
||||||
lReport.Add('Group variable: ' + GroupEdit.Text);
|
|
||||||
lReport.Add('');
|
|
||||||
|
|
||||||
lReport.Add('VARIABLE MEAN STANDARD DEVIATION');
|
|
||||||
lReport.Add('-------- -------- ------------------');
|
|
||||||
lReport.Add(' X %8.3f %14.3f', [Means[0], StdDevs[0]]);
|
|
||||||
lReport.Add(' Y %8.3f %14.3f', [Means[1], StdDevs[1]]);
|
|
||||||
lReport.Add('');
|
|
||||||
|
|
||||||
FReportFrame.DisplayReport(lReport);
|
|
||||||
finally
|
|
||||||
lReport.Free;
|
|
||||||
end;
|
|
||||||
|
|
||||||
// sort on X
|
// sort on X
|
||||||
for i := 0 to numGrps - 1 do
|
for i := 0 to numGrps - 1 do
|
||||||
@ -212,63 +196,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TMultXvsYFrm.CloseBtnClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
Close;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TMultXvsYFrm.FormActivate(Sender: TObject);
|
|
||||||
var
|
|
||||||
w: Integer;
|
|
||||||
begin
|
|
||||||
if FAutoSized then
|
|
||||||
exit;
|
|
||||||
|
|
||||||
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.MinWidth := Max(
|
|
||||||
4*w + 3*CloseBtn.BorderSpacing.Left,
|
|
||||||
OptionsGroup.Width - XInBtn.Width div 2);
|
|
||||||
ParamsPanel.Constraints.MinHeight := GroupOutBtn.Top + GroupOutBtn.Height +
|
|
||||||
OptionsGroup.BorderSpacing.Top + OptionsGroup.Height + OptionsGroup.BorderSpacing.Bottom +
|
|
||||||
LabelEdit.Height + ButtonBevel.Height + CloseBtn.BorderSpacing.Top + CloseBtn.Height;
|
|
||||||
|
|
||||||
Constraints.MinWidth := ParamsPanel.Constraints.MinWidth + 300;
|
|
||||||
Constraints.MinHeight := ParamsPanel.Constraints.MinHeight + ParamsPanel.BorderSpacing.Top*2;
|
|
||||||
if Width < Constraints.MinWidth then Width := 1; // enforce contraints
|
|
||||||
if Height < Constraints.MinHeight then Height := 1;
|
|
||||||
|
|
||||||
Position := poDesigned;
|
|
||||||
FAutoSized := true;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TMultXvsYFrm.FormCreate(Sender: TObject);
|
|
||||||
begin
|
|
||||||
Assert(OS3MainFrm <> nil);
|
|
||||||
if DictionaryFrm = nil then Application.CreateForm(TDictionaryFrm, DictionaryFrm);
|
|
||||||
|
|
||||||
InitForm(self);
|
|
||||||
|
|
||||||
FReportFrame := TReportFrame.Create(self);
|
|
||||||
FReportFrame.Parent := ReportPage;
|
|
||||||
FReportFrame.Align := alClient;
|
|
||||||
|
|
||||||
FChartFrame := TChartFrame.Create(self);
|
|
||||||
FChartFrame.Parent := ChartPage;
|
|
||||||
FChartFrame.Align := alClient;
|
|
||||||
FChartFrame.Chart.BottomAxis.Intervals.MaxLength := 80;
|
|
||||||
FChartFrame.Chart.BottomAxis.Intervals.MinLength := 30;
|
|
||||||
|
|
||||||
Reset;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TMultXvsYFrm.GroupInBtnClick(Sender: TObject);
|
procedure TMultXvsYFrm.GroupInBtnClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
@ -294,14 +221,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TMultXvsYFrm.HelpBtnClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if ContextHelpForm = nil then
|
|
||||||
Application.CreateForm(TContextHelpForm, ContextHelpForm);
|
|
||||||
ContextHelpForm.HelpMessage((Sender as TButton).Tag);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
// Routine to plot X versus multiple Y values for several groups
|
// Routine to plot X versus multiple Y values for several groups
|
||||||
// Layout of X and Y matrices:
|
// Layout of X and Y matrices:
|
||||||
// 1st index: group index, 2nd index: point index within group
|
// 1st index: group index, 2nd index: point index within group
|
||||||
@ -335,8 +254,9 @@ end;
|
|||||||
|
|
||||||
procedure TMultXvsYFrm.Reset;
|
procedure TMultXvsYFrm.Reset;
|
||||||
var
|
var
|
||||||
i : integer;
|
i: integer;
|
||||||
begin
|
begin
|
||||||
|
inherited;
|
||||||
VarList.Clear;
|
VarList.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]);
|
||||||
@ -344,18 +264,14 @@ begin
|
|||||||
YEdit.Text := '';
|
YEdit.Text := '';
|
||||||
GroupEdit.Text := '';
|
GroupEdit.Text := '';
|
||||||
LinesChk.Checked := false;
|
LinesChk.Checked := false;
|
||||||
FReportFrame.Clear;
|
|
||||||
FChartFrame.Clear;
|
if FReportFrame <> nil then FReportFrame.Clear;
|
||||||
|
if FChartFrame <> nil then FChartFrame.Clear;
|
||||||
|
|
||||||
UpdateBtnStates;
|
UpdateBtnStates;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TMultXvsYFrm.ResetBtnClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
Reset;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TMultXvsYFrm.VarListDblClick(Sender: TObject);
|
procedure TMultXvsYFrm.VarListDblClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
index: Integer;
|
index: Integer;
|
||||||
@ -395,8 +311,8 @@ begin
|
|||||||
YOutBtn.Enabled := (YEdit.Text <> '');
|
YOutBtn.Enabled := (YEdit.Text <> '');
|
||||||
GroupOutBtn.Enabled := (GroupEdit.Text <> '');
|
GroupOutBtn.Enabled := (GroupEdit.Text <> '');
|
||||||
|
|
||||||
FReportFrame.UpdateBtnStates;
|
if FReportFrame <> nil then FReportFrame.UpdateBtnStates;
|
||||||
FChartFrame.UpdateBtnStates;
|
if FChartFrame <> nil then FChartFrame.UpdateBtnStates;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -406,6 +322,32 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TMultXVsYFrm.WriteToReport(const AMeans, AStdDevs: DblDyneVec);
|
||||||
|
var
|
||||||
|
lReport: TStrings;
|
||||||
|
begin
|
||||||
|
lReport := TStringList.Create;
|
||||||
|
try
|
||||||
|
lReport.Add('X VERSUS Y FOR GROUPS PLOT');
|
||||||
|
lReport.Add('');
|
||||||
|
lReport.Add('X variable: ' + XEdit.Text);
|
||||||
|
lReport.Add('Y variable: ' + YEdit.Text);
|
||||||
|
lReport.Add('Group variable: ' + GroupEdit.Text);
|
||||||
|
lReport.Add('');
|
||||||
|
|
||||||
|
lReport.Add('VARIABLE MEAN STANDARD DEVIATION');
|
||||||
|
lReport.Add('-------- -------- ------------------');
|
||||||
|
lReport.Add(' X %8.3f %14.3f', [AMeans[0], AStdDevs[0]]);
|
||||||
|
lReport.Add(' Y %8.3f %14.3f', [AMeans[1], AStdDevs[1]]);
|
||||||
|
lReport.Add('');
|
||||||
|
|
||||||
|
FReportFrame.DisplayReport(lReport);
|
||||||
|
finally
|
||||||
|
lReport.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TMultXvsYFrm.XInBtnClick(Sender: TObject);
|
procedure TMultXvsYFrm.XInBtnClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
|
Reference in New Issue
Block a user