home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 25: Programming / pc_actual_25.iso / Delphi / TeeChartPro / TeeChart5Delphi5Eval.exe / %MAINDIR% / Delphi5 / QuickReport / TeeQrTeeReg.pas < prev   
Encoding:
Pascal/Delphi Source File  |  2001-09-10  |  1.7 KB  |  72 lines

  1. {**********************************************}
  2. {  TeeChart for QuickReport                    }
  3. {  Component Registration Unit.                }
  4. {                                              }
  5. {  Copyright (c) 1996-2000 by David Berneda    }
  6. {  All Rights Reserved                         }
  7. {**********************************************}
  8. {$I teedefs.inc}
  9. unit TeeQRTeeReg;
  10.  
  11. interface
  12.  
  13. procedure Register;
  14.  
  15. implementation
  16.  
  17. Uses Classes, DBChart, TeeConst, QRTee, SysUtils, DsgnIntf, TeeAbout,
  18.      TeePrevi, TeEngine, TeExport, EditChar, TeeChartReg, Chart
  19.      {$IFNDEF NOUSE_BDE}
  20.      ,DBEditCh
  21.      {$ENDIF}
  22.      ;
  23.  
  24. {$R TeeQR.res}
  25.  
  26. type
  27.   TQRChartCompEditor=class(TChartCompEditor)
  28.   protected
  29.     Function Chart:TCustomChart; override;
  30.   end;
  31.  
  32.   TQRChartProperty=class(TClassProperty)
  33.   public
  34.     procedure Edit; override;
  35.     function GetValue: string; override;
  36.     function GetAttributes : TPropertyAttributes; override;
  37.   end;
  38.  
  39. { QRChart Editor }
  40. Function TQRChartCompEditor.Chart:TCustomChart;
  41. begin
  42.   result:=TQRChart(Component).Chart;
  43. end;
  44.  
  45. { QRChart property Editor }
  46. procedure TQRChartProperty.Edit;
  47. begin
  48.   EditChartDesign(TCustomChart(GetOrdValue));
  49.   Designer.Modified;
  50. end;
  51.  
  52. function TQRChartProperty.GetAttributes: TPropertyAttributes;
  53. begin
  54.   Result := [paDialog];
  55. end;
  56.  
  57. function TQRChartProperty.GetValue: string;
  58. begin
  59.   FmtStr(Result, '(%s)', [GetPropType^.Name]);
  60. end;
  61.  
  62. procedure Register;
  63. begin
  64.   RegisterNoIcon([TQRDBChart]);
  65.   RegisterComponents( tcQReport,[TQRChart] );
  66.   RegisterComponentEditor(TQRChart,TQRChartCompEditor);
  67.   RegisterPropertyEditor( TypeInfo(TQRDBChart),TQRChart,'',TQRChartProperty);
  68.   RegisterNonActiveX([TQRDBChart,TQRChart] , axrIncludeDescendants );
  69. end;
  70.  
  71. end.
  72.