Skip to content

Commit

Permalink
Beta 12 interface sections
Browse files Browse the repository at this point in the history
  • Loading branch information
David Berneda committed May 25, 2016
1 parent ee67eef commit aa46ad4
Show file tree
Hide file tree
Showing 44 changed files with 523 additions and 240 deletions.
2 changes: 1 addition & 1 deletion demos/delphi/vcl/Import/Import_FromComponents.pas
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ procedure TFromComponents.ImportDataset;
begin
BIGrid2.DestroyData;

BIGrid2.Data:=TBIDB.FromDataSet(ClientDataSet1);
BIGrid2.Data:=TBIDB.From(ClientDataSet1);
end;

procedure TFromComponents.Memo1Change(Sender: TObject);
Expand Down
46 changes: 9 additions & 37 deletions demos/delphi/vcl/TeeChart/Import Series/Unit_Main.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -81,45 +81,8 @@ object SeriesImport: TSeriesImport
View3DOptions.Perspective = 0
View3DOptions.Rotation = 360
TabOrder = 0
ExplicitHeight = 250
DefaultCanvas = 'TGDIPlusCanvas'
ColorPaletteIndex = 9
object Series1: TPieSeries
XValues.Order = loAscending
YValues.Name = 'Pie'
YValues.Order = loNone
Frame.InnerBrush.BackColor = clRed
Frame.InnerBrush.Gradient.EndColor = clGray
Frame.InnerBrush.Gradient.MidColor = clWhite
Frame.InnerBrush.Gradient.StartColor = 4210752
Frame.InnerBrush.Gradient.Visible = True
Frame.MiddleBrush.BackColor = clYellow
Frame.MiddleBrush.Gradient.EndColor = 8553090
Frame.MiddleBrush.Gradient.MidColor = clWhite
Frame.MiddleBrush.Gradient.StartColor = clGray
Frame.MiddleBrush.Gradient.Visible = True
Frame.OuterBrush.BackColor = clGreen
Frame.OuterBrush.Gradient.EndColor = 4210752
Frame.OuterBrush.Gradient.MidColor = clWhite
Frame.OuterBrush.Gradient.StartColor = clSilver
Frame.OuterBrush.Gradient.Visible = True
Frame.Width = 4
OtherSlice.Legend.Visible = False
Data = {
04080000000000000000E07C40FF04000000436172730000000000C08040FF06
00000050686F6E65730000000000688340FF060000005461626C657300000000
00807140FF080000004D6F6E69746F72730000000000006740FF050000004C61
6D70730000000000107140FF090000004B6579626F617264730000000000E079
40FF0500000042696B65730000000000E06440FF06000000436861697273}
Detail = {0000000000}
end
object MarkTips1: TMarksTipTool
Format.CustomPosition = True
Format.Left = 0
Format.TextAlignment = taCenter
Format.Top = 0
Format.Visible = False
end
end
end
object BIGrid1: TBIGrid
Expand Down Expand Up @@ -192,6 +155,15 @@ object SeriesImport: TSeriesImport
TabOrder = 2
DefaultCanvas = 'TGDIPlusCanvas'
ColorPaletteIndex = 13
object Series1: TPointSeries
ClickableLine = False
Pointer.InflateMargins = True
Pointer.Style = psRectangle
XValues.Name = 'X'
XValues.Order = loAscending
YValues.Name = 'Y'
YValues.Order = loNone
end
end
object Panel1: TPanel
Left = 0
Expand Down
15 changes: 10 additions & 5 deletions demos/delphi/vcl/TeeChart/Import Series/Unit_Main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, VclTee.TeeGDIPlus, VCLTee.TeEngine,
VCLTee.Series, BI.VCL.Grid, Vcl.ExtCtrls, VCLTee.TeeProcs, VCLTee.Chart,
BI.VCL.Chart, Vcl.StdCtrls, VCLTee.TeeTools, BI.VCL.DataControl;
BI.VCL.Chart, Vcl.StdCtrls, BI.VCL.DataControl;

type
TSeriesImport = class(TForm)
Expand All @@ -17,7 +17,7 @@ TSeriesImport = class(TForm)
Button1: TButton;
Button2: TButton;
BITChart1: TBITChart;
Series1: TPieSeries;
Series1: TPointSeries;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure Button1Click(Sender: TObject);
Expand All @@ -39,8 +39,7 @@ implementation

procedure TSeriesImport.Button1Click(Sender: TObject);
begin
BIChart1.Clear;
BIChart1.Fill(BIGrid1.Data);
BIChart1.Data:=BIGrid1.Data;
end;

procedure TSeriesImport.Button2Click(Sender: TObject);
Expand All @@ -55,11 +54,17 @@ procedure TSeriesImport.Button2Click(Sender: TObject);

procedure TSeriesImport.FormCreate(Sender: TObject);
begin
// Fill Series1 with random sample values
Series1.FillSampleValues;

// Convert Series1 to a TDataItem
BIGrid1.Data:=TChartData.From(Series1);

// Convert a TDataItem to a new Series
Chart1.AddSeries(TChartData.From(BIGrid1.Data, Self, TPieSeries));
Chart1.AddSeries(TChartData.From(BIGrid1.Data, Self, TLineSeries));

// Free Series1
Series1.Free;
end;

procedure TSeriesImport.FormDestroy(Sender: TObject);
Expand Down
28 changes: 9 additions & 19 deletions demos/delphi/vcl/TeeChart/Import Series/Unit_XYTest.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -106,27 +106,8 @@ object FormXYTest: TFormXYTest
TopAxis.TicksInner.Color = 11119017
TopAxis.Title.Font.Name = 'Verdana'
TabOrder = 0
ExplicitWidth = 400
ExplicitHeight = 250
DefaultCanvas = 'TGDIPlusCanvas'
ColorPaletteIndex = 9
object Series1: TPointSeries
ColorEachPoint = True
ClickableLine = False
Pointer.InflateMargins = True
Pointer.Style = psCircle
XValues.Name = 'X'
XValues.Order = loAscending
YValues.Name = 'Y'
YValues.Order = loNone
end
object MarkTips1: TMarksTipTool
Format.CustomPosition = True
Format.Left = 0
Format.TextAlignment = taCenter
Format.Top = 0
Format.Visible = False
end
end
end
object Chart1: TChart
Expand Down Expand Up @@ -187,6 +168,15 @@ object FormXYTest: TFormXYTest
TabOrder = 1
DefaultCanvas = 'TGDIPlusCanvas'
ColorPaletteIndex = 13
object Series1: TPointSeries
ClickableLine = False
Pointer.InflateMargins = True
Pointer.Style = psRectangle
XValues.Name = 'X'
XValues.Order = loAscending
YValues.Name = 'Y'
YValues.Order = loNone
end
end
end
end
9 changes: 7 additions & 2 deletions demos/delphi/vcl/TeeChart/Import Series/Unit_XYTest.pas
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, VclTee.TeeGDIPlus, VCLTee.TeEngine,
VCLTee.Series, BI.VCL.Grid, VCLTee.TeeTools, Vcl.ExtCtrls, VCLTee.TeeProcs,
VCLTee.Series, BI.VCL.Grid, Vcl.ExtCtrls, VCLTee.TeeProcs,
VCLTee.Chart, BI.VCL.Chart, BI.VCL.DataControl;

type
Expand Down Expand Up @@ -33,7 +33,6 @@ procedure TFormXYTest.FormCreate(Sender: TObject);
var t : Integer;
begin
// Fill series with random XY values

Series1.Clear;

Series1.XValues.Order:=TChartListOrder.loNone;
Expand All @@ -51,6 +50,12 @@ procedure TFormXYTest.FormCreate(Sender: TObject);
(Chart1[0] as TPointSeries).Pointer.Style:=psCircle;
Chart1[0].ColorEachPoint:=True;
Chart1.View3D:=False;

// Free Series1
Series1.Free;

// Test automatic charting of Grid data
BIChart1.Data:=BIGrid1.Data;
end;

procedure TFormXYTest.FormDestroy(Sender: TObject);
Expand Down
5 changes: 4 additions & 1 deletion src/delphi/BI.Data.DB.BDE.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

interface

// "Engine" class to support importing BDE ("Borland Database Engine")
// databases, tables and queries (TDatabase, TTable and TQuery components)

uses
System.Classes, System.Types,
Data.DB, BDE.DBTables, BI.Data, BI.Data.DB, BI.Persist, BI.DataSource;
Expand All @@ -25,10 +28,10 @@ TDBBDEEngine=class(TBIDBEngine)
class function DriverToName(const ADriver:String):String; override;
class function GetConnectionName(const AConnection:TCustomConnection):String; override;
class function GetDriver(const AIndex:Integer):String; override;
class function GetItemNames(const AConnection:TCustomConnection; const IncludeSystem:Boolean):TStrings; override;
class function GetKeyFieldNames(const AConnection:TCustomConnection; const ATable:String):TStrings; override;
class function GetSchemas(const AConnection:TCustomConnection):TStrings;
class function GetTable(const AConnection:TCustomConnection; const AName:String):TDataSet; override;
class function GetTableNames(const AConnection:TCustomConnection):TStrings; override;
class procedure GuessForeignKeys(const AName:String; const Table:TDataSet; const AData:TDataItem; const Source:TBISource); override;
class function ImportFile(const Source:TBIDB; const AFileName:String):TDataArray; override;
class function Supports(const Extension:String):Boolean; override;
Expand Down
12 changes: 7 additions & 5 deletions src/delphi/BI.Data.Dataset.pas
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ TBIDataSetSource=class(TBIFileSource)
procedure GuessFields(const ADataSet:TDataSet; const AData:TDataItem);
procedure LoadData(const ADataSet:TDataSet; const AData:TDataItem);
public
class procedure AddItemFields(const AFields:TFieldDefs; const AItems:TDataArray); static;
class procedure AddItemField(const AFields:TFieldDefs; const AData:TDataItem); static;
class procedure Add(const AFields:TFieldDefs; const AItems:TDataArray); overload; static;
class procedure Add(const AFields:TFieldDefs; const AData:TDataItem); overload; static;

class function FieldKind(const AFieldType:TFieldType):TDataKind; static;
class function FieldOfData(const AData:TDataItem; const ADataSet:TDataSet):TField; static;
class function FieldOf(const AData:TDataItem; const ADataSet:TDataSet):TField; static;

class function FromDataSet(const ADataSet:TDataSet; const AName:String=''):TDataItem;
class function FromField(const AField:TField; const AName:String=''):TDataItem;
class function From(const ADataSet:TDataSet; const AName:String=''):TDataItem; overload; static;
class function From(const AField:TField; const AName:String=''):TDataItem; overload; static;
class function From(const AFields:Array of TField; const AName:String=''):TDataItem; overload; static;
class function From(const AConnection:TCustomConnection; const AName:String=''):TDataItem; overload; static;

function Import(const AField:TField; const AName:String=''):TDataItem; overload;
function Import(const ADataSet:TDataSet; const AName:String=''):TDataItem; overload;
Expand Down
6 changes: 3 additions & 3 deletions src/delphi/BI.Data.pas
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ TMasterDetail=record
end;

var
FDataMap : TDataMap;
FHistory : TImportHistory;
FItems : TDataItems;

Expand Down Expand Up @@ -281,6 +280,7 @@ TMasterDetail=record
procedure SetProvider(const Value: TDataProvider);
protected
FCount : TInteger;
FDataMap : TDataMap;
FKind : TDataKind;
FStats : TDataStats;

Expand Down Expand Up @@ -312,11 +312,10 @@ TMasterDetail=record

function MaxTextLength:Integer;

procedure SetInternalDate(const ADate:TDateTimePart);
procedure CheckEmptyName;
procedure ClearDelay;
procedure CloneData(const ASource:TDataItem; const AStart,ACount:TInteger);
function CreateMap:TDataMap;
class function CreateMap(const AKind:TDataKind):TDataMap;
function CreateStats:TDataStats;

function ExistsBefore(const AIndex:TInteger):Boolean;
Expand All @@ -326,6 +325,7 @@ TMasterDetail=record
function HasItems:Boolean; inline;
function HasMaster:Boolean;

procedure SetInternalDate(const ADate:TDateTimePart);
procedure SwapRows(const A,B:TInteger); //virtual;
public
// Arrays containing the data values:
Expand Down
Loading

0 comments on commit aa46ad4

Please sign in to comment.