Merged revision(s) 50753 #7a2d742620, 50756 #fe611b631f, 50758 #14381c96ad, 50760 #b8d8533ff8, 50814 #ed23ab0554, 50853 #1c76f725c5, 50856 #b4e20416f1 from trunk:

TAChart: Localization (work in progress - please do not provide translations at this stage...)
........
TAChart: Combine all po files in a single file (TAChartStrConsts)
........
TAChart: Complete localization
........
TAChart: Swedish translation by "kapibara"
........
Finnish translation for TAChart by Seppo Suutarla.
........
TAChart: improved i18n (and cleaned up unused string), regenerated translations and added Russian translation
........
TAChart: Overload "RegisterSeriesClass", "RegisterChartToolClass", and "RegisterAxisTransformClass" with old version accepting a string as parameter
........

git-svn-id: branches/fixes_1_6@50876 -
This commit is contained in:
maxim 2015-12-17 21:49:22 +00:00
parent b9cef54a8d
commit 0ea790b8d3
25 changed files with 1324 additions and 100 deletions

6
.gitattributes vendored
View File

@ -4093,6 +4093,11 @@ components/tachart/icons/tintervalchartsource.png -text svneol=unset#images/png
components/tachart/icons/tlistchartsource.png -text svneol=unset#images/png
components/tachart/icons/trandomchartsource.png -text svneol=unset#images/png
components/tachart/icons/tuserdefinedchartsource.png -text svneol=unset#images/png
components/tachart/languages/tachartstrconsts.de.po svneol=native#text/plain
components/tachart/languages/tachartstrconsts.fi.po svneol=native#text/plain
components/tachart/languages/tachartstrconsts.po svneol=native#text/plain
components/tachart/languages/tachartstrconsts.ru.po svneol=native#text/plain
components/tachart/languages/tachartstrconsts.se.po svneol=native#text/plain
components/tachart/numlib_fix/direct.inc svneol=native#text/pascal
components/tachart/numlib_fix/ipf.pas svneol=native#text/pascal
components/tachart/numlib_fix/mdt.pas svneol=native#text/pascal
@ -4114,6 +4119,7 @@ components/tachart/tachartlazaruspkg.pas svneol=native#text/plain
components/tachart/tachartlistbox.pas svneol=native#text/pascal
components/tachart/tachartprint.lpk svneol=native#text/plain
components/tachart/tachartprint.pas svneol=native#text/pascal
components/tachart/tachartstrconsts.pas svneol=native#text/plain
components/tachart/tachartteechart.pas svneol=native#text/pascal
components/tachart/tachartutils.pas svneol=native#text/plain
components/tachart/tachartwmf.lpk svneol=native#text/plain

12
.gitignore vendored
View File

@ -261,6 +261,18 @@ components/tachart/demo/wmf/*.res
components/tachart/demo/wmf/*.wmf
components/tachart/demo/wmf/lib
components/tachart/fpdoc/html/*
components/tachart/languages/tachartutils.de.po
components/tachart/languages/tachartutils.po
components/tachart/languages/tadatapointseditor.de.po
components/tachart/languages/tadatapointseditor.po
components/tachart/languages/taserieseditor.de.po
components/tachart/languages/taserieseditor.po
components/tachart/languages/tasubcomponentseditor.de.po
components/tachart/languages/tasubcomponentseditor.po
components/tachart/languages/tatooleditors.de.po
components/tachart/languages/tatooleditors.po
components/tachart/languages/tatransformations.de.po
components/tachart/languages/tatransformations.po
components/tachart/lib
components/tachart/test/*.exe
components/tachart/test/*.lps

View File

@ -3,10 +3,10 @@ object DataPointsEditorForm: TDataPointsEditorForm
Height = 303
Top = 235
Width = 357
Caption = 'DataPoints editor'
ClientHeight = 303
ClientWidth = 357
LCLVersion = '0.9.31'
OnCreate = FormCreate
LCLVersion = '1.7'
object sgData: TStringGrid
Left = 0
Height = 257
@ -18,32 +18,28 @@ object DataPointsEditorForm: TDataPointsEditorForm
item
Alignment = taRightJustify
Title.Alignment = taCenter
Title.Caption = 'X'
Title.Font.Style = [fsBold]
Title.PrefixOption = poNone
Title.Caption = 'X'
Width = 80
end
item
Alignment = taRightJustify
Title.Alignment = taCenter
Title.Caption = 'Y'
Title.Font.Style = [fsBold]
Title.PrefixOption = poNone
Title.Caption = 'Y'
Width = 80
end
item
ButtonStyle = cbsEllipsis
Title.Alignment = taCenter
Title.Caption = 'Color'
Title.Font.Style = [fsBold]
Title.PrefixOption = poNone
Title.Caption = 'Color'
Width = 80
end
item
Title.Alignment = taCenter
Title.Caption = 'Text'
Title.Font.Style = [fsBold]
Title.PrefixOption = poNone
Title.Caption = 'Text'
Width = 81
end>
DefaultColWidth = 32
@ -66,9 +62,13 @@ object DataPointsEditorForm: TDataPointsEditorForm
Top = 263
Width = 345
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
HelpButton.Name = 'HelpButton'
HelpButton.DefaultCaption = True
CloseButton.Name = 'CloseButton'
CloseButton.DefaultCaption = True
CancelButton.Name = 'CancelButton'
CancelButton.DefaultCaption = True
TabOrder = 1
ShowButtons = [pbOK, pbCancel]
end

View File

@ -18,6 +18,9 @@ uses
Graphics, Dialogs;
type
{ TDataPointsEditorForm }
TDataPointsEditorForm = class(TForm)
ButtonPanel1: TButtonPanel;
cdItemColor: TColorDialog;
@ -25,6 +28,7 @@ type
miDeleteRow: TMenuItem;
pmRows: TPopupMenu;
sgData: TStringGrid;
procedure FormCreate(Sender: TObject);
procedure miDeleteRowClick(Sender: TObject);
procedure miInsertRowClick(Sender: TObject);
procedure pmRowsPopup(Sender: TObject);
@ -46,7 +50,8 @@ procedure Register;
implementation
uses
LCLIntf, Math, PropEdits, TAChartUtils, TASources;
LCLIntf, Math, PropEdits,
TAChartStrConsts, TAChartUtils, TASources;
{$R *.lfm}
@ -122,6 +127,15 @@ begin
sgData.DeleteRow(FCurrentRow);
end;
procedure TDataPointsEditorForm.FormCreate(Sender: TObject);
begin
Caption := desDatapointEditor;
sgData.Columns[2].Title.Caption := desColor;
sgData.Columns[3].Title.Caption := desText;
miInsertRow.Caption := desInsertRow;
miDeleteRow.Caption := desDeleteRow;
end;
procedure TDataPointsEditorForm.miInsertRowClick(Sender: TObject);
begin
sgData.InsertColRow(false, FCurrentRow);

View File

@ -23,14 +23,12 @@ interface
procedure Register;
resourcestring
sesSeriesEditorTitle = 'Edit series';
implementation
uses
Classes, ComponentEditors, Forms, Menus, PropEdits, SysUtils,
TAGraph, TASubcomponentsEditor;
TAChartStrConsts, TAGraph, TASubcomponentsEditor;
type
{ TSeriesComponentEditor }
@ -120,7 +118,7 @@ var
i: Integer;
begin
for i := 0 to SeriesClassRegistry.Count - 1 do
AddSubcomponentClass(SeriesClassRegistry[i], i);
AddSubcomponentClass(SeriesClassRegistry.GetCaption(i), i);
end;
function TSeriesEditorForm.GetChildrenList: TFPList;
@ -131,7 +129,7 @@ end;
function TSeriesEditorForm.MakeSubcomponent(
AOwner: TComponent; ATag: Integer): TComponent;
begin
Result := TSeriesClass(SeriesClassRegistry.Objects[ATag]).Create(AOwner);
Result := TSeriesClass(SeriesClassRegistry.GetClass(ATag)).Create(AOwner);
end;
end.

View File

@ -10,7 +10,7 @@ object ComponentListEditorForm: TComponentListEditorForm
OnCreate = FormCreate
OnDestroy = FormDestroy
Position = poScreenCenter
LCLVersion = '1.1'
LCLVersion = '1.7'
object ChildrenListBox: TListBox
Left = 0
Height = 198

View File

@ -92,7 +92,8 @@ type
implementation
uses
IDEImagesIntf, Math, SysUtils, TAChartUtils;
IDEImagesIntf, Math, SysUtils,
TAChartStrConsts, TAChartUtils;
{$R *.lfm}
@ -229,6 +230,10 @@ begin
tbDelete.ImageIndex := IDEImages.LoadImage(16, 'laz_delete');
tbMoveDown.ImageIndex := IDEImages.LoadImage(16, 'arrow_down');
tbMoveUp.ImageIndex := IDEImages.LoadImage(16, 'arrow_up');
tbAdd.Caption := rsAdd;
tbDelete.Caption := rsDelete;
tbMoveUp.Caption := rsMoveUp;
tbMoveDown.Caption := rsMoveDown;
end;
procedure TComponentListEditorForm.FormDestroy(Sender: TObject);

View File

@ -17,14 +17,11 @@ interface
procedure Register;
resourcestring
tasToolsEditorTitle = 'Edit tools';
implementation
uses
Classes, ComponentEditors, Forms, PropEdits, SysUtils,
TATools, TASubcomponentsEditor;
TAChartStrConsts, TATools, TASubcomponentsEditor;
type
{ TToolsComponentEditor }
@ -116,7 +113,7 @@ var
i: Integer;
begin
for i := 0 to ToolsClassRegistry.Count - 1 do
AddSubcomponentClass(ToolsClassRegistry[i], i);
AddSubcomponentClass(ToolsClassRegistry.GetCaption(i), i);
end;
function TToolsEditorForm.GetChildrenList: TFPList;
@ -127,7 +124,7 @@ end;
function TToolsEditorForm.MakeSubcomponent(
AOwner: TComponent; ATag: Integer): TComponent;
begin
Result := TChartToolClass(ToolsClassRegistry.Objects[ATag]).Create(AOwner);
Result := TChartToolClass(ToolsClassRegistry.GetClass(ATag)).Create(AOwner);
end;
end.

View File

@ -0,0 +1,204 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Project-Id-Version: tachartlazaruspkg\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: de\n"
"X-Generator: Poedit 1.8.6\n"
"X-Poedit-SourceCharset: UTF-8\n"
#: tachartstrconsts.descolor
msgid "Color"
msgstr "Farbe"
#: tachartstrconsts.desdatapointeditor
msgid "DataPoints editor"
msgstr "Datenpunkt-Editor"
#: tachartstrconsts.desdeleterow
msgid "Delete row"
msgstr "Zeile löschen"
#: tachartstrconsts.desinsertrow
msgid "Insert row"
msgstr "Zeile einfügen"
#: tachartstrconsts.destext
msgid "Text"
msgstr "Text"
#: tachartstrconsts.rsadd
msgid "Add"
msgstr "Hinzuf."
#: tachartstrconsts.rsareaseries
msgid "Area series"
msgstr "Fläche-Diagramm"
#: tachartstrconsts.rsautoscale
msgid "Auto scale"
msgstr "Auto-Skalierung"
#: tachartstrconsts.rsbarseries
msgid "Bar series"
msgstr "Säulen/Balken-Diagramm"
#: tachartstrconsts.rsboxandwhiskerseries
msgid "Box-and-whiskers series"
msgstr "Box-und-Whisker-Plot"
#: tachartstrconsts.rsbsplineseries
msgid "B-Spline series"
msgstr "B-Spline"
#: tachartstrconsts.rsbubbleseries
msgid "Bubble series"
msgstr "Blasen-Diagramm"
#: tachartstrconsts.rscolormapseries
msgid "Color map series"
msgstr "Farbkarten-Plot"
#: tachartstrconsts.rsconstantline
msgid "Constant line"
msgstr "Konstante Linie"
#: tachartstrconsts.rscubicsplineseries
msgid "Cubic spline series"
msgstr "Kubischer Spline"
#: tachartstrconsts.rscumulativenormaldistribution
msgid "Cumulative normal distribution"
msgstr "Kumulative Normalverteilung"
#: tachartstrconsts.rsdatapointclick
msgid "Data point click"
msgstr "Klick auf Datenpunkt"
#: tachartstrconsts.rsdatapointcrosshair
msgid "Data point crosshair"
msgstr "Fadenkreuz für Datenpunkte"
#: tachartstrconsts.rsdatapointdrag
msgid "Data point drag"
msgstr "Datenpunkt verschieben"
#: tachartstrconsts.rsdatapointhint
msgid "Data point hint"
msgstr "Datenpunkt-Hinweis"
#: tachartstrconsts.rsdelete
msgid "Delete"
msgstr "Entf."
#: tachartstrconsts.rsdistancemeasurement
msgid "Distance measurement"
msgstr "Distanzmessung"
#: tachartstrconsts.rsfunctionseries
msgid "Function series"
msgstr "Funktions-Diagramm"
#: tachartstrconsts.rsleastsquaresfitseries
msgid "Least-squares fit series"
msgstr "Fit"
#: tachartstrconsts.rslinear
msgid "Linear"
msgstr "Linear"
#: tachartstrconsts.rslineseries
msgid "Line series"
msgstr "Linien-Diagramm"
#: tachartstrconsts.rslogarithmic
msgid "Logarithmic"
msgstr "Logarithmisch"
#: tachartstrconsts.rsmanhattanplotseries
msgid "Manhattan plot series"
msgstr "Manhatten-Plot"
#: tachartstrconsts.rsmovedown
msgid "Down"
msgstr "Ab"
#: tachartstrconsts.rsmoveup
msgid "Up"
msgstr "Auf"
#: tachartstrconsts.rsopenhighlowcloseseries
msgid "Open-high-low-close series"
msgstr "Öffnung-Höchst-Tiefst-Geschlossen"
#: tachartstrconsts.rspanningbyclick
msgid "Panning by click"
msgstr "Verschieben durch Klicken"
#: tachartstrconsts.rspanningbydrag
msgid "Panning by drag"
msgstr "Verschieben durch Ziehen"
#: tachartstrconsts.rspanningbymousewheel
msgid "Panning by mouse wheel"
msgstr "Verschieben mit Mausrad"
#: tachartstrconsts.rsparametriccurveseries
msgid "Parametric curve series"
msgstr "Parametrische Kurve"
#: tachartstrconsts.rspieseries
msgid "Pie series"
msgstr "Torten-Diagramm"
#: tachartstrconsts.rspolarseries
msgid "Polar series"
msgstr "Polar-Diagramm"
#: tachartstrconsts.rsuserdefined
msgctxt "tachartstrconsts.rsuserdefined"
msgid "User-defined"
msgstr "Benutzerdefiniert"
#: tachartstrconsts.rsuserdefinedtool
msgctxt "tachartstrconsts.rsuserdefinedtool"
msgid "User-defined"
msgstr "Benutzerdefiniert"
#: tachartstrconsts.rsuserdrawnseries
msgid "User-drawn series"
msgstr "Benutzer-definiertes Diagramm"
#: tachartstrconsts.rszoombyclick
msgid "Zoom by click"
msgstr "Zoomen durch Klicken"
#: tachartstrconsts.rszoombydrag
msgid "Zoom by drag"
msgstr "Zommen durch Ziehen"
#: tachartstrconsts.rszoombymousewheel
msgid "Zoom by mouse-wheel"
msgstr "Zoomen mit Mausrad"
#: tachartstrconsts.sesserieseditortitle
msgid "Edit series"
msgstr "Datenreihe bearbeiten"
#: tachartstrconsts.tasaxistransformseditortitle
msgid "Edit axis transformations"
msgstr "Achsentransformation bearbeiten"
#: tachartstrconsts.tasfailedsubcomponentrename
msgid "Failed to rename components: %s"
msgstr "Fehler beim Umbenennen von Komponenten: %s"
#: tachartstrconsts.tastoolseditortitle
msgid "Edit tools"
msgstr "Werkzeuge bearbeiten"

View File

@ -0,0 +1,194 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
#: tachartstrconsts.descolor
msgid "Color"
msgstr "Väri"
#: tachartstrconsts.desdatapointeditor
msgid "DataPoints editor"
msgstr "Datapisteiden muokkain"
#: tachartstrconsts.desdeleterow
msgid "Delete row"
msgstr ""
#: tachartstrconsts.desinsertrow
msgid "Insert row"
msgstr ""
#: tachartstrconsts.destext
msgid "Text"
msgstr "Teksti"
#: tachartstrconsts.rsadd
msgid "Add"
msgstr "Lisää"
#: tachartstrconsts.rsareaseries
msgid "Area series"
msgstr "Aluekuvaaja"
#: tachartstrconsts.rsautoscale
msgid "Auto scale"
msgstr "Automaattinen skaalaus"
#: tachartstrconsts.rsbarseries
msgid "Bar series"
msgstr "Pylväskuvaaja"
#: tachartstrconsts.rsboxandwhiskerseries
msgid "Box-and-whiskers series"
msgstr "Laatikko-jana kuvaaja"
#: tachartstrconsts.rsbsplineseries
msgid "B-Spline series"
msgstr "B-käyrä kuvaaja"
#: tachartstrconsts.rsbubbleseries
msgid "Bubble series"
msgstr "Kuplakuvaaja"
#: tachartstrconsts.rscolormapseries
msgid "Color map series"
msgstr "Värikarttakuvaaja"
#: tachartstrconsts.rsconstantline
msgid "Constant line"
msgstr "Kiinteä viiva"
#: tachartstrconsts.rscubicsplineseries
msgid "Cubic spline series"
msgstr "Kuutiokäyräkuvaaja"
#: tachartstrconsts.rscumulativenormaldistribution
msgid "Cumulative normal distribution"
msgstr "Kumulatiivinen normaalijakauma"
#: tachartstrconsts.rsdatapointclick
msgid "Data point click"
msgstr "Datapisteen klikkaus"
#: tachartstrconsts.rsdatapointcrosshair
msgid "Data point crosshair"
msgstr "Datapisteen tähtäin"
#: tachartstrconsts.rsdatapointdrag
msgid "Data point drag"
msgstr "Datapisteen vetäminen"
#: tachartstrconsts.rsdatapointhint
msgid "Data point hint"
msgstr "Datapisteen vihje"
#: tachartstrconsts.rsdelete
msgid "Delete"
msgstr "Poista"
#: tachartstrconsts.rsdistancemeasurement
msgid "Distance measurement"
msgstr "Etäisyysmittaus"
#: tachartstrconsts.rsfunctionseries
msgid "Function series"
msgstr "Funktiokuvaaja"
#: tachartstrconsts.rsleastsquaresfitseries
msgid "Least-squares fit series"
msgstr "Pienimpään neliösummaan sopiva kuvaaja"
#: tachartstrconsts.rslinear
msgid "Linear"
msgstr "Lineaarinen"
#: tachartstrconsts.rslineseries
msgid "Line series"
msgstr "Viivakuvaaja"
#: tachartstrconsts.rslogarithmic
msgid "Logarithmic"
msgstr "Logaritminen"
#: tachartstrconsts.rsmanhattanplotseries
msgid "Manhattan plot series"
msgstr "Manhattan-kuvaaja"
#: tachartstrconsts.rsmovedown
msgid "Down"
msgstr "Alas"
#: tachartstrconsts.rsmoveup
msgid "Up"
msgstr "Ylös"
#: tachartstrconsts.rsopenhighlowcloseseries
msgid "Open-high-low-close series"
msgstr ""
#: tachartstrconsts.rspanningbyclick
msgid "Panning by click"
msgstr "Vieritys klikkaamalla"
#: tachartstrconsts.rspanningbydrag
msgid "Panning by drag"
msgstr "Vieritys vetämällä"
#: tachartstrconsts.rspanningbymousewheel
msgid "Panning by mouse wheel"
msgstr "Vieritys hiiren rullalla"
#: tachartstrconsts.rsparametriccurveseries
msgid "Parametric curve series"
msgstr ""
#: tachartstrconsts.rspieseries
msgid "Pie series"
msgstr "Piirakkakuvaaja"
#: tachartstrconsts.rspolarseries
msgid "Polar series"
msgstr "Napakuvaaja"
#: tachartstrconsts.rsuserdefined
msgctxt "tachartstrconsts.rsuserdefined"
msgid "User-defined"
msgstr "Käyttäjän määrittelemä"
#: tachartstrconsts.rsuserdefinedtool
#, fuzzy
msgctxt "tachartstrconsts.rsuserdefinedtool"
msgid "User-defined"
msgstr "Käyttäjän määrittelemä"
#: tachartstrconsts.rsuserdrawnseries
msgid "User-drawn series"
msgstr "Käyttäjän piirtämä kuvaaja"
#: tachartstrconsts.rszoombyclick
msgid "Zoom by click"
msgstr "Zoomaus klikkaamalla"
#: tachartstrconsts.rszoombydrag
msgid "Zoom by drag"
msgstr "Zoomaus vetämällä"
#: tachartstrconsts.rszoombymousewheel
msgid "Zoom by mouse-wheel"
msgstr "Zoomaus hiiren rullalla"
#: tachartstrconsts.sesserieseditortitle
msgid "Edit series"
msgstr "Muokkaa kuvaajia"
#: tachartstrconsts.tasaxistransformseditortitle
msgid "Edit axis transformations"
msgstr "Muokkaa akselimuunnoksia"
#: tachartstrconsts.tasfailedsubcomponentrename
msgid "Failed to rename components: %s"
msgstr "Uudelleennimeäminen epäonnistui komponenteissa: %s"
#: tachartstrconsts.tastoolseditortitle
msgid "Edit tools"
msgstr "Muokkaustyökalut"

View File

@ -0,0 +1,193 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
#: tachartstrconsts.descolor
msgid "Color"
msgstr ""
#: tachartstrconsts.desdatapointeditor
msgid "DataPoints editor"
msgstr ""
#: tachartstrconsts.desdeleterow
msgid "Delete row"
msgstr ""
#: tachartstrconsts.desinsertrow
msgid "Insert row"
msgstr ""
#: tachartstrconsts.destext
msgid "Text"
msgstr ""
#: tachartstrconsts.rsadd
msgid "Add"
msgstr ""
#: tachartstrconsts.rsareaseries
msgid "Area series"
msgstr ""
#: tachartstrconsts.rsautoscale
msgid "Auto scale"
msgstr ""
#: tachartstrconsts.rsbarseries
msgid "Bar series"
msgstr ""
#: tachartstrconsts.rsboxandwhiskerseries
msgid "Box-and-whiskers series"
msgstr ""
#: tachartstrconsts.rsbsplineseries
msgid "B-Spline series"
msgstr ""
#: tachartstrconsts.rsbubbleseries
msgid "Bubble series"
msgstr ""
#: tachartstrconsts.rscolormapseries
msgid "Color map series"
msgstr ""
#: tachartstrconsts.rsconstantline
msgid "Constant line"
msgstr ""
#: tachartstrconsts.rscubicsplineseries
msgid "Cubic spline series"
msgstr ""
#: tachartstrconsts.rscumulativenormaldistribution
msgid "Cumulative normal distribution"
msgstr ""
#: tachartstrconsts.rsdatapointclick
msgid "Data point click"
msgstr ""
#: tachartstrconsts.rsdatapointcrosshair
msgid "Data point crosshair"
msgstr ""
#: tachartstrconsts.rsdatapointdrag
msgid "Data point drag"
msgstr ""
#: tachartstrconsts.rsdatapointhint
msgid "Data point hint"
msgstr ""
#: tachartstrconsts.rsdelete
msgid "Delete"
msgstr ""
#: tachartstrconsts.rsdistancemeasurement
msgid "Distance measurement"
msgstr ""
#: tachartstrconsts.rsfunctionseries
msgid "Function series"
msgstr ""
#: tachartstrconsts.rsleastsquaresfitseries
msgid "Least-squares fit series"
msgstr ""
#: tachartstrconsts.rslinear
msgid "Linear"
msgstr ""
#: tachartstrconsts.rslineseries
msgid "Line series"
msgstr ""
#: tachartstrconsts.rslogarithmic
msgid "Logarithmic"
msgstr ""
#: tachartstrconsts.rsmanhattanplotseries
msgid "Manhattan plot series"
msgstr ""
#: tachartstrconsts.rsmovedown
msgid "Down"
msgstr ""
#: tachartstrconsts.rsmoveup
msgid "Up"
msgstr ""
#: tachartstrconsts.rsopenhighlowcloseseries
msgid "Open-high-low-close series"
msgstr ""
#: tachartstrconsts.rspanningbyclick
msgid "Panning by click"
msgstr ""
#: tachartstrconsts.rspanningbydrag
msgid "Panning by drag"
msgstr ""
#: tachartstrconsts.rspanningbymousewheel
msgid "Panning by mouse wheel"
msgstr ""
#: tachartstrconsts.rsparametriccurveseries
msgid "Parametric curve series"
msgstr ""
#: tachartstrconsts.rspieseries
msgid "Pie series"
msgstr ""
#: tachartstrconsts.rspolarseries
msgid "Polar series"
msgstr ""
#: tachartstrconsts.rsuserdefined
msgctxt "tachartstrconsts.rsuserdefined"
msgid "User-defined"
msgstr ""
#: tachartstrconsts.rsuserdefinedtool
msgctxt "tachartstrconsts.rsuserdefinedtool"
msgid "User-defined"
msgstr ""
#: tachartstrconsts.rsuserdrawnseries
msgid "User-drawn series"
msgstr ""
#: tachartstrconsts.rszoombyclick
msgid "Zoom by click"
msgstr ""
#: tachartstrconsts.rszoombydrag
msgid "Zoom by drag"
msgstr ""
#: tachartstrconsts.rszoombymousewheel
msgid "Zoom by mouse-wheel"
msgstr ""
#: tachartstrconsts.sesserieseditortitle
msgid "Edit series"
msgstr ""
#: tachartstrconsts.tasaxistransformseditortitle
msgid "Edit axis transformations"
msgstr ""
#: tachartstrconsts.tasfailedsubcomponentrename
msgid "Failed to rename components: %s"
msgstr ""
#: tachartstrconsts.tastoolseditortitle
msgid "Edit tools"
msgstr ""

View File

@ -0,0 +1,203 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: Maxim Ganetsky <maxkill@mail.ru>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
"X-Generator: Poedit 1.7.7\n"
#: tachartstrconsts.descolor
msgid "Color"
msgstr "Цвет"
#: tachartstrconsts.desdatapointeditor
msgid "DataPoints editor"
msgstr "Редактор величин"
#: tachartstrconsts.desdeleterow
msgid "Delete row"
msgstr "Удалить строку"
#: tachartstrconsts.desinsertrow
msgid "Insert row"
msgstr "Вставить строку"
#: tachartstrconsts.destext
msgid "Text"
msgstr "Текст"
#: tachartstrconsts.rsadd
msgid "Add"
msgstr "Добавить"
#: tachartstrconsts.rsareaseries
msgid "Area series"
msgstr "Диаграмма с областями"
#: tachartstrconsts.rsautoscale
msgid "Auto scale"
msgstr "Автоматический масштаб"
#: tachartstrconsts.rsbarseries
msgid "Bar series"
msgstr "Гистограмма"
#: tachartstrconsts.rsboxandwhiskerseries
msgid "Box-and-whiskers series"
msgstr "Диаграмма размаха"
#: tachartstrconsts.rsbsplineseries
msgid "B-Spline series"
msgstr "Диаграмма с B-сплайнами"
#: tachartstrconsts.rsbubbleseries
msgid "Bubble series"
msgstr "Пузырьковая диаграмма"
#: tachartstrconsts.rscolormapseries
msgid "Color map series"
msgstr "Диаграмма с картой цветов"
#: tachartstrconsts.rsconstantline
msgid "Constant line"
msgstr "Линия постоянной"
#: tachartstrconsts.rscubicsplineseries
msgid "Cubic spline series"
msgstr "Диаграмма с кубическими сплайнами"
#: tachartstrconsts.rscumulativenormaldistribution
msgid "Cumulative normal distribution"
msgstr "Масштаб нормального распределения"
#: tachartstrconsts.rsdatapointclick
msgid "Data point click"
msgstr "Щелчок по величине"
#: tachartstrconsts.rsdatapointcrosshair
msgid "Data point crosshair"
msgstr "Перекрестие для величины"
#: tachartstrconsts.rsdatapointdrag
msgid "Data point drag"
msgstr "Перетаскивание величины"
#: tachartstrconsts.rsdatapointhint
msgid "Data point hint"
msgstr "Всплывающая подсказка для величины"
#: tachartstrconsts.rsdelete
msgid "Delete"
msgstr "Удалить"
#: tachartstrconsts.rsdistancemeasurement
msgid "Distance measurement"
msgstr "Измерение расстояния"
#: tachartstrconsts.rsfunctionseries
msgid "Function series"
msgstr "Диаграмма по функции"
#: tachartstrconsts.rsleastsquaresfitseries
msgid "Least-squares fit series"
msgstr "Диаграмма по методу наименьших квадратов"
#: tachartstrconsts.rslinear
msgid "Linear"
msgstr "Линейный масштаб"
#: tachartstrconsts.rslineseries
msgid "Line series"
msgstr "График"
#: tachartstrconsts.rslogarithmic
msgid "Logarithmic"
msgstr "Логарифмический масштаб"
#: tachartstrconsts.rsmanhattanplotseries
msgid "Manhattan plot series"
msgstr "Манхэттенская диаграмма"
#: tachartstrconsts.rsmovedown
msgid "Down"
msgstr "Вниз"
#: tachartstrconsts.rsmoveup
msgid "Up"
msgstr "Вверх"
#: tachartstrconsts.rsopenhighlowcloseseries
msgid "Open-high-low-close series"
msgstr "Биржевая диаграмма"
#: tachartstrconsts.rspanningbyclick
msgid "Panning by click"
msgstr "Панорамирование щелчком"
#: tachartstrconsts.rspanningbydrag
msgid "Panning by drag"
msgstr "Панорамирование перетаскиванием"
#: tachartstrconsts.rspanningbymousewheel
msgid "Panning by mouse wheel"
msgstr "Панорамирование колёсиком мыши"
#: tachartstrconsts.rsparametriccurveseries
msgid "Parametric curve series"
msgstr "Диаграмма с параметрическими кривыми"
#: tachartstrconsts.rspieseries
msgid "Pie series"
msgstr "Круговая диаграмма"
#: tachartstrconsts.rspolarseries
msgid "Polar series"
msgstr "Лепестковая диаграмма"
#: tachartstrconsts.rsuserdefined
msgctxt "tachartstrconsts.rsuserdefined"
msgid "User-defined"
msgstr "Пользовательский масштаб"
#: tachartstrconsts.rsuserdefinedtool
msgctxt "tachartstrconsts.rsuserdefinedtool"
msgid "User-defined"
msgstr "Пользовательское средство"
#: tachartstrconsts.rsuserdrawnseries
msgid "User-drawn series"
msgstr "Пользовательская диаграмма"
#: tachartstrconsts.rszoombyclick
msgid "Zoom by click"
msgstr "Изменение масштаба щелчком"
#: tachartstrconsts.rszoombydrag
msgid "Zoom by drag"
msgstr "Изменение масштаба перетаскиванием"
#: tachartstrconsts.rszoombymousewheel
msgid "Zoom by mouse-wheel"
msgstr "Изменение масштаба колёсиком мыши"
#: tachartstrconsts.sesserieseditortitle
msgid "Edit series"
msgstr "Редактор диаграмм"
#: tachartstrconsts.tasaxistransformseditortitle
msgid "Edit axis transformations"
msgstr "Редактор масштабов осей"
#: tachartstrconsts.tasfailedsubcomponentrename
msgid "Failed to rename components: %s"
msgstr "Невозможно переименовать компоненты: %s"
#: tachartstrconsts.tastoolseditortitle
msgid "Edit tools"
msgstr "Редактор средств диаграмм"

View File

@ -0,0 +1,208 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: tachartlazaruspkg\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: se\n"
"X-Generator: Poedit 1.8.6\n"
"X-Poedit-SourceCharset: UTF-8\n"
#: tachartstrconsts.descolor
msgid "Color"
msgstr "Färg"
#: tachartstrconsts.desdatapointeditor
msgid "DataPoints editor"
msgstr "Redigera datapunkter"
#: tachartstrconsts.desdeleterow
msgid "Delete row"
msgstr ""
#: tachartstrconsts.desinsertrow
msgid "Insert row"
msgstr ""
#: tachartstrconsts.destext
msgid "Text"
msgstr "Text"
#: tachartstrconsts.rsadd
msgid "Add"
msgstr "Lägg till"
#: tachartstrconsts.rsareaseries
msgid "Area series"
msgstr "Områdesdiagram"
#: tachartstrconsts.rsautoscale
msgid "Auto scale"
msgstr "Autoskala"
#: tachartstrconsts.rsbarseries
msgid "Bar series"
msgstr "Stapeldiagram"
#: tachartstrconsts.rsboxandwhiskerseries
msgid "Box-and-whiskers series"
msgstr "Box-and-whiskers diagram"
#: tachartstrconsts.rsbsplineseries
msgid "B-Spline series"
msgstr "B-Spline diagram"
#: tachartstrconsts.rsbubbleseries
#, fuzzy
#| msgid "Bubbel series"
msgid "Bubble series"
msgstr "Bubbeldiagram"
#: tachartstrconsts.rscolormapseries
msgid "Color map series"
msgstr "Färglandskap"
#: tachartstrconsts.rsconstantline
msgid "Constant line"
msgstr "Konstant linje"
#: tachartstrconsts.rscubicsplineseries
msgid "Cubic spline series"
msgstr "Kubisk spline"
#: tachartstrconsts.rscumulativenormaldistribution
msgid "Cumulative normal distribution"
msgstr "Kumulativ normalfördelning"
#: tachartstrconsts.rsdatapointclick
msgid "Data point click"
msgstr "Klicka på datapunkt"
#: tachartstrconsts.rsdatapointcrosshair
msgid "Data point crosshair"
msgstr "Hårkors för datapunkter"
#: tachartstrconsts.rsdatapointdrag
msgid "Data point drag"
msgstr "Flytta datapunkt"
#: tachartstrconsts.rsdatapointhint
msgid "Data point hint"
msgstr "Datapunkt tips"
#: tachartstrconsts.rsdelete
msgid "Delete"
msgstr "Radera"
#: tachartstrconsts.rsdistancemeasurement
msgid "Distance measurement"
msgstr "Avståndsmätning"
#: tachartstrconsts.rsfunctionseries
msgid "Function series"
msgstr "Funktionskurva"
#: tachartstrconsts.rsleastsquaresfitseries
msgid "Least-squares fit series"
msgstr "Least-squares fit kurva"
#: tachartstrconsts.rslinear
msgid "Linear"
msgstr "Linjär"
#: tachartstrconsts.rslineseries
msgid "Line series"
msgstr "Linjediagram"
#: tachartstrconsts.rslogarithmic
msgid "Logarithmic"
msgstr "Logaritmisk"
#: tachartstrconsts.rsmanhattanplotseries
msgid "Manhattan plot series"
msgstr "Manhattan plot"
#: tachartstrconsts.rsmovedown
msgid "Down"
msgstr "Ner"
#: tachartstrconsts.rsmoveup
msgid "Up"
msgstr "Upp"
#: tachartstrconsts.rsopenhighlowcloseseries
msgid "Open-high-low-close series"
msgstr "Först-högst-lägst-sist kurva"
#: tachartstrconsts.rspanningbyclick
msgid "Panning by click"
msgstr "Panorera med klick"
#: tachartstrconsts.rspanningbydrag
msgid "Panning by drag"
msgstr "Panorera med drag"
#: tachartstrconsts.rspanningbymousewheel
msgid "Panning by mouse wheel"
msgstr "Panorera med mushjul"
#: tachartstrconsts.rsparametriccurveseries
msgid "Parametric curve series"
msgstr "parametrisk kurva"
#: tachartstrconsts.rspieseries
msgid "Pie series"
msgstr "Cirkeldiagram"
#: tachartstrconsts.rspolarseries
msgid "Polar series"
msgstr "Polardiagram"
#: tachartstrconsts.rsuserdefined
msgctxt "tachartstrconsts.rsuserdefined"
msgid "User-defined"
msgstr "Användardefinierad"
#: tachartstrconsts.rsuserdefinedtool
#, fuzzy
msgctxt "tachartstrconsts.rsuserdefinedtool"
msgid "User-defined"
msgstr "Användardefinierad"
#: tachartstrconsts.rsuserdrawnseries
msgid "User-drawn series"
msgstr "Användardefinierat diagram"
#: tachartstrconsts.rszoombyclick
msgid "Zoom by click"
msgstr "Zooma med klick"
#: tachartstrconsts.rszoombydrag
msgid "Zoom by drag"
msgstr "Zooma med drag"
#: tachartstrconsts.rszoombymousewheel
msgid "Zoom by mouse-wheel"
msgstr "Zooma med mushjul"
#: tachartstrconsts.sesserieseditortitle
msgid "Edit series"
msgstr "Redigera diagram"
#: tachartstrconsts.tasaxistransformseditortitle
msgid "Edit axis transformations"
msgstr "Redigera axelomvandlingar"
#: tachartstrconsts.tasfailedsubcomponentrename
#, c-format
msgid "Failed to rename components: %s"
msgstr "Namnbyte av komponent misslyckades: %s"
#: tachartstrconsts.tastoolseditortitle
msgid "Edit tools"
msgstr "Redigera verktyg"

View File

@ -3,6 +3,7 @@
<Package Version="4">
<PathDelim Value="\"/>
<Name Value="TAChartLazarusPkg"/>
<Type Value="RunAndDesignTime"/>
<AddToProjectUsesSection Value="True"/>
<Author Value="Luís Rodrigues (lr@neei.uevora.pt), Philippe Martinole, Alexander Klenin"/>
<CompilerOptions>
@ -28,7 +29,7 @@
for details about the copyright.
"/>
<Version Major="1"/>
<Files Count="47">
<Files Count="48">
<Item1>
<Filename Value="tagraph.pas"/>
<HasRegisterProc Value="True"/>
@ -235,9 +236,17 @@
<Filename Value="tadiagramlayout.pas"/>
<UnitName Value="TADiagramLayout"/>
</Item47>
<Item48>
<Filename Value="tachartstrconsts.pas"/>
<UnitName Value="TAChartStrConsts"/>
</Item48>
</Files>
<LazDoc Paths="$(LazarusDir)\components\tachart\fpdoc"/>
<Type Value="RunAndDesignTime"/>
<i18n>
<EnableI18N Value="True"/>
<OutDir Value="languages"/>
<EnableI18NForLFM Value="True"/>
</i18n>
<RequiredPkgs Count="3">
<Item1>
<PackageName Value="IDEIntf"/>

View File

@ -16,7 +16,7 @@ uses
TAToolEditors, TAMath, TAChartImageList, TAChartTeeChart, TADataTools,
TAAnimatedSource, TATextElements, TAAxisSource, TASeriesPropEditors,
TACustomFuncSeries, TAFitUtils, TAGUIConnector, TADiagram, TADiagramDrawing,
TADiagramLayout, LazarusPackageIntf;
TADiagramLayout, TAChartStrConsts, LazarusPackageIntf;
implementation

View File

@ -0,0 +1,75 @@
unit TAChartStrConsts;
{$mode objfpc}{$H+}
interface
resourcestring
// Series types
rsAreaSeries = 'Area series';
rsBarSeries = 'Bar series';
rsBoxAndWhiskerSeries = 'Box-and-whiskers series';
rsBubbleSeries = 'Bubble series';
rsBSplineSeries = 'B-Spline series';
rsColorMapSeries = 'Color map series';
rsConstantLine = 'Constant line';
rsCubicSplineSeries = 'Cubic spline series';
rsFunctionSeries = 'Function series';
rsLeastSquaresFitSeries = 'Least-squares fit series';
rsLineSeries = 'Line series';
rsManhattanPlotSeries = 'Manhattan plot series';
rsOpenHighLowCloseSeries = 'Open-high-low-close series';
rsParametricCurveSeries = 'Parametric curve series';
rsPieSeries = 'Pie series';
rsPolarSeries = 'Polar series';
rsUserDrawnSeries = 'User-drawn series';
// Series editor
sesSeriesEditorTitle = 'Edit series';
// Data points editor
desDatapointEditor = 'DataPoints editor';
desColor = 'Color';
desText = 'Text';
desInsertRow = 'Insert row';
desDeleteRow = 'Delete row';
// Subcomponents editor
rsAdd = 'Add';
rsDelete = 'Delete';
rsMoveUp = 'Up';
rsMoveDown = 'Down';
// Tool editor
tasToolsEditorTitle = 'Edit tools';
rsZoomByDrag = 'Zoom by drag';
rsZoomByClick = 'Zoom by click';
rsZoomByMousewheel = 'Zoom by mouse-wheel';
rsPanningByDrag = 'Panning by drag';
rsPanningByClick = 'Panning by click';
rsPanningByMousewheel = 'Panning by mouse wheel';
//rsReticule = 'Reticule';
rsDataPointClick = 'Data point click';
rsDataPointDrag = 'Data point drag';
rsDataPointHint = 'Data point hint';
rsDataPointCrossHair = 'Data point crosshair';
rsUserDefinedTool = 'User-defined';
rsDistanceMeasurement = 'Distance measurement';
// Transformations
tasAxisTransformsEditorTitle = 'Edit axis transformations';
rsAutoScale = 'Auto scale';
rsCumulativeNormalDistribution = 'Cumulative normal distribution';
rsLinear = 'Linear';
rsLogarithmic = 'Logarithmic';
rsUserDefined = 'User-defined';
// ChartUtils
tasFailedSubcomponentRename = 'Failed to rename components: %s';
implementation
end.

View File

@ -256,6 +256,25 @@ type
property Item[AIndex: Integer]: TElem read GetItem; default;
end;
PStr = ^String; // PString is declared in system and in objpas!
TClassRegistryItem = class
FClass: TClass;
FCaption: String;
FCaptionPtr: PStr;
constructor Create(AClass: TClass; const ACaption: String);
constructor CreateRes(AClass: TClass; ACaptionPtr: PStr);
end;
TClassRegistry = class(TFPList)
public
destructor Destroy; override;
procedure Clear;
function GetCaption(AIndex: Integer): String;
function GetClass(AIndex: Integer): TClass;
function IndexOfClass(AClass: TClass): Integer;
end;
const
PUB_INT_SET_ALL = '';
PUB_INT_SET_EMPTY = '-';
@ -329,13 +348,11 @@ var
DrawData: TDrawDataRegistry;
ShowMessageProc: TShowMessageProc;
resourcestring
tasFailedSubcomponentRename = 'Failed to rename components: %s';
implementation
uses
StrUtils, TypInfo;
StrUtils, TypInfo, TAChartStrConsts;
const
ORIENTATION_UNITS_PER_DEG = 10;
@ -971,6 +988,64 @@ begin
end;
end;
{ TClassRegistryItem }
constructor TClassRegistryItem.Create(AClass: TClass; const ACaption: String);
begin
FClass := AClass;
FCaption := ACaption;
end;
constructor TClassRegistryItem.CreateRes(AClass: TClass; ACaptionPtr: PStr);
begin
FClass := AClass;
FCaptionPtr := ACaptionPtr;
if FCaptionPtr <> nil then FCaption := ACaptionPtr^;
end;
{ TClassRegistry }
destructor TClassRegistry.Destroy;
begin
Clear;
inherited;
end;
procedure TClassRegistry.Clear;
var
i: Integer;
begin
for i:= Count-1 downto 0 do
TObject(Items[i]).Free;
inherited;
end;
function TClassRegistry.GetCaption(AIndex: Integer): String;
var
item: TClassRegistryItem;
begin
item := TClassRegistryItem(Items[AIndex]);
if item.FCaptionPtr <> nil then
Result := item.FCaptionPtr^ else
Result := item.FCaption;
end;
function TClassRegistry.GetClass(AIndex: Integer): TClass;
begin
Result := TClassRegistryItem(Items[AIndex]).FClass;
end;
function TClassRegistry.IndexOfClass(AClass: TClass): Integer;
begin
for Result := 0 to Count-1 do
if TClassRegistryItem(Items[Result]).FClass = AClass then
exit;
Result := -1;
end;
initialization
DrawData := TDrawDataRegistry.Create;

View File

@ -123,7 +123,7 @@ implementation
uses
GraphMath, Math, SysUtils, Types,
TAChartAxis, TACustomSeries, TAGeometry;
TAChartStrConsts, TAChartAxis, TACustomSeries, TAGeometry;
const
DEF_DISTANCE_FORMAT = '%0:.9g';
@ -407,7 +407,7 @@ end;
initialization
RegisterChartToolClass(TDataPointDistanceTool, 'Distance measurement');
RegisterChartToolClass(TDataPointDistanceTool, @rsDistanceMeasurement);
end.

View File

@ -381,7 +381,7 @@ implementation
uses
ipf, GraphType, IntfGraphics, Math, StrUtils, SysUtils,
TAGeometry, TAGraph, TAMath;
TAChartStrConsts, TAGeometry, TAGraph, TAMath;
const
DEF_PARAM_MIN = 0.0;
@ -1940,12 +1940,12 @@ begin
end;
initialization
RegisterSeriesClass(TFuncSeries, 'Function series');
RegisterSeriesClass(TParametricCurveSeries, 'Parametric curve series');
RegisterSeriesClass(TBSplineSeries, 'B-Spline series');
RegisterSeriesClass(TCubicSplineSeries, 'Cubic spline series');
RegisterSeriesClass(TFitSeries, 'Least-squares fit series');
RegisterSeriesClass(TColorMapSeries, 'Color map series');
RegisterSeriesClass(TFuncSeries, @rsFunctionSeries);
RegisterSeriesClass(TParametricCurveSeries, @rsParametricCurveSeries);
RegisterSeriesClass(TBSplineSeries, @rsBSplineSeries);
RegisterSeriesClass(TCubicSplineSeries, @rsCubicSplineSeries);
RegisterSeriesClass(TFitSeries, @rsLeastSquaresFitSeries);
RegisterSeriesClass(TColorMapSeries, @rsColorMapSeries);
end.

View File

@ -447,10 +447,11 @@ type
end;
procedure Register;
procedure RegisterSeriesClass(ASeriesClass: TSeriesClass; const ACaption: string);
procedure RegisterSeriesClass(ASeriesClass: TSeriesClass; const ACaption: String); overload;
procedure RegisterSeriesClass(ASeriesClass: TSeriesClass; ACaptionPtr: PStr); overload;
var
SeriesClassRegistry: TStringList;
SeriesClassRegistry: TClassRegistry = nil;
OnInitBuiltinTools: function(AChart: TChart): TBasicChartToolset;
implementation
@ -474,17 +475,22 @@ var
begin
RegisterComponents(CHART_COMPONENT_IDE_PAGE, [TChart]);
for i := 0 to SeriesClassRegistry.Count - 1 do begin
sc := TSeriesClass(SeriesClassRegistry.Objects[i]);
sc := TSeriesClass(SeriesClassRegistry.GetClass(i));
RegisterClass(sc);
RegisterNoIcon([sc]);
end;
end;
procedure RegisterSeriesClass(
ASeriesClass: TSeriesClass; const ACaption: String);
procedure RegisterSeriesClass(ASeriesClass: TSeriesClass; const ACaption: String);
begin
if SeriesClassRegistry.IndexOfObject(TObject(ASeriesClass)) < 0 then
SeriesClassRegistry.AddObject(ACaption, TObject(ASeriesClass));
if SeriesClassRegistry.IndexOfClass(ASeriesClass) < 0 then
SeriesClassRegistry.Add(TClassRegistryItem.Create(ASeriesClass, ACaption));
end;
procedure RegisterSeriesClass(ASeriesClass: TSeriesClass; ACaptionPtr: PStr);
begin
if SeriesClassRegistry.IndexOfClass(ASeriesClass) < 0 then
SeriesClassRegistry.Add(TClassRegistryItem.CreateRes(ASeriesClass, ACaptionPtr));
end;
procedure WriteComponentToStream(AStream: TStream; AComponent: TComponent);
@ -987,7 +993,7 @@ begin
exit;
end;
for i := 0 to SeriesClassRegistry.Count - 1 do begin
AClass := TSeriesClass(SeriesClassRegistry.Objects[i]);
AClass := TSeriesClass(SeriesClassRegistry.GetClass(i));
if AClass.ClassNameIs(AClassName) then exit;
end;
AClass := nil;
@ -1896,7 +1902,7 @@ end;
initialization
SkipObsoleteChartProperties;
SeriesClassRegistry := TStringList.Create;
SeriesClassRegistry := TClassRegistry.Create;
ShowMessageProc := @ShowMessage;
finalization

View File

@ -189,7 +189,8 @@ type
implementation
uses
FPCanvas, Math, SysUtils, TACustomSource, TAGeometry, TAGraph, TAMath;
FPCanvas, Math, SysUtils,
TAChartStrConsts, TACustomSource, TAGeometry, TAGraph, TAMath;
type
@ -939,8 +940,8 @@ end;
initialization
RegisterSeriesClass(TBubbleSeries, 'Bubble series');
RegisterSeriesClass(TBoxAndWhiskerSeries, 'Box-and-whiskers series');
RegisterSeriesClass(TOpenHighLowCloseSeries, 'Open-high-low-close series');
RegisterSeriesClass(TBubbleSeries, @rsBubbleSeries);
RegisterSeriesClass(TBoxAndWhiskerSeries, @rsBoxAndWhiskerSeries);
RegisterSeriesClass(TOpenHighLowCloseSeries, @rsOpenHighLowCloseSeries);
end.

View File

@ -146,7 +146,7 @@ implementation
uses
Math,
TACustomSource, TAGeometry, TAGraph;
TAChartStrConsts, TACustomSource, TAGeometry, TAGraph;
{ TPieSlice }
@ -673,7 +673,7 @@ end;
initialization
RegisterSeriesClass(TPolarSeries, 'Polar series');
RegisterSeriesClass(TPolarSeries, @rsPolarSeries);
end.

View File

@ -344,7 +344,7 @@ implementation
uses
GraphMath, GraphType, IntfGraphics, LResources, Math, PropEdits, SysUtils,
TADrawerCanvas, TAGeometry, TAGraph, TAMath, TAStyles;
TAChartStrConsts, TADrawerCanvas, TAGeometry, TAGraph, TAMath, TAStyles;
{ TLineSeries }
@ -1496,14 +1496,14 @@ begin
end;
initialization
RegisterSeriesClass(TLineSeries, 'Line series');
RegisterSeriesClass(TAreaSeries, 'Area series');
RegisterSeriesClass(TBarSeries, 'Bar series');
RegisterSeriesClass(TPieSeries, 'Pie series');
RegisterSeriesClass(TUserDrawnSeries, 'User-drawn series');
RegisterSeriesClass(TConstantLine, 'Constant line');
RegisterSeriesClass(TManhattanSeries, 'Manhattan plot series');
{$WARNINGS OFF}RegisterSeriesClass(TLine, '');{$WARNINGS ON}
RegisterSeriesClass(TLineSeries, @rsLineSeries);
RegisterSeriesClass(TAreaSeries, @rsAreaSeries);
RegisterSeriesClass(TBarSeries, @rsBarSeries);
RegisterSeriesClass(TPieSeries, @rsPieSeries);
RegisterSeriesClass(TUserDrawnSeries, @rsUserDrawnSeries);
RegisterSeriesClass(TConstantLine, @rsConstantLine);
RegisterSeriesClass(TManhattanSeries, @rsManhattanPlotSeries);
// {$WARNINGS OFF}RegisterSeriesClass(TLine, nil);{$WARNINGS ON}
SkipObsoleteProperties;
end.

View File

@ -573,17 +573,20 @@ type
end;
procedure Register;
procedure RegisterChartToolClass(
AToolClass: TChartToolClass; const ACaption: String);
procedure RegisterChartToolClass(AToolClass: TChartToolClass;
const ACaption: String); overload;
procedure RegisterChartToolClass(AToolClass: TChartToolClass;
ACaptionPtr: PStr); overload;
var
ToolsClassRegistry: TStringList;
ToolsClassRegistry: TClassRegistry = nil;
implementation
uses
GraphMath, InterfaceBase, LCLType, LCLIntf, Math, SysUtils,
TACustomSeries, TAEnumerators, TAGeometry, TAMath;
TAChartStrConsts, TACustomSeries, TAEnumerators, TAGeometry, TAMath;
function InitBuiltinTools(AChart: TChart): TBasicChartToolset;
var
@ -607,15 +610,23 @@ var
i: Integer;
begin
for i := 0 to ToolsClassRegistry.Count - 1 do
RegisterNoIcon([TChartToolClass(ToolsClassRegistry.Objects[i])]);
RegisterNoIcon([TChartToolClass(ToolsClassRegistry.GetClass(i))]);
RegisterComponents(CHART_COMPONENT_IDE_PAGE, [TChartToolset]);
end;
procedure RegisterChartToolClass(
AToolClass: TChartToolClass; const ACaption: String);
procedure RegisterChartToolClass(AToolClass: TChartToolClass;
const ACaption: String);
begin
RegisterClass(AToolClass);
ToolsClassRegistry.AddObject(ACaption, TObject(AToolClass));
if ToolsClassRegistry.IndexOfClass(AToolClass) < 0 then
ToolsClassRegistry.Add(TClassRegistryItem.Create(AToolClass, ACaption));
end;
procedure RegisterChartToolClass(AToolClass: TChartToolClass; ACaptionPtr: PStr);
begin
RegisterClass(AToolClass);
if ToolsClassRegistry.IndexOfClass(AToolClass) < 0 then
ToolsClassRegistry.Add(TClassRegistryItem.CreateRes(AToolClass, ACaptionPtr));
end;
{ TDataPointTool.TPointRef }
@ -1962,20 +1973,20 @@ end;
initialization
ToolsClassRegistry := TStringList.Create;
ToolsClassRegistry := TClassRegistry.Create;
OnInitBuiltinTools := @InitBuiltinTools;
RegisterChartToolClass(TZoomDragTool, 'Zoom by drag');
RegisterChartToolClass(TZoomClickTool, 'Zoom by click');
RegisterChartToolClass(TZoomMouseWheelTool, 'Zoom by mouse wheel');
RegisterChartToolClass(TPanDragTool, 'Panning by drag');
RegisterChartToolClass(TPanClickTool, 'Panning by click');
RegisterChartToolClass(TPanMouseWheelTool, 'Panning by mouse wheel');
RegisterChartToolClass(TReticuleTool, 'Reticule');
RegisterChartToolClass(TDataPointClickTool, 'Data point click');
RegisterChartToolClass(TDataPointDragTool, 'Data point drag');
RegisterChartToolClass(TDataPointHintTool, 'Data point hint');
RegisterChartToolClass(TDataPointCrosshairTool, 'Data point crosshair');
RegisterChartToolClass(TUserDefinedTool, 'User-defined');
RegisterChartToolClass(TZoomDragTool, @rsZoomByDrag);
RegisterChartToolClass(TZoomClickTool, @rsZoomByClick);
RegisterChartToolClass(TZoomMouseWheelTool, @rsZoomByMouseWheel);
RegisterChartToolClass(TPanDragTool, @rsPanningByDrag);
RegisterChartToolClass(TPanClickTool, @rsPanningbyClick);
RegisterChartToolClass(TPanMouseWheelTool, @rsPanningByMouseWheel);
// RegisterChartToolClass(TReticuleTool, @rsReticule);
RegisterChartToolClass(TDataPointClickTool, @rsDataPointClick);
RegisterChartToolClass(TDataPointDragTool, @rsDataPointDrag);
RegisterChartToolClass(TDataPointHintTool, @rsDataPointHint);
RegisterChartToolClass(TDataPointCrosshairTool, @rsDataPointCrosshair);
RegisterChartToolClass(TUserDefinedTool, @rsUserDefinedTool);
finalization

View File

@ -194,14 +194,16 @@ type
procedure Register;
resourcestring
tasAxisTransformsEditorTitle = 'Edit axis transformations';
procedure RegisterAxisTransformClass(AAxisTransformClass: TAxisTransformClass;
const ACaption: String); overload;
procedure RegisterAxisTransformClass(AAxisTransformClass: TAxisTransformClass;
ACaptionPtr: PStr); overload;
implementation
uses
ComponentEditors, Forms, Math, PropEdits,
TAMath, TASubcomponentsEditor;
TAChartStrConsts, TAMath, TASubcomponentsEditor;
type
{ TAxisTransformsComponentEditor }
@ -240,7 +242,7 @@ type
end;
var
AxisTransformsClassRegistry: TStringList;
AxisTransformsClassRegistry: TClassRegistry;
procedure Register;
var
@ -248,7 +250,7 @@ var
begin
with AxisTransformsClassRegistry do
for i := 0 to Count - 1 do
RegisterNoIcon([TAxisTransformClass(Objects[i])]);
RegisterNoIcon([TAxisTransformClass(GetClass(i))]);
RegisterComponents(CHART_COMPONENT_IDE_PAGE, [TChartAxisTransformations]);
RegisterPropertyEditor(
TypeInfo(TAxisTransformList), TChartAxisTransformations,
@ -257,11 +259,22 @@ begin
TChartAxisTransformations, TAxisTransformsComponentEditor);
end;
procedure RegisterAxisTransformClass(
AAxisTransformClass: TAxisTransformClass; const ACaption: String);
procedure RegisterAxisTransformClass(AAxisTransformClass: TAxisTransformClass;
const ACaption: String);
begin
RegisterClass(AAxisTransformClass);
AxisTransformsClassRegistry.AddObject(ACaption, TObject(AAxisTransformClass));
with AxisTransformsClassRegistry do
if IndexOfClass(AAxisTransformClass) < 0 then
Add(TClassRegistryItem.Create(AAxisTransformClass, ACaption));
end;
procedure RegisterAxisTransformClass(AAxisTransformClass: TAxisTransformClass;
ACaptionPtr: PStr);
begin
RegisterClass(AAxisTransformClass);
with AxisTransformsClassRegistry do
if IndexOfClass(AAxisTransformClass) < 0 then
Add(TClassRegistryItem.CreateRes(AAxisTransformClass, ACaptionPtr));
end;
{ TAxisTransformList }
@ -323,7 +336,7 @@ var
i: Integer;
begin
for i := 0 to AxisTransformsClassRegistry.Count - 1 do
AddSubcomponentClass(AxisTransformsClassRegistry[i], i);
AddSubcomponentClass(AxisTransformsClassRegistry.GetCaption(i), i);
end;
function TAxisTransformsEditorForm.GetChildrenList: TFPList;
@ -335,7 +348,7 @@ function TAxisTransformsEditorForm.MakeSubcomponent(
AOwner: TComponent; ATag: Integer): TComponent;
begin
with AxisTransformsClassRegistry do
Result := TAxisTransformClass(Objects[ATag]).Create(AOwner);
Result := TAxisTransformClass(GetClass(ATag)).Create(AOwner);
end;
{ TAxisTransform }
@ -790,13 +803,13 @@ end;
initialization
AxisTransformsClassRegistry := TStringList.Create;
RegisterAxisTransformClass(TAutoScaleAxisTransform, 'Auto scale');
AxisTransformsClassRegistry := TClassRegistry.Create;
RegisterAxisTransformClass(TAutoScaleAxisTransform, @rsAutoScale);
RegisterAxisTransformClass(
TCumulNormDistrAxisTransform, 'Cumulative normal distribution');
RegisterAxisTransformClass(TLinearAxisTransform, 'Linear');
RegisterAxisTransformClass(TLogarithmAxisTransform, 'Logarithmic');
RegisterAxisTransformClass(TUserDefinedAxisTransform, 'User defined');
TCumulNormDistrAxisTransform, @rsCumulativeNormalDistribution);
RegisterAxisTransformClass(TLinearAxisTransform, @rsLinear);
RegisterAxisTransformClass(TLogarithmAxisTransform, @rsLogarithmic);
RegisterAxisTransformClass(TUserDefinedAxisTransform, @rsUserDefined);
finalization