📄 iplotdatacustomlist.pas
字号:
{*******************************************************}
{ }
{ TiPlotDataNullList }
{ }
{ Copyright (c) 1997,2003 Iocomp Software }
{ }
{*******************************************************}
{$I iInclude.inc}
{$ifdef iVCL}unit iPlotDataCustomList;{$endif}
{$ifdef iCLX}unit QiPlotDataCustomList;{$endif}
interface
uses
{$I iIncludeUses.inc}
{$IFDEF iVCL} iTypes;{$ENDIF}
{$IFDEF iCLX}QiTypes;{$ENDIF}
type
TiPlotDataCustomList = class(TObject)
private
FCount : Integer;
FCapacity : Integer;
FTail : Integer;
FRingBufferEnabled : Boolean;
FDataPointSize : Integer;
FMaxDataPoints : Integer;
FStoredTraceLineColor : TColor;
FStoredTraceLineWidth : Integer;
FStoredTraceLineStyle : TiPlotLineStyle;
FStoredMarkerVisible : Boolean;
FStoredMarkerSize : Integer;
FStoredMarkerStyle : TiPlotMarkerStyle;
FStoredMarkerPenColor : TColor;
FStoredMarkerPenWidth : Integer;
FStoredMarkerPenStyle : TPenStyle;
FStoredMarkerBrushColor : TColor;
FStoredMarkerBrushStyle : TBrushStyle;
FStoredMarkerCharacter : Char;
FStoredBarVisible : Boolean;
FStoredBarReference : Double;
FStoredBarWidth : Double;
FStoredBarPenColor : TColor;
FStoredBarPenWidth : Integer;
FStoredBarPenStyle : TPenStyle;
FStoredBarBrushColor : TColor;
FStoredBarBrushStyle : TBrushStyle;
protected
function GetX (const Index: Integer): Double; virtual; abstract;
function GetY (const Index: Integer): Double; virtual; abstract;
function GetEmpty (const Index: Integer): Boolean; virtual;
function GetNull (const Index: Integer): Boolean; virtual;
function GetHigh (const Index: Integer): Double; virtual;
function GetLow (const Index: Integer): Double; virtual;
function GetOpen (const Index: Integer): Double; virtual;
function GetClose (const Index: Integer): Double; virtual;
procedure SetX (const Index: Integer; const Value: Double); virtual; abstract;
procedure SetY (const Index: Integer; const Value: Double); virtual; abstract;
procedure SetEmpty (const Index: Integer; const Value: Boolean); virtual;
procedure SetNull (const Index: Integer; const Value: Boolean); virtual;
procedure SetHigh (const Index: Integer; const Value: Double); virtual;
procedure SetLow (const Index: Integer; const Value: Double); virtual;
procedure SetOpen (const Index: Integer; const Value: Double); virtual;
procedure SetClose (const Index: Integer; const Value: Double); virtual;
function GetTraceLineColor (const Index: Integer): TColor; virtual;
function GetTraceLineWidth (const Index: Integer): Integer; virtual;
function GetTraceLineStyle (const Index: Integer): TiPlotLineStyle; virtual;
function GetMarkerVisible (const Index: Integer): Boolean; virtual;
function GetMarkerSize (const Index: Integer): Integer; virtual;
function GetMarkerStyle (const Index: Integer): TiPlotMarkerStyle; virtual;
function GetMarkerPenColor (const Index: Integer): TColor; virtual;
function GetMarkerPenWidth (const Index: Integer): Integer; virtual;
function GetMarkerPenStyle (const Index: Integer): TPenStyle; virtual;
function GetMarkerBrushColor(const Index: Integer): TColor; virtual;
function GetMarkerBrushStyle(const Index: Integer): TBrushStyle; virtual;
function GetMarkerCharacter (const Index: Integer): Char; virtual;
function GetBarVisible (const Index: Integer): Boolean; virtual;
function GetBarReference (const Index: Integer): Double; virtual;
function GetBarWidth (const Index: Integer): Double; virtual;
function GetBarPenColor (const Index: Integer): TColor; virtual;
function GetBarPenWidth (const Index: Integer): Integer; virtual;
function GetBarPenStyle (const Index: Integer): TPenStyle; virtual;
function GetBarBrushColor (const Index: Integer): TColor; virtual;
function GetBarBrushStyle (const Index: Integer): TBrushStyle; virtual;
procedure SetTraceLineColor (const Index: Integer; const Value: TColor); virtual;
procedure SetTraceLineWidth (const Index: Integer; const Value: Integer); virtual;
procedure SetTraceLineStyle (const Index: Integer; const Value: TiPlotLineStyle); virtual;
procedure SetMarkerVisible (const Index: Integer; const Value: Boolean); virtual;
procedure SetMarkerSize (const Index: Integer; const Value: Integer); virtual;
procedure SetMarkerStyle (const Index: Integer; const Value: TiPlotMarkerStyle);virtual;
procedure SetMarkerPenColor (const Index: Integer; const Value: TColor); virtual;
procedure SetMarkerPenWidth (const Index: Integer; const Value: Integer); virtual;
procedure SetMarkerPenStyle (const Index: Integer; const Value: TPenStyle); virtual;
procedure SetMarkerBrushColor(const Index: Integer; const Value: TColor); virtual;
procedure SetMarkerBrushStyle(const Index: Integer; const Value: TBrushStyle); virtual;
procedure SetMarkerCharacter (const Index: Integer; const Value: Char); virtual;
procedure SetBarVisible (const Index: Integer; const Value: Boolean); virtual;
procedure SetBarReference (const Index: Integer; const Value: Double); virtual;
procedure SetBarWidth (const Index: Integer; const Value: Double); virtual;
procedure SetBarPenColor (const Index: Integer; const Value: TColor); virtual;
procedure SetBarPenWidth (const Index: Integer; const Value: Integer); virtual;
procedure SetBarPenStyle (const Index: Integer; const Value: TPenStyle); virtual;
procedure SetBarBrushColor (const Index: Integer; const Value: TColor); virtual;
procedure SetBarBrushStyle (const Index: Integer; const Value: TBrushStyle); virtual;
function GetRingBufferSize: Integer;
procedure SetRingBufferSize(const Value: Integer);
function GetActualIndex(Value: Integer): Integer;
function GetMemoryUsed: Integer;
procedure SetDataPointSize(Value: Integer);
procedure Grow;
procedure FreeMemory; virtual; abstract;
property RingBufferEnabled : Boolean read FRingBufferEnabled;
property Tail : Integer read FTail write FTail;
public
constructor Create; virtual;
destructor Destroy; override;
function Add(const X, Y: Double): Integer; virtual; abstract;
procedure Clear; virtual;
procedure SetCapacity(const NewCapacity: Integer); virtual; abstract;
procedure DeletePoints(const Size : Integer); virtual; abstract;
procedure GetXYEmptyNull(const Index: Integer; var X, Y: Double; var Empty, Null: Boolean); virtual; abstract;
property DataPointSize : Integer read FDataPointSize;
property MaxDataPoints : Integer read FMaxDataPoints;
property MemoryUsed : Integer read GetMemoryUsed;
property Capacity : Integer read FCapacity write FCapacity;
property RingBufferSize : Integer read GetRingBufferSize write SetRingBufferSize;
property StoredTraceLineColor : TColor read FStoredTraceLineColor write FStoredTraceLineColor;
property StoredTraceLineWidth : Integer read FStoredTraceLineWidth write FStoredTraceLineWidth;
property StoredTraceLineStyle : TiPlotLineStyle read FStoredTraceLineStyle write FStoredTraceLineStyle;
property StoredMarkerVisible : Boolean read FStoredMarkerVisible write FStoredMarkerVisible;
property StoredMarkerSize : Integer read FStoredMarkerSize write FStoredMarkerSize;
property StoredMarkerStyle : TiPlotMarkerStyle read FStoredMarkerStyle write FStoredMarkerStyle;
property StoredMarkerPenColor : TColor read FStoredMarkerPenColor write FStoredMarkerPenColor;
property StoredMarkerPenWidth : Integer read FStoredMarkerPenWidth write FStoredMarkerPenWidth;
property StoredMarkerPenStyle : TPenStyle read FStoredMarkerPenStyle write FStoredMarkerPenStyle;
property StoredMarkerBrushColor : TColor read FStoredMarkerBrushColor write FStoredMarkerBrushColor;
property StoredMarkerBrushStyle : TBrushStyle read FStoredMarkerBrushStyle write FStoredMarkerBrushStyle;
property StoredMarkerCharacter : Char read FStoredMarkerCharacter write FStoredMarkerCharacter;
property StoredBarVisible : Boolean read FStoredBarVisible write FStoredBarVisible;
property StoredBarReference : Double read FStoredBarReference write FStoredBarReference;
property StoredBarWidth : Double read FStoredBarWidth write FStoredBarWidth;
property StoredBarPenColor : TColor read FStoredBarPenColor write FStoredBarPenColor;
property StoredBarPenWidth : Integer read FStoredBarPenWidth write FStoredBarPenWidth;
property StoredBarPenStyle : TPenStyle read FStoredBarPenStyle write FStoredBarPenStyle;
property StoredBarBrushColor : TColor read FStoredBarBrushColor write FStoredBarBrushColor;
property StoredBarBrushStyle : TBrushStyle read FStoredBarBrushStyle write FStoredBarBrushStyle;
property Count : Integer read FCount write FCount;
property X [const Index: Integer]: Double read GetX write SetX;
property Y [const Index: Integer]: Double read GetY write SetY;
property Null [const Index: Integer]: Boolean read GetNull write SetNull;
property Empty [const Index: Integer]: Boolean read GetEmpty write SetEmpty;
property High [const Index: Integer]: Double read GetHigh write SetHigh;
property Low [const Index: Integer]: Double read GetLow write SetLow;
property Open [const Index: Integer]: Double read GetOpen write SetOpen;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -