⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qistripchart.pas

📁 iocopm3.04源码,一套很好的工控开发工具
💻 PAS
📖 第 1 页 / 共 5 页
字号:
{*******************************************************}
{                                                       }
{       TiStripChart Component                          }
{                                                       }
{       Copyright (c) 1997,2003 Iocomp Software         }
{                                                       }
{*******************************************************}
{$I iInclude.inc}

{$ifdef iVCL}unit  iStripChart;{$endif}
{$ifdef iCLX}unit QiStripChart;{$endif}

interface

uses
  {$I iIncludeUses.inc}
  {$IFDEF iVCL} Printers,  iTypes,  iGPFunctions,  iClasses,  iMath,  iDoubleList,  iCustomComponent;{$ENDIF}
  {$IFDEF iCLX}QPrinters, QiTypes, QiGPFunctions, QiClasses, QiMath, QiDoubleList, QiCustomComponent;{$ENDIF}

const
  TIME_HOUR   = 1/24;
  TIME_MINUTE = TIME_HOUR/60;
  TIME_SECOND = TIME_MINUTE/60;

type
  TiAutoScroll           = (iasSmooth, iasStep, iasPage, iasSmoothOffset);
  TiStripChartMode       = (iscmPlot, iscmScrollX, iscmScrollY, iscmScrollXY, iscmCursor, iscmZoomX, iscmZoomY, iscmZoomXY, iscmZoomBox);
  TiAutoScrollFirstStyle = (iasfsAuto, iasfsLeftJustify, iasfsRightJustify);

  TiStripChart = class(TiCustomComponent)
  private
    FPrinterCommentList           : TStringList;
    FMouseDownX                   : Integer;
    FMouseDownY                   : Integer;
    FZoomMouseDownX               : Integer;
    FZoomMouseDownY               : Integer;
    FZoomMouseUpX                 : Integer;
    FZoomMouseUpY                 : Integer;

    //Kylix TODO
    {$ifndef iCLX}
    FMetaFile                     : TMetafile;
    {$endif}
    FSnapShotPicture              : TPicture;

    FElapsedStartTime             : TDateTime;

    FLimitLinesOnTop              : Boolean;
    FGridLinesOnTop               : Boolean;

    FOriginalXMax                 : Double;
    FOriginalXMin                 : Double;
    FOriginalYMax                 : Double;
    FOriginalYMin                 : Double;

    FCursorChannel                : Integer;
    FCursorIndex                  : Integer;

    FToolBarButtonIndex           : Integer;

    FToolBarTop                   : Integer;
    FToolBarBottom                : Integer;
    FToolBarHeight                : Integer;
    FToolBarVCenter               : Integer;

    FPlotTextStart                : Integer;
    FScrollXTextStart             : Integer;
    FScrollYTextStart             : Integer;
    FScrollXYTextStart            : Integer;
    FCursorTextStart              : Integer;
    FZoomXTextStart               : Integer;
    FZoomYTextStart               : Integer;
    FZoomXYTextStart              : Integer;
    FZoomBoxTextStart             : Integer;

    FPlotTextStop                 : Integer;
    FScrollXTextStop              : Integer;
    FScrollYTextStop              : Integer;
    FScrollXYTextStop             : Integer;
    FCursorTextStop               : Integer;
    FZoomXTextStop                : Integer;
    FZoomYTextStop                : Integer;
    FZoomXYTextStop               : Integer;
    FZoomBoxTextStop              : Integer;

    FMinXAxisData                 : Double;
    FMaxXAxisData                 : Double;
    FMinYAxisData                 : Double;
    FMaxYAxisData                 : Double;
    FIndexList                    : TiDoubleList;
    FPlotStartIndex               : Integer;
    FPlotStopIndex                : Integer;

    FNeedsDataUpdate              : Boolean;
    FFirstDataPoint               : Boolean;

    FChannelList                  : TStringList;
    FLabelChannelList             : TStringList;
    FVerticalLineList             : TStringList;
    FXMLCommentList               : TStringList;
    FMouseDown                    : Boolean;
    FGridLeft                     : Integer;
    FGridTop                      : Integer;
    FGridBottom                   : Integer;
    FGridRight                    : Integer;
    FXAxisLabelTop                : Integer;
    FXAxisLabelBottom             : Integer;
    FXAxisTitleTop                : Integer;
    FYAxisLabelRight              : Integer;
    FYAxisTitleRight              : Integer;
    FXAxisWidth                   : Integer;
    FYAxisHeight                  : Integer;
    FTitleBottom                  : Integer;
    FLegendLeft                   : Integer;
    FLegendTop                    : Integer;
    FLegendRight                  : Integer;
    FLegendBottom                 : Integer;
    FLegendRowHeight              : Integer;

    FXAxisMax                     : Double;
    FXAxisMin                     : Double;
    FXAxisShow                    : Boolean;
    FXAxisMargin                  : Integer;
    FXAxisDateTimeEnabled         : Boolean;
    FXAxisDateTimeFormatString    : String;
    FXAxisTickMajorCount          : Integer;
    FXAxisTickMajorLength         : Integer;
    FXAxisTickMajorColor          : TColor;
    FXAxisTickMinorCount          : Integer;
    FXAxisTickMinorLength         : Integer;
    FXAxisTickMinorColor          : TColor;
    FXAxisLabelFont               : TFont;
    FXAxisLabelMargin             : Integer;
    FXAxisLabelPrecision          : Integer;
    FXAxisTitle                   : String;
    FXAxisTitleFont               : TFont;
    FXAxisTitleMargin             : Integer;

    FYAxisMax                     : Double;
    FYAxisMin                     : Double;
    FYAxisReverseScale            : Boolean;
    FYAxisShow                    : Boolean;
    FYAxisMargin                  : Integer;
    FYAxisTickMajorCount          : Integer;
    FYAxisTickMajorLength         : Integer;
    FYAxisTickMajorColor          : TColor;
    FYAxisTickMinorColor          : TColor;
    FYAxisTickMinorCount          : Integer;
    FYAxisTickMinorLength         : Integer;
    FYAxisLabelFont               : TFont;
    FYAxisLabelMargin             : Integer;
    FYAxisLabelPrecision          : Integer;
    FYAxisTitleMargin             : Integer;
    FYAxisTitle                   : String;
    FYAxisTitleFont               : TFont;
    FYAxisLabelWidthFixed         : Boolean;
    FYAxisLabelWidth              : Integer;

    FOuterMarginTop               : Integer;
    FOuterMarginLeft              : Integer;
    FOuterMarginRight             : Integer;
    FOuterMarginBottom            : Integer;

    FAxisGridColor                : TColor;
    FGridLineStyle                : TiChannelLineStyle;
    FGridBackGroundColor          : TColor;
    FShowGrid                     : Boolean;
    FShowLegend                   : Boolean;
    FLegendWidth                  : Integer;
    FLegendMargin                 : Integer;
    FShowToolBar                  : Boolean;
    FLegendFont                   : TFont;
    FTitleText                    : String;
    FTitleMargin                  : Integer;
    FTitleFont                    : TFont;
    FAutoScrollEnabled            : Boolean;
    FAutoScrollType               : TiAutoScroll;
    FAutoScrollStepSize           : Double;
    FAutoScaleEnabled             : Boolean;
    FAutoScaleHysterisis          : Double;
    FToolBarActiveModeFont        : TFont;
    FToolBarInactiveModeFont      : TFont;
    FToolBarMode                  : TiStripChartMode;
    FCursorColor                  : TColor;
    FCursorChannelBackGroundColor : TColor;
    FCursorChannelFontColor       : TColor;
    FOnDataUpdate                 : TNotifyEvent;
    FOnModeChange                 : TNotifyEvent;
    FOnCursorChange               : TNotifyEvent;
    FOnXAxisMaxChange             : TNotifyEvent;
    FOnYAxisMaxChange             : TNotifyEvent;
    FOnXAxisMinChange             : TNotifyEvent;
    FOnYAxisMinChange             : TNotifyEvent;
    //Kylix TODO
    {$ifndef iCLX}
    FPrinterOrientation           : TPrinterOrientation;
    {$endif}
    FRestoreXYAxisOnPlotMode      : Boolean;
    FPrinterMarginRight           : Double;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -