📄 iplotmastermanager.pas
字号:
Result := FChannelManager.Count-1;
end;
//*************************************************************************************************************************************
function TiPlotMasterManager.AddDataView: Integer;
var
iDataView : TiPlotDataView;
begin
iDataView := TiPlotDataView.Create(FOwner, NotificationChange, NotificationInsert, NotificationRemove, NotificationRename);
TiPlotObjectAccess(iDataView).Loaded;
Result := FDataViewManager.Count-1;
end;
//*************************************************************************************************************************************
function TiPlotMasterManager.AddDataCursor: Integer;
var
iCursor : TiPlotDataCursor;
begin
iCursor := TiPlotDataCursor.Create(FOwner, NotificationChange, NotificationInsert, NotificationRemove, NotificationRename);
TiPlotObjectAccess(iCursor).Loaded;
Result := FDataCursorManager.Count-1;
end;
//*************************************************************************************************************************************
function TiPlotMasterManager.AddLimit: Integer;
var
iLimit : TiPlotLimit;
begin
iLimit := TiPlotLimit.Create(FOwner, NotificationChange, NotificationInsert, NotificationRemove, NotificationRename);
TiPlotObjectAccess(iLimit).Loaded;
Result := FLimitManager.Count-1;
end;
//*************************************************************************************************************************************
function TiPlotMasterManager.AddLabel: Integer;
var
iLabel : TiPlotLabel;
begin
iLabel := TiPlotLabel.Create(FOwner, NotificationChange, NotificationInsert, NotificationRemove, NotificationRename);
TiPlotObjectAccess(iLabel).Loaded;
Result := FLabelManager.Count-1;
end;
//*************************************************************************************************************************************
function TiPlotMasterManager.AddAnnotation: Integer;
var
iAnnotation : TiPlotAnnotation;
begin
iAnnotation := TiPlotAnnotation.Create(FOwner, NotificationChange, NotificationInsert, NotificationRemove, NotificationRename);
TiPlotObjectAccess(iAnnotation).Loaded;
Result := FAnnotationManager.Count-1;
end;
//*************************************************************************************************************************************
function TiPlotMasterManager.AddLegend: Integer;
var
iLegend : TiPlotLegend;
begin
iLegend := TiPlotLegend.Create(FOwner, NotificationChange, NotificationInsert, NotificationRemove, NotificationRename);
TiPlotObjectAccess(iLegend).Loaded;
Result := FLegendManager.Count-1;
end;
//*************************************************************************************************************************************
function TiPlotMasterManager.AddTable: Integer;
var
iTable : TiPlotTable;
begin
iTable := TiPlotTable.Create(FOwner, NotificationChange, NotificationInsert, NotificationRemove, NotificationRename);
TiPlotObjectAccess(iTable).Loaded;
Result := FTableManager.Count-1;
end;
//*************************************************************************************************************************************
function TiPlotMasterManager.AddToolBar: Integer;
var
iToolBar : TiPlotToolBar;
begin
iToolBar := TiPlotToolBar.Create(FOwner, NotificationChange, NotificationInsert, NotificationRemove, NotificationRename);
TiPlotObjectAccess(iToolBar).Loaded;
Result := ToolBarManager.Count-1;
end;
//*************************************************************************************************************************************
function TiPlotMasterManager.AddXAxis: Integer;
var
iXAxis : TiPlotXAxis;
begin
iXAxis := TiPlotXAxis.Create(FOwner, NotificationChange, NotificationInsert, NotificationRemove, NotificationRename);
TiPlotObjectAccess(iXAxis).Loaded;
Result := XAxisManager.Count-1;
end;
//*************************************************************************************************************************************
function TiPlotMasterManager.AddYAxis: Integer;
var
iYAxis : TiPlotYAxis;
begin
iYAxis := TiPlotYAxis.Create(FOwner, NotificationChange, NotificationInsert, NotificationRemove, NotificationRename);
TiPlotObjectAccess(iYAxis).Loaded;
Result := YAxisManager.Count-1;
end;
//*************************************************************************************************************************************
function TiPlotMasterManager.AddTranslation: Integer;
begin
Result := FTranslationManager.Add;
end;
//*************************************************************************************************************************************
procedure TiPlotMasterManager.CreateEditor;
var
x : Integer;
begin
if FOwner is TiPlotComponent then
begin
FEditorForm := TiPlotEditorForm.Create(FOwner);
with FEditorForm as TiPlotEditorForm do
begin
SetFormTranslationMethod(DoTranslation);
OnClose := EditorClose;
Master := Self;
iPlotLayoutViewer.Master := Self;
iPlotLayoutViewer.LayoutManager := FLayOutManager;
iPlotLayoutViewer.TranslationManager := FTranslationManager;
for x := 0 to FToolBarManager.Count-1 do
ToolBarListBox.Items.AddObject ('',FToolBarManager.Items[x]);
if ToolBarListBox.Items.Count <> 0 then ToolBarListBox.ItemIndex := 0 else ToolBarListBox.ItemIndex := -1;
UpdateToolBarEdit;
for x := 0 to FLegendManager.Count-1 do
LegendListBox.Items.AddObject ('',FLegendManager.Items[x]);
if LegendListBox.Items.Count <> 0 then LegendListBox.ItemIndex := 0 else LegendListBox.ItemIndex := -1;
UpdateLegendEdit;
for x := 0 to FTableManager.Count-1 do
TableListBox.Items.AddObject ('',FTableManager.Items[x]);
if TableListBox.Items.Count <> 0 then TableListBox.ItemIndex := 0 else TableListBox.ItemIndex := -1;
UpdateTableEdit;
for x := 0 to FXAxisManager.Count-1 do
XAxisListBox.Items.AddObject ('',FXAxisManager.Items[x]);
if XAxisListBox.Items.Count <> 0 then XAxisListBox.ItemIndex := 0 else XAxisListBox.ItemIndex := -1;
UpdateXAxesEdit;
for x := 0 to FYAxisManager.Count-1 do
YAxisListBox.Items.AddObject ('',FYAxisManager.Items[x]);
if YAxisListBox.Items.Count <> 0 then YAxisListBox.ItemIndex := 0 else YAxisListBox.ItemIndex := -1;
UpdateYAxesEdit;
for x := 0 to FDataViewManager.Count-1 do
DataViewListBox.Items.AddObject ('',FDataViewManager.Items[x]);
if DataViewListBox.Items.Count <> 0 then DataViewListBox.ItemIndex := 0 else DataViewListBox.ItemIndex := -1;
UpdateDataViewEdit;
for x := 0 to FChannelManager.Count-1 do
ChannelListBox.Items.AddObject ('',FChannelManager.Items[x]);
if ChannelListBox.Items.Count <> 0 then ChannelListBox.ItemIndex := 0 else ChannelListBox.ItemIndex := -1;
UpdateChannelEdit;
for x := 0 to FDataCursorManager.Count-1 do
DataCursorListBox.Items.AddObject ('',FDataCursorManager.Items[x]);
if DataCursorListBox.Items.Count <> 0 then DataCursorListBox.ItemIndex := 0 else DataCursorListBox.ItemIndex := -1;
UpdateDataCursorEdit;
for x := 0 to FLimitManager.Count-1 do
LimitListBox.Items.AddObject ('',FLimitManager.Items[x]);
if LimitListBox.Items.Count <> 0 then LimitListBox.ItemIndex := 0 else LimitListBox.ItemIndex := -1;
UpdateLimitEdit;
for x := 0 to FLabelManager.Count-1 do
LabelListBox.Items.AddObject ('',FLabelManager.Items[x]);
if LabelListBox.Items.Count <> 0 then LabelListBox.ItemIndex := 0 else LabelListBox.ItemIndex := -1;
UpdateLabelEdit;
SetActivePageIndex(PageControl, FMainPageControlIndex);
SetActivePageIndex(ControlPageControl, FControlPageControlIndex);
SetActivePageIndex(ChannelPageControl, FChannelPageControlIndex);
SetActivePageIndex(XAxisPageControl, FXAxisPageControlIndex);
SetActivePageIndex(XAxisLabelsPageControl, FXAxisLabelsPageControlIndex);
SetActivePageIndex(YAxisPageControl, FYAxisPageControlIndex);
SetActivePageIndex(YAxisLabelsPageControl, FYAxisLabelsPageControlIndex);
SetActivePageIndex(DataCursorPageControl, FDataCursorPageControlIndex);
SetActivePageIndex(LimitPageControl, FLimitPageControlIndex);
SetActivePageIndex(LabelPageControl, FLabelPageControlIndex);
SetActivePageIndex(LegendPageControl, FLegendPageControlIndex);
SetActivePageIndex(TablePageControl, FTablePageControlIndex);
SetActivePageIndex(DataViewPageControl, FDataViewPageControlIndex);
SetActivePageIndex(DataViewGridLinesCustomPageControl, FDataViewGridLinesCustomPageControlIndex);
if TiPlotComponent(FOwner).UserCanAddRemoveChannels then
begin
iChannelAddButton.Visible := True;
ChannelRemoveButton.Visible := True;
end
else
begin
iChannelAddButton.Visible := False;
ChannelRemoveButton.Visible := False;
end;
end;
end;
DoTranslation(FEditorForm);
end;
//*************************************************************************************************************************************
procedure TiPlotMasterManager.EditProperties;
begin
if not Assigned(FEditorForm) then CreateEditor;
try
with FEditorForm as TiPlotEditorForm do
begin
UpdateAll;
PlotComponent := FOwner;
if FOwner is TiPlotComponent then
begin
AutoFrameRateCheckBox.AsBoolean := TiTiPlotComponentAccess(FOwner).AutoFrameRate;
UpdateFrameRateEdit.AsInteger := TiTiPlotComponentAccess(FOwner).UpdateFrameRate;
ClipAnnotationsToAxesCheckBox.AsBoolean := TiTiPlotComponentAccess(FOwner).ClipAnnotationsToAxes;
BorderStyleRadioGroup.AsInteger := ord(TiTiPlotComponentAccess(FOwner).BorderStyle);
CopyToClipBoardFormatComboBox.AsInteger := ord(TiTiPlotComponentAccess(FOwner).CopyToClipBoardFormat);
FileColumnSeparatorComboBox.AsInteger := ord(TiTiPlotComponentAccess(FOwner).DataFileColumnSeparator);
BackGroundColorPicker.Color := TiTiPlotComponentAccess(FOwner).BackGroundColor;
BackGroundGradientDirectionComboBox.AsInteger := ord(TiTiPlotComponentAccess(FOwner).BackGroundGradientDirection);
BackGroundGradientEnabledCheckBox.AsBoolean := TiTiPlotComponentAccess(FOwner).BackGroundGradientEnabled;
BackGroundGradientStartColorPicker.Color := TiTiPlotComponentAccess(FOwner).BackGroundGradientStartColor;
BackGroundGradientStopColorPicker.Color := TiTiPlotComponentAccess(FOwner).BackGroundGradientStopColor;
OuterMarginLeftEdit.AsInteger := TiTiPlotComponentAccess(FOwner).OuterMarginLeft;
OuterMarginTopEdit.AsInteger := TiTiPlotComponentAccess(FOwner).OuterMarginTop;
OuterMarginRightEdit.AsInteger := TiTiPlotComponentAccess(FOwner).OuterMarginRight;
OuterMarginBottomEdit.AsInteger := TiTiPlotComponentAccess(FOwner).OuterMarginBottom;
TitleVisibleCheckBox.AsBoolean := TiTiPlotComponentAccess(FOwner).TitleVisible;
TitleMarginEdit.AsFloat := TiTiPlotComponentAccess(FOwner).TitleMargin;
TitleTextEdit.AsString := TiTiPlotComponentAccess(FOwner).TitleText;
TitleFontPicker.Font.Assign(TiTiPlotComponentAccess(FOwner).TitleFont);
ControlLogFileNameEdit.Text := TiTiPlotComponentAccess(FOwner).LogFileName;
ControlLogBufferSizeEdit.AsInteger := TiTiPlotComponentAccess(FOwner).LogBufferSize;
HintsShowCheckBox.AsBoolean := TiTiPlotComponentAccess(FOwner).HintsShow;
HintsPauseEdit.AsInteger := TiTiPlotComponentAccess(FOwner).HintsPause;
HintsHidePauseEdit.AsInteger := TiTiPlotComponentAccess(FOwner).HintsHidePause;
HintsFontPicker.Font.Assign(TiTiPlotComponentAccess(FOwner).HintsFont);
AnnotationDefaultPenColorPicker.Color := TiTiPlotComponentAccess(FOwner).AnnotationDefaultPenColor;
AnnotationDefaultPenStyleComboBox.AsInteger := ord(TiTiPlotComponentAccess(FOwner).AnnotationDefaultPenStlye);
AnnotationDefaultPenWidthEdit.AsInteger := TiTiPlotComponentAccess(FOwner).AnnotationDefaultPenWidth;
AnnotationDefaultBrushColorPicker.Color := TiTiPlotComponentAccess(FOwner).AnnotationDefaultBrushColor;
AnnotationDefaultBrushStyleComboBox.AsInteger := ord(TiTiPlotComponentAccess(FOwner).AnnotationDefaultBrushStlye);
AnnotationDefaultFontPicker.Font.Assign(TiTiPlotComponentAccess(FOwner).AnnotationDefaultFont);
PrintShowDialogCheckBox.AsBoolean := TiTiPlotComponentAccess(FOwner).PrintShowDialog;
PrintOrientationRadioGroup.AsInteger := Ord(TiTiPlotComponentAccess(FOwner).PrintOrientation);
PrintMarginLeftEdit.AsFloat := TiTiPlotComponentAccess(FOwner).PrintMarginLeft;
PrintMarginTopEdit.AsFloat := TiTiPlotComponentAccess(FOwner).PrintMarginTop;
PrintMarginRightEdit.AsFloat := TiTiPlotComponentAccess(FOwner).PrintMarginRight;
PrintMarginBottomEdit.AsFloat := TiTiPlotComponentAccess(FOwner).PrintMarginBottom;
PrintDocumentNameEdit.AsString := TiTiPlotComponentAccess(FOwner).PrintDocumentName;
end;
ControlLogActivateButton.Enabled := not TiTiPlotComponentAccess(FOwner).LoggingActive;
ControlLogDeactivateButton.Enabled := TiTiPlotComponentAccess(FOwner).LoggingActive;
if TiTiPlotComponentAccess(FOwner).LoggingActive then
begin
ControlLogFileNameEdit.Enabled := False;
ControlLogFileNamePicker.Disable;
end
else
begin
ControlLogFileNameEdit.Enabled := True;
ControlLogFileNamePicker.Enable;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -