You've already forked lazarus-ccr
79 lines
1.6 KiB
ObjectPascal
79 lines
1.6 KiB
ObjectPascal
![]() |
unit BasicStatsReportAndChartFormUnit;
|
||
|
|
||
|
{$mode objfpc}{$H+}
|
||
|
|
||
|
interface
|
||
|
|
||
|
uses
|
||
|
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, ExtCtrls,
|
||
|
StdCtrls, ReportFrameUnit, ChartFrameUnit, BasicStatsParamsFormUnit;
|
||
|
|
||
|
type
|
||
|
|
||
|
{ TBasicStatsReportAndChartForm }
|
||
|
|
||
|
TBasicStatsReportAndChartForm = class(TBasicStatsParamsForm)
|
||
|
PageControl: TPageControl;
|
||
|
ReportPage: TTabSheet;
|
||
|
ChartPage: TTabSheet;
|
||
|
private
|
||
|
|
||
|
protected
|
||
|
FReportFrame: TReportFrame;
|
||
|
FChartFrame: TChartFrame;
|
||
|
procedure UpdateBtnStates; override;
|
||
|
|
||
|
public
|
||
|
constructor Create(AOwner: TComponent); override;
|
||
|
procedure Reset; override;
|
||
|
|
||
|
end;
|
||
|
|
||
|
var
|
||
|
BasicStatsReportAndChartForm: TBasicStatsReportAndChartForm;
|
||
|
|
||
|
implementation
|
||
|
|
||
|
{$R *.lfm}
|
||
|
|
||
|
constructor TBasicStatsReportAndChartForm.Create(AOwner: TComponent);
|
||
|
begin
|
||
|
inherited;
|
||
|
|
||
|
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 TBasicStatsReportAndChartForm.Reset;
|
||
|
begin
|
||
|
inherited;
|
||
|
if Assigned(FReportFrame) then
|
||
|
FReportFrame.Clear;
|
||
|
if Assigned(FChartFrame) then
|
||
|
FChartFrame.Clear;
|
||
|
end;
|
||
|
|
||
|
|
||
|
procedure TBasicStatsReportAndChartForm.UpdateBtnStates;
|
||
|
begin
|
||
|
inherited;
|
||
|
if Assigned(FReportFrame) then
|
||
|
FReportFrame.UpdateBtnStates;
|
||
|
if Assigned(FChartFrame) then
|
||
|
FChartFrame.UpdateBtnStates;
|
||
|
end;
|
||
|
|
||
|
|
||
|
end.
|
||
|
|