Стартовый пул
This commit is contained in:
175
bgracontrols/test/test_analog_controls/dtanalogdemo.lpi
Normal file
175
bgracontrols/test/test_analog_controls/dtanalogdemo.lpi
Normal file
@@ -0,0 +1,175 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="dtanalogdemo"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
</General>
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<BuildModes Count="3">
|
||||
<Item1 Name="Debug" Default="True"/>
|
||||
<Item2 Name="Release">
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="dtanalogdemo"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<SmartLinkUnit Value="True"/>
|
||||
<Optimizations>
|
||||
<OptimizationLevel Value="3"/>
|
||||
</Optimizations>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<GenerateDebugInfo Value="False"/>
|
||||
</Debugging>
|
||||
<LinkSmart Value="True"/>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
</Item2>
|
||||
<Item3 Name="Debug macOS 64">
|
||||
<MacroValues Count="1">
|
||||
<Macro1 Name="LCLWidgetType" Value="cocoa"/>
|
||||
</MacroValues>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="dtanalogdemo"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<IncludeAssertionCode Value="True"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<CodeGeneration>
|
||||
<Checks>
|
||||
<IOChecks Value="True"/>
|
||||
<RangeChecks Value="True"/>
|
||||
<OverflowChecks Value="True"/>
|
||||
<StackChecks Value="True"/>
|
||||
</Checks>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<DebugInfoType Value="dsDwarf2Set"/>
|
||||
<UseHeaptrc Value="True"/>
|
||||
<UseExternalDbgSyms Value="True"/>
|
||||
</Debugging>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
</Item3>
|
||||
<SharedMatrixOptions Count="1">
|
||||
<Item1 ID="530731885381" Modes="Debug macOS 64" Type="IDEMacro" MacroName="LCLWidgetType" Value="cocoa"/>
|
||||
</SharedMatrixOptions>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||
<ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="1">
|
||||
<Mode0 Name="default"/>
|
||||
</Modes>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="bgracontrols"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="dtanalogdemo.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="umain.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="dtanalogdemo"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<IncludeAssertionCode Value="True"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<CodeGeneration>
|
||||
<Checks>
|
||||
<IOChecks Value="True"/>
|
||||
<RangeChecks Value="True"/>
|
||||
<OverflowChecks Value="True"/>
|
||||
<StackChecks Value="True"/>
|
||||
</Checks>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<DebugInfoType Value="dsDwarf2Set"/>
|
||||
<UseHeaptrc Value="True"/>
|
||||
<UseExternalDbgSyms Value="True"/>
|
||||
</Debugging>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
21
bgracontrols/test/test_analog_controls/dtanalogdemo.lpr
Normal file
21
bgracontrols/test/test_analog_controls/dtanalogdemo.lpr
Normal file
@@ -0,0 +1,21 @@
|
||||
program dtanalogdemo;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, umain
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource := True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
149
bgracontrols/test/test_analog_controls/umain.lfm
Normal file
149
bgracontrols/test/test_analog_controls/umain.lfm
Normal file
@@ -0,0 +1,149 @@
|
||||
object Form1: TForm1
|
||||
Left = 424
|
||||
Height = 351
|
||||
Top = 168
|
||||
Width = 1034
|
||||
Caption = 'Analog Controls Demo'
|
||||
ClientHeight = 351
|
||||
ClientWidth = 1034
|
||||
Color = clWhite
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
LCLVersion = '1.2.0.3'
|
||||
object TrackBar1: TTrackBar
|
||||
Left = 16
|
||||
Height = 25
|
||||
Top = 264
|
||||
Width = 236
|
||||
Frequency = 5
|
||||
Max = 100
|
||||
OnChange = TrackBar1Change
|
||||
Position = 0
|
||||
TabOrder = 0
|
||||
end
|
||||
object TrackBar2: TTrackBar
|
||||
Left = 784
|
||||
Height = 25
|
||||
Top = 264
|
||||
Width = 236
|
||||
Frequency = 5
|
||||
Max = 100
|
||||
OnChange = TrackBar2Change
|
||||
Position = 0
|
||||
TabOrder = 1
|
||||
end
|
||||
object DTAnalogGauge1: TDTAnalogGauge
|
||||
Left = 777
|
||||
Height = 240
|
||||
Top = 15
|
||||
Width = 243
|
||||
Position = 0
|
||||
FaceSettings.FillStyle = fsGradient
|
||||
FaceSettings.ColorFrame = 2302755
|
||||
FaceSettings.ColorStart = 4144959
|
||||
FaceSettings.ColorEnd = 6118749
|
||||
ScaleSettings.TickColor = 8242399
|
||||
ScaleSettings.TextColor = 13881484
|
||||
ScaleSettings.TextSize = 15
|
||||
ScaleSettings.TextFont = 'Calibri'
|
||||
ScaleSettings.EnableMainTicks = True
|
||||
ScaleSettings.EnableSubTicks = True
|
||||
ScaleSettings.EnableScaleText = True
|
||||
ScaleSettings.Maximum = 100
|
||||
ScaleSettings.MainTickCount = 10
|
||||
ScaleSettings.SubTickCount = 5
|
||||
ScaleSettings.LengthMainTick = 15
|
||||
ScaleSettings.LengthSubTick = 8
|
||||
ScaleSettings.ThicknessMainTick = 3
|
||||
ScaleSettings.ThicknessSubTick = 1
|
||||
ScaleSettings.TextRadius = 0
|
||||
ScaleSettings.Angle = 300
|
||||
ScaleSettings.EnableRangeIndicator = True
|
||||
NeedleSettings.NeedleColor = 5329407
|
||||
NeedleSettings.NeedleLength = 100
|
||||
NeedleSettings.CapRadius = 10
|
||||
NeedleSettings.CapColor = 4144959
|
||||
NeedleSettings.CapEdgeColor = 13425884
|
||||
end
|
||||
object DTThemedGauge1: TDTThemedGauge
|
||||
Left = 14
|
||||
Height = 238
|
||||
Top = 16
|
||||
Width = 233
|
||||
FaceSettings.FillStyle = fsGradient
|
||||
FaceSettings.ColorFrame = 2302755
|
||||
FaceSettings.ColorStart = 4144959
|
||||
FaceSettings.ColorEnd = 6118749
|
||||
ScaleSettings.TickColor = 8242399
|
||||
ScaleSettings.TextColor = 13881484
|
||||
ScaleSettings.TextSize = 15
|
||||
ScaleSettings.TextFont = 'Calibri'
|
||||
ScaleSettings.EnableMainTicks = True
|
||||
ScaleSettings.EnableSubTicks = True
|
||||
ScaleSettings.EnableScaleText = True
|
||||
ScaleSettings.Maximum = 100
|
||||
ScaleSettings.MainTickCount = 10
|
||||
ScaleSettings.SubTickCount = 5
|
||||
ScaleSettings.LengthMainTick = 15
|
||||
ScaleSettings.LengthSubTick = 8
|
||||
ScaleSettings.ThicknessMainTick = 3
|
||||
ScaleSettings.ThicknessSubTick = 1
|
||||
ScaleSettings.TextRadius = 72
|
||||
ScaleSettings.Angle = 300
|
||||
ScaleSettings.EnableRangeIndicator = True
|
||||
PointerSettings.Color = 5329407
|
||||
PointerSettings.Length = 100
|
||||
PointerSettings.Thickness = 3
|
||||
PointerCapSettings.EdgeColor = 13425884
|
||||
PointerCapSettings.FillColor = 4144959
|
||||
PointerCapSettings.Radius = 10
|
||||
PointerCapSettings.EdgeThickness = 1
|
||||
Position = 0
|
||||
end
|
||||
object DTThemedClock1: TDTThemedClock
|
||||
Left = 263
|
||||
Height = 238
|
||||
Top = 14
|
||||
Width = 249
|
||||
SecondsPointerSettings.Color = 5329407
|
||||
SecondsPointerSettings.Length = 80
|
||||
SecondsPointerSettings.Thickness = 3
|
||||
MinutesPointerSettings.Color = 11388871
|
||||
MinutesPointerSettings.Length = 80
|
||||
MinutesPointerSettings.Thickness = 3
|
||||
HoursPointerSettings.Color = 11388871
|
||||
HoursPointerSettings.Length = 60
|
||||
HoursPointerSettings.Thickness = 5
|
||||
PointerCapSettings.EdgeColor = 13425884
|
||||
PointerCapSettings.FillColor = 4144959
|
||||
PointerCapSettings.Radius = 10
|
||||
PointerCapSettings.EdgeThickness = 1
|
||||
ScaleSettings.TickColor = 8242399
|
||||
ScaleSettings.TextColor = 13881484
|
||||
ScaleSettings.TextSize = 15
|
||||
ScaleSettings.TextFont = 'Calibri'
|
||||
ScaleSettings.EnableMainTicks = True
|
||||
ScaleSettings.EnableSubTicks = True
|
||||
ScaleSettings.EnableScaleText = True
|
||||
ScaleSettings.Maximum = 100
|
||||
ScaleSettings.MainTickCount = 10
|
||||
ScaleSettings.SubTickCount = 5
|
||||
ScaleSettings.LengthMainTick = 15
|
||||
ScaleSettings.LengthSubTick = 8
|
||||
ScaleSettings.ThicknessMainTick = 3
|
||||
ScaleSettings.ThicknessSubTick = 1
|
||||
ScaleSettings.TextRadius = 72
|
||||
ScaleSettings.Angle = 300
|
||||
ScaleSettings.EnableRangeIndicator = True
|
||||
Position = 0
|
||||
Enabled = True
|
||||
end
|
||||
object DTAnalogClock1: TDTAnalogClock
|
||||
Left = 524
|
||||
Height = 242
|
||||
Top = 14
|
||||
Width = 233
|
||||
Enabled = True
|
||||
end
|
||||
end
|
72
bgracontrols/test/test_analog_controls/umain.pas
Normal file
72
bgracontrols/test/test_analog_controls/umain.pas
Normal file
@@ -0,0 +1,72 @@
|
||||
unit umain;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
|
||||
ComCtrls, ExtCtrls,
|
||||
|
||||
// DT Controls
|
||||
dtthemedgauge, dtthemedclock, DTAnalogClock, DTAnalogGauge;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
DTAnalogClock1: TDTAnalogClock;
|
||||
DTAnalogGauge1: TDTAnalogGauge;
|
||||
DTClock1: TDTThemedClock;
|
||||
DTThemedClock1: TDTThemedClock;
|
||||
DTThemedGauge1: TDTThemedGauge;
|
||||
TrackBar1: TTrackBar;
|
||||
TrackBar2: TTrackBar;
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure TrackBar1Change(Sender: TObject);
|
||||
procedure TrackBar2Change(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.TrackBar1Change(Sender: TObject);
|
||||
begin
|
||||
DTThemedGauge1.Position := TrackBar1.Position;
|
||||
end;
|
||||
|
||||
procedure TForm1.TrackBar2Change(Sender: TObject);
|
||||
begin
|
||||
DTAnalogGauge1.Position := TrackBar2.Position;
|
||||
end;
|
||||
|
||||
procedure TForm1.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TForm1.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user