Tools/LazDataDesktop: Improved version of the Connections icon. By Roland Hahn.

This commit is contained in:
wp_xyz 2023-07-27 13:35:50 +02:00
parent ae263321c1
commit 203dbd08fd
22 changed files with 1517 additions and 1480 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 453 B

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 617 B

After

Width:  |  Height:  |  Size: 645 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 791 B

After

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 624 B

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 958 B

After

Width:  |  Height:  |  Size: 910 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 703 B

After

Width:  |  Height:  |  Size: 702 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 539 B

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 686 B

After

Width:  |  Height:  |  Size: 999 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 888 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 462 B

After

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 629 B

After

Width:  |  Height:  |  Size: 658 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 807 B

After

Width:  |  Height:  |  Size: 755 B

View File

@ -152,7 +152,7 @@ Type
Const Const
// Image index, referring to ImgDatamodule.AppImages in unit dmImages; // Image index, referring to ImgDatamodule.AppImages in unit dmImages;
iiDataDict = 32; // iiDataDict = 32; // listed in unit dmImages
iiTables = 1; iiTables = 1;
iiTable = 2; iiTable = 2;
iiFields = 3; iiFields = 3;

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,21 @@ interface
uses uses
Classes, SysUtils, LResources, Controls; Classes, SysUtils, LResources, Controls;
// Some selected image indices to simplify updating images.
const
iiConnection = 0;
iiTables = 1;
iiTable = 2;
iiFields = 3;
iiField = 4;
iiIndexes = 5;
iiIndex = 27;
iiTableData = 7;
iiIndexFields = 8;
iiIndexOptions = 9;
iiConnections = 30;
iiDataDict = 32;
type type
{ TImgDatamodule } { TImgDatamodule }

View File

@ -29,7 +29,8 @@ type
procedure AddPair(LV: TListView; Const AName, AValue: String); procedure AddPair(LV: TListView; Const AName, AValue: String);
procedure ClearDisplay; procedure ClearDisplay;
function GetCurrentObjectType: TObjectType; function GetCurrentObjectType: TObjectType;
function NewNode(TV: TTreeView; ParentNode: TTreeNode; ACaption: String; AImageIndex: Integer): TTreeNode; function NewNode(TV: TTreeView; ParentNode: TTreeNode; ACaption: String;
AImageIndex: Integer): TTreeNode;
procedure SelectConnection; procedure SelectConnection;
procedure SelectField(TableName, FieldName: String); procedure SelectField(TableName, FieldName: String);
procedure SelectFields(TableName: String); procedure SelectFields(TableName: String);
@ -71,18 +72,6 @@ type
Property Frame : TConnectionFrame Read FFrame; Property Frame : TConnectionFrame Read FFrame;
end; end;
Const
// Image index, referring to ImgDatamodule.AppImages in unit dmImages
iiConnection = 0;
iiTables = 1;
iiTable = 2;
iiFields = 3;
iiField = 4;
iiIndexes = 5;
iiIndex = 27;
iiTableData = 7;
iiIndexFields = 8;
iiIndexOptions = 9;
implementation implementation
@ -251,8 +240,8 @@ begin
end; end;
end; end;
function TConnectionFrame.NewNode(TV : TTreeView;ParentNode: TTreeNode; ACaption: String; AImageIndex : Integer function TConnectionFrame.NewNode(TV : TTreeView;ParentNode: TTreeNode;
): TTreeNode; ACaption: String; AImageIndex : Integer): TTreeNode;
begin begin
Result:=TV.Items.AddChild(ParentNode,ACaption); Result:=TV.Items.AddChild(ParentNode,ACaption);
If AImageIndex>=0 then If AImageIndex>=0 then

View File

@ -150,6 +150,7 @@ type
Property SQLConnection : TSQLConnection Read GetConn; Property SQLConnection : TSQLConnection Read GetConn;
Property Transaction : TSQLTransaction Read GetTrans; Property Transaction : TSQLTransaction Read GetTrans;
end; end;
implementation implementation
uses strutils, fpdataexporter, fpcodegenerator; uses strutils, fpdataexporter, fpcodegenerator;

View File

@ -136,7 +136,7 @@ object MainForm: TMainForm
Left = 0 Left = 0
Height = 434 Height = 434
Top = 26 Top = 26
Width = 458 Width = 460
ActivePage = TSAll ActivePage = TSAll
Align = alClient Align = alClient
Images = ImgDatamodule.AppImages Images = ImgDatamodule.AppImages
@ -145,13 +145,13 @@ object MainForm: TMainForm
object TSConnections: TTabSheet object TSConnections: TTabSheet
Caption = 'Connections' Caption = 'Connections'
ClientHeight = 406 ClientHeight = 406
ClientWidth = 450 ClientWidth = 452
ImageIndex = 38 ImageIndex = 38
object LVConnections: TListView object LVConnections: TListView
Left = 0 Left = 0
Height = 406 Height = 406
Top = 0 Top = 0
Width = 450 Width = 452
Align = alClient Align = alClient
Columns = < Columns = <
item item
@ -183,13 +183,13 @@ object MainForm: TMainForm
object TSRecent: TTabSheet object TSRecent: TTabSheet
Caption = 'Dictionaries' Caption = 'Dictionaries'
ClientHeight = 406 ClientHeight = 406
ClientWidth = 450 ClientWidth = 452
ImageIndex = 32 ImageIndex = 32
object LVDicts: TListView object LVDicts: TListView
Left = 0 Left = 0
Height = 406 Height = 406
Top = 0 Top = 0
Width = 450 Width = 452
Align = alClient Align = alClient
Columns = < Columns = <
item item
@ -218,13 +218,13 @@ object MainForm: TMainForm
object TSAll: TTabSheet object TSAll: TTabSheet
Caption = 'Connections/Dictionaries' Caption = 'Connections/Dictionaries'
ClientHeight = 406 ClientHeight = 406
ClientWidth = 450 ClientWidth = 452
ImageIndex = 29 ImageIndex = 29
object TVAll: TTreeView object TVAll: TTreeView
Left = 0 Left = 0
Height = 406 Height = 406
Top = 0 Top = 0
Width = 450 Width = 452
Align = alClient Align = alClient
Images = ImgDatamodule.AppImages Images = ImgDatamodule.AppImages
PopupMenu = PMAll PopupMenu = PMAll
@ -277,10 +277,10 @@ object MainForm: TMainForm
Options = [nboShowCloseButtons, nboKeyboardTabSwitch] Options = [nboShowCloseButtons, nboKeyboardTabSwitch]
end end
object SRecent: TSplitter object SRecent: TSplitter
Left = 458 Left = 460
Height = 434 Height = 434
Top = 26 Top = 26
Width = 8 Width = 6
Align = alRight Align = alRight
ResizeAnchor = akRight ResizeAnchor = akRight
end end

View File

@ -433,11 +433,11 @@ begin
PCRecent.Width:=PSMain.ReadInteger('TreeWidth',PCRecent.Width); PCRecent.Width:=PSMain.ReadInteger('TreeWidth',PCRecent.Width);
// We need these 2 in all cases // We need these 2 in all cases
FNRecentConnections:=TVAll.Items.AddChild(Nil,sld_Connections); FNRecentConnections:=TVAll.Items.AddChild(Nil,sld_Connections);
FNRecentConnections.ImageIndex:=30; FNRecentConnections.ImageIndex:=iiConnections;
FNRecentConnections.SelectedIndex:=30; FNRecentConnections.SelectedIndex:=iiConnections;
FNRecentDictionaries:=TVAll.Items.AddChild(Nil,sld_Dictionaries); FNRecentDictionaries:=TVAll.Items.AddChild(Nil,sld_Dictionaries);
FNRecentDictionaries.ImageIndex:=32; FNRecentDictionaries.ImageIndex:=iiDataDict;
FNRecentDictionaries.SelectedIndex:=32; FNRecentDictionaries.SelectedIndex:=iiDataDict;
SetupIntf; SetupIntf;
FRecentDicts.LoadFromFile(UTF8ToSys(FN),'RecentDicts'); FRecentDicts.LoadFromFile(UTF8ToSys(FN),'RecentDicts');
FRecentConnections.LoadFromFile(UTF8ToSys(FN),'RecentConnections'); FRecentConnections.LoadFromFile(UTF8ToSys(FN),'RecentConnections');
@ -1403,7 +1403,7 @@ begin
Result:=TDataDictEditor.Create(Self); Result:=TDataDictEditor.Create(Self);
Result.PageControl:=PCDD; Result.PageControl:=PCDD;
Result.Parent:=PCDD; Result.Parent:=PCDD;
Result.ImageIndex:=30; Result.ImageIndex:=iiConnection;
PCDD.ActivePage:=Result; PCDD.ActivePage:=Result;
Result.DataDictionary.OnProgress:=@DoDDEprogress; Result.DataDictionary.OnProgress:=@DoDDEprogress;
end; end;
@ -1710,8 +1710,8 @@ begin
TVAll.Items.AddChild(TN,sld_Recentlv2+': '+DF.Filename); TVAll.Items.AddChild(TN,sld_Recentlv2+': '+DF.Filename);
TVAll.Items.AddChild(TN,sld_Recentlv3+': '+DateTimeToStr(DF.LastUse)); TVAll.Items.AddChild(TN,sld_Recentlv3+': '+DateTimeToStr(DF.LastUse));
TN.Data:=DF; TN.Data:=DF;
TN.ImageIndex:=32; TN.ImageIndex:=iiDataDict;
TN.SelectedIndex:=32; TN.SelectedIndex:=iiDataDict;
end; end;
@ -1760,8 +1760,8 @@ begin
TVAll.Items.AddChild(TN,sld_Connectionlv3+': '+DateTimeToStr(RC.LastUse)); TVAll.Items.AddChild(TN,sld_Connectionlv3+': '+DateTimeToStr(RC.LastUse));
TVAll.Items.AddChild(TN,sld_Connectionlv2+': '+RC.ConnectionString); TVAll.Items.AddChild(TN,sld_Connectionlv2+': '+RC.ConnectionString);
TN.Data:=RC; TN.Data:=RC;
TN.ImageIndex:=30; TN.ImageIndex:=iiConnection;
TN.SelectedIndex:=30; TN.SelectedIndex:=iiConnection;
end; end;
function TMainForm.GetConnectionName(out AName: String): Boolean; function TMainForm.GetConnectionName(out AName: String): Boolean;
@ -1839,7 +1839,7 @@ begin
Result.PageControl:=PCDD; Result.PageControl:=PCDD;
Result.Parent:=PCDD; Result.Parent:=PCDD;
Result.Frame.Description:=AName; Result.Frame.Description:=AName;
Result.ImageIndex:=30; Result.ImageIndex:=iiConnection;
Result.Caption:=aName; Result.Caption:=aName;
PCDD.ActivePage:=Result; PCDD.ActivePage:=Result;
end; end;