You've already forked lazarus-ccr
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7727 8e941d3f-bd1b-0410-a28a-d453659cc2b4
81 lines
1.4 KiB
ObjectPascal
81 lines
1.4 KiB
ObjectPascal
{ Template for LazStats forms containing the ParamsPanel and a ChartFrame }
|
|
|
|
unit BasicStatsChartFormUnit;
|
|
|
|
|
|
{$mode objfpc}{$H+}
|
|
|
|
interface
|
|
|
|
uses
|
|
Classes, SysUtils, Forms, Controls, Graphics, Dialogs,
|
|
ChartFrameUnit, BasicStatsParamsFormUnit;
|
|
|
|
type
|
|
|
|
{ TBasicStatsChartForm }
|
|
|
|
TBasicStatsChartForm = class(TBasicStatsParamsForm)
|
|
private
|
|
|
|
protected
|
|
FChartFrame: TChartFrame;
|
|
procedure UpdateBtnStates; override;
|
|
|
|
public
|
|
constructor Create(AOwner: TComponent); override;
|
|
procedure Reset; override;
|
|
|
|
end;
|
|
|
|
var
|
|
BasicStatsChartForm: TBasicStatsChartForm;
|
|
|
|
|
|
implementation
|
|
|
|
{$R *.lfm}
|
|
|
|
uses
|
|
Utils;
|
|
|
|
{ TBasicStatsChartForm }
|
|
|
|
constructor TBasicStatsChartForm.Create(AOwner: TComponent);
|
|
begin
|
|
inherited;
|
|
|
|
FChartFrame := TChartFrame.Create(self);
|
|
FChartFrame.Parent := Self;
|
|
FChartFrame.Align := alClient;
|
|
FChartFrame.Chart.BottomAxis.Intervals.MaxLength := 80;
|
|
FChartFrame.Chart.BottomAxis.Intervals.MinLength := 30;
|
|
FChartFrame.BorderSpacing.Left := 4;
|
|
FChartFrame.BorderSpacing.Top := 8;
|
|
FChartFrame.BorderSpacing.Bottom := 8;
|
|
FChartFrame.BorderSpacing.Right := 8;
|
|
|
|
InitToolbar(FChartFrame.ChartToolbar, tpRight);
|
|
|
|
Reset;
|
|
end;
|
|
|
|
|
|
procedure TBasicStatsChartForm.Reset;
|
|
begin
|
|
inherited;
|
|
if Assigned(FChartFrame) then
|
|
FChartFrame.Clear;
|
|
end;
|
|
|
|
|
|
procedure TBasicStatsChartForm.UpdateBtnStates;
|
|
begin
|
|
inherited;
|
|
if Assigned(FChartFrame) then
|
|
FChartFrame.UpdateBtnStates;
|
|
end;
|
|
|
|
end.
|
|
|