Browse Source

Merge pull request #254 from sganz/dev-bgracontrols

Removed uELED and replaced with SuperLED, so all BGRA based now
Leandro Oscar Ezequiel Diaz 4 months ago
parent
commit
87199d38d6
2 changed files with 73 additions and 86 deletions
  1. 59 77
      test/test_supergauge/sgtest.lfm
  2. 14 9
      test/test_supergauge/sgtest.pas

+ 59 - 77
test/test_supergauge/sgtest.lfm

@@ -1,7 +1,7 @@
 object SGTestFrm: TSGTestFrm
 object SGTestFrm: TSGTestFrm
-  Left = 566
+  Left = 432
   Height = 843
   Height = 843
-  Top = 160
+  Top = 169
   Width = 1323
   Width = 1323
   Caption = 'Super Gauge Test Application Test v0.0'
   Caption = 'Super Gauge Test Application Test v0.0'
   ClientHeight = 843
   ClientHeight = 843
@@ -4092,33 +4092,6 @@ object SGTestFrm: TSGTestFrm
       Caption = 'RangeLED'
       Caption = 'RangeLED'
       ClientHeight = 805
       ClientHeight = 805
       ClientWidth = 843
       ClientWidth = 843
-      object TestLedShape: TBGRAShape
-        Left = 33
-        Height = 32
-        Top = 88
-        Width = 32
-        Angle = 45
-        BorderColor = clWindowText
-        BorderGradient.StartColor = clWhite
-        BorderGradient.EndColor = clBlack
-        BorderGradient.GradientType = gtLinear
-        BorderGradient.Point1XPercent = 0
-        BorderGradient.Point1YPercent = 0
-        BorderGradient.Point2XPercent = 100
-        BorderGradient.Point2YPercent = 100
-        FillColor = clRed
-        FillOpacity = 255
-        FillGradient.StartColor = clRed
-        FillGradient.EndColor = clBlack
-        FillGradient.GradientType = gtRadial
-        FillGradient.Point1XPercent = 50
-        FillGradient.Point1YPercent = 50
-        FillGradient.Point2XPercent = 100
-        FillGradient.Point2YPercent = 100
-        UseFillGradient = True
-        ShapeType = stEllipse
-        Caption = 'Test LED'
-      end
       object RangeLEDStyleCb: TComboBox
       object RangeLEDStyleCb: TComboBox
         Left = 88
         Left = 88
         Height = 33
         Height = 33
@@ -4438,23 +4411,10 @@ object SGTestFrm: TSGTestFrm
         TabOrder = 13
         TabOrder = 13
         OnChange = RangeLEDActiveCbChange
         OnChange = RangeLEDActiveCbChange
       end
       end
-      object RangeLEDCallBackLed: TuELED
-        Left = 152
-        Height = 40
-        Top = 32
-        Width = 40
-        Debug = False
-        Active = True
-        LedType = ledRound
-        Bright = False
-        Reflection = False
-        Color = clGreen
-        ParentColor = False
-      end
       object RangeLEDCallbackNameLbl: TLabel
       object RangeLEDCallbackNameLbl: TLabel
-        Left = 200
+        Left = 192
         Height = 25
         Height = 25
-        Top = 40
+        Top = 32
         Width = 172
         Width = 172
         Caption = 'LED Range Callbacks :'
         Caption = 'LED Range Callbacks :'
         ParentShowHint = False
         ParentShowHint = False
@@ -4462,12 +4422,47 @@ object SGTestFrm: TSGTestFrm
       object RangeLEDCallbackNameValLbl: TLabel
       object RangeLEDCallbackNameValLbl: TLabel
         Left = 376
         Left = 376
         Height = 25
         Height = 25
-        Top = 40
+        Top = 32
         Width = 35
         Width = 35
         Caption = 'N/A'
         Caption = 'N/A'
         Font.Style = [fsBold]
         Font.Style = [fsBold]
         ParentFont = False
         ParentFont = False
       end
       end
+      object RangeLEDCallBackLED: TSuperLED
+        Left = 152
+        Height = 32
+        Top = 32
+        Width = 32
+        BorderColor = clBlack
+        BorderThickness = 3
+      end
+      object TestLedShape: TBGRAShape
+        Left = 40
+        Height = 32
+        Top = 97
+        Width = 32
+        Angle = 45
+        BorderColor = clWindowText
+        BorderGradient.StartColor = clWhite
+        BorderGradient.EndColor = clBlack
+        BorderGradient.GradientType = gtLinear
+        BorderGradient.Point1XPercent = 0
+        BorderGradient.Point1YPercent = 0
+        BorderGradient.Point2XPercent = 100
+        BorderGradient.Point2YPercent = 100
+        FillColor = clRed
+        FillOpacity = 255
+        FillGradient.StartColor = clRed
+        FillGradient.EndColor = clBlack
+        FillGradient.GradientType = gtRadial
+        FillGradient.Point1XPercent = 50
+        FillGradient.Point1YPercent = 50
+        FillGradient.Point2XPercent = 100
+        FillGradient.Point2YPercent = 100
+        UseFillGradient = True
+        ShapeType = stEllipse
+        Caption = 'Test LED'
+      end
     end
     end
     object TabSheet1: TTabSheet
     object TabSheet1: TTabSheet
       Caption = 'Markers'
       Caption = 'Markers'
@@ -5345,38 +5340,6 @@ object SGTestFrm: TSGTestFrm
       ShowHint = True
       ShowHint = True
       TabOrder = 12
       TabOrder = 12
     end
     end
-    object uELED1: TuELED
-      Left = 400
-      Height = 36
-      Hint = 'Random Mode Indicator'
-      Top = 199
-      Width = 36
-      Debug = False
-      Active = False
-      LedType = ledRound
-      Bright = True
-      Reflection = True
-      Color = clLime
-      ParentColor = False
-      ParentShowHint = False
-      ShowHint = True
-    end
-    object uELED2: TuELED
-      Left = 400
-      Height = 36
-      Hint = 'Gauge Overload/Underload Indicator'#13#10'Triggers if below min or above max value'
-      Top = 160
-      Width = 36
-      Debug = False
-      Active = False
-      LedType = ledRound
-      Bright = True
-      Reflection = True
-      Color = clRed
-      ParentColor = False
-      ParentShowHint = False
-      ShowHint = True
-    end
     object AuxDispMinLbl: TLabel
     object AuxDispMinLbl: TLabel
       Left = 136
       Left = 136
       Height = 25
       Height = 25
@@ -5464,6 +5427,25 @@ object SGTestFrm: TSGTestFrm
       Font.Style = [fsBold]
       Font.Style = [fsBold]
       ParentFont = False
       ParentFont = False
     end
     end
+    object uELED2: TSuperLED
+      Left = 400
+      Height = 36
+      Hint = 'Gauge Overload/Underload Indicator'#13#10'Triggers if below min or above max value'
+      Top = 160
+      Width = 36
+      BorderThickness = 3
+      ShowHint = True
+    end
+    object uELED1: TSuperLED
+      Left = 400
+      Height = 36
+      Hint = 'Random Mode Indicator'
+      Top = 199
+      Width = 36
+      ActiveColor = clLime
+      BorderThickness = 3
+      ShowHint = True
+    end
   end
   end
   object SuperGauge: TSuperGauge
   object SuperGauge: TSuperGauge
     Left = 40
     Left = 40

+ 14 - 9
test/test_supergauge/sgtest.pas

@@ -12,6 +12,9 @@
 - Sandy Ganz | [email protected]
 - Sandy Ganz | [email protected]
   Test Program for SuperGauge
   Test Program for SuperGauge
 ***************************** END CONTRIBUTOR(S) *****************************}
 ***************************** END CONTRIBUTOR(S) *****************************}
+{******************************** CHANGE LOG *********************************
+v2.01 - Swapped uELED component with SuperLED component
+******************************* END CHANGE LOG *******************************}
 
 
 unit sgtest;
 unit sgtest;
 
 
@@ -22,11 +25,11 @@ interface
 uses
 uses
   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls,
   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls,
   ComCtrls, Buttons, ColorBox, ComboEx, ExtDlgs, Menus, LazHelpHTML, HelpIntfs,
   ComCtrls, Buttons, ColorBox, ComboEx, ExtDlgs, Menus, LazHelpHTML, HelpIntfs,
-  SpinEx, ueLED, BGRAKnob, BGRAShape, BGRAImageList, SuperGaugeCommon, SuperGauge,
-  about;
+  SpinEx, BGRAKnob, BGRAShape, BGRAImageList, SuperGaugeCommon,
+  SuperGauge, SuperLED, about;
 
 
 const
 const
-  VERSIONSTR = '2.00';            // SG TEST version, Should ALWAYS show as a delta when merging!
+  VERSIONSTR = '2.01';            // SG TEST version, Should ALWAYS show as a delta when merging!
 
 
 type
 type
   { TSGTestFrm }
   { TSGTestFrm }
@@ -118,7 +121,7 @@ type
     PointerMemo: TMemo;
     PointerMemo: TMemo;
     MaxValLbl: TLabel;
     MaxValLbl: TLabel;
     MinValLbl: TLabel;
     MinValLbl: TLabel;
-    RangeLEDCallBackLed: TuELED;
+    RangeLEDCallBackLED: TSuperLED;
     RangeLEDCallbackNameLbl: TLabel;
     RangeLEDCallbackNameLbl: TLabel;
     RangeLEDCallbackNameValLbl: TLabel;
     RangeLEDCallbackNameValLbl: TLabel;
     ResetMinMaxBtn: TBitBtn;
     ResetMinMaxBtn: TBitBtn;
@@ -212,6 +215,7 @@ type
     AboutSubMenu: TMenuItem;
     AboutSubMenu: TMenuItem;
     ExitSubMenu: TMenuItem;
     ExitSubMenu: TMenuItem;
     Separator1: TMenuItem;
     Separator1: TMenuItem;
+    TestLedShape: TBGRAShape;
     TickArcStyleLbl: TLabel;
     TickArcStyleLbl: TLabel;
     AuxTickArcStyleLbl: TLabel;
     AuxTickArcStyleLbl: TLabel;
     TryToRoundValueCb: TCheckBox;
     TryToRoundValueCb: TCheckBox;
@@ -221,8 +225,8 @@ type
     Label3: TLabel;
     Label3: TLabel;
     DispMinLbl: TLabel;
     DispMinLbl: TLabel;
     DispMinValLbl: TLabel;
     DispMinValLbl: TLabel;
-    uELED1: TuELED;
-    uELED2: TuELED;
+    uELED1: TSuperLED;
+    uELED2: TSuperLED;
     ValuePlus1Btn: TBitBtn;
     ValuePlus1Btn: TBitBtn;
     ValueMinus1Btn: TBitBtn;
     ValueMinus1Btn: TBitBtn;
     ValuePlus10Btn: TBitBtn;
     ValuePlus10Btn: TBitBtn;
@@ -493,7 +497,6 @@ type
     RangeLEDResetOffsetBtn: TBitBtn;
     RangeLEDResetOffsetBtn: TBitBtn;
     RangeLEDResetRangesBtn: TBitBtn;
     RangeLEDResetRangesBtn: TBitBtn;
     RangeLEDShapeCb: TComboBox;
     RangeLEDShapeCb: TComboBox;
-    TestLEDShape: TBGRAShape;
     HeightLbl: TLabel;
     HeightLbl: TLabel;
     Text2Gb: TGroupBox;
     Text2Gb: TGroupBox;
     Text3Gb: TGroupBox;
     Text3Gb: TGroupBox;
@@ -1854,14 +1857,16 @@ end;
 
 
 procedure TSGTestFrm.SuperGaugeRangeLEDInactive(Sender: TObject; Value: single);
 procedure TSGTestFrm.SuperGaugeRangeLEDInactive(Sender: TObject; Value: single);
 begin
 begin
-  RangeLEDCallBackLED.Color := SuperGauge.RangeLEDSettings.InactiveColor;
+  RangeLEDCallBackLED.Active := True;
+  RangeLEDCallBackLED.ActiveColor := SuperGauge.RangeLEDSettings.InactiveColor;
   RangeLEDCallbackNameValLbl.Caption := 'Inactive at ' + FloatToStr(Value);
   RangeLEDCallbackNameValLbl.Caption := 'Inactive at ' + FloatToStr(Value);
   RangeLEDActiveCb.Checked := False;
   RangeLEDActiveCb.Checked := False;
 end;
 end;
 
 
 procedure TSGTestFrm.SuperGaugeRangeLEDActive(Sender: TObject; Value: single);
 procedure TSGTestFrm.SuperGaugeRangeLEDActive(Sender: TObject; Value: single);
 begin
 begin
-  RangeLEDCallBackLED.Color := SuperGauge.RangeLEDSettings.ActiveColor;
+  RangeLEDCallBackLED.Active := True;
+  RangeLEDCallBackLED.ActiveColor := SuperGauge.RangeLEDSettings.ActiveColor;
   RangeLEDCallbackNameValLbl.Caption := 'Active at ' + FloatToStr(Value);
   RangeLEDCallbackNameValLbl.Caption := 'Active at ' + FloatToStr(Value);
   RangeLEDActiveCb.Checked := True;
   RangeLEDActiveCb.Checked := True;
 end;
 end;