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
// Image index, referring to ImgDatamodule.AppImages in unit dmImages;
iiDataDict = 32;
// iiDataDict = 32; // listed in unit dmImages
iiTables = 1;
iiTable = 2;
iiFields = 3;

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,21 @@ interface
uses
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
{ TImgDatamodule }

View File

@ -29,7 +29,8 @@ type
procedure AddPair(LV: TListView; Const AName, AValue: String);
procedure ClearDisplay;
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 SelectField(TableName, FieldName: String);
procedure SelectFields(TableName: String);
@ -71,18 +72,6 @@ type
Property Frame : TConnectionFrame Read FFrame;
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
@ -251,8 +240,8 @@ begin
end;
end;
function TConnectionFrame.NewNode(TV : TTreeView;ParentNode: TTreeNode; ACaption: String; AImageIndex : Integer
): TTreeNode;
function TConnectionFrame.NewNode(TV : TTreeView;ParentNode: TTreeNode;
ACaption: String; AImageIndex : Integer): TTreeNode;
begin
Result:=TV.Items.AddChild(ParentNode,ACaption);
If AImageIndex>=0 then

View File

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

View File

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

View File

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