From 8faa61f358eea0210084088666c0bac64374d8aa Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Fri, 14 Dec 2007 15:38:55 +0000 Subject: [PATCH] Added: initial filter configuration dialog --- Lib/D7/UnitSwitcherD7.bpl | Bin 131072 -> 138752 bytes Packages/D7/UnitSwitcher.dpk | 4 +- Source/CmpSwConfiguration.dfm | 235 ++++++++++++++++++++++++++++ Source/CmpSwConfiguration.pas | 179 +++++++++++++++++++++ Source/CmpSwDialog.dfm | 9 ++ Source/CmpSwDialog.pas | 23 ++- Source/CmpSwFilterConfiguration.dfm | 62 ++++++++ Source/CmpSwFilterConfiguration.pas | 57 +++++++ Source/CmpSwFilters.pas | 37 ++++- Source/CmpSwSettings.pas | 100 ++++++------ 10 files changed, 646 insertions(+), 60 deletions(-) create mode 100644 Source/CmpSwConfiguration.dfm create mode 100644 Source/CmpSwConfiguration.pas create mode 100644 Source/CmpSwFilterConfiguration.dfm create mode 100644 Source/CmpSwFilterConfiguration.pas diff --git a/Lib/D7/UnitSwitcherD7.bpl b/Lib/D7/UnitSwitcherD7.bpl index 992fc8e4e974b932edd45300a7eb5e964fc4889e..e50a3384ef8051d4cb45e81ac63fd45979a7a565 100644 GIT binary patch delta 14105 zcmb7r3tUvy_W#~IzR4H{m>Fk)QN%}zi~>GEd5wbd3I@ejGX{3SBZVGo zOf8=&nQu&myoL@TmDjAi#Z4nln3$L-QueUlo8m2~{3553qZ@1`+eHidIDJ;S zA)OGhT`k&60n>*+3h7*wy8USh(Tyw8=N4oV7y|~3BK>g9=kGfW>a`trqP@75Q$E3Y zut%X2?(sLccBb>`=V%ZgKV+C+z;-Q3@zs(nAPFc3w$(;${L0xVRIRXDxzD(E(=!3Y z;9fP^U$CqNi0Gp!Nz#`+7(p|`S_$q`Wxlj+^US%f#NXmF12 z#_7I7*L{BP^Rn>YU~rZ-G^;Ym>bmx(mdG0x%%7iC>67iULrW~J=S!^C+nuQvuA%G+ z#-^5(9a=u!InXm3d={zlS^Uws!M&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B-3j|6 z%v&BQKOz4{o)x|~ynMu&5yK->BBw=WMQ)6|9yvH_bkvJcg;A@cgeVi*pAx+_=F=EY zMXVx4F;}rfQKZo<(tY9r2*Z3SXqNE z&s7zumaDeHZU5NtpxAM-y4Zijnqz;CmB%UL*2KLRcQWp)xUTU}#D~O3#wWz5#%IQ7 z#V?Lu8DARzkN9`u_Z#QFPKSEc;sj`X`*k|cxKvNepKcAagjvIEVQpbV?j`q@`^f#| z0dko3G#Pgl?s>RR#T{#H5lp!1(W4qd zmLp^5Uo#+eIB@E3t zXyE@Sgtk*ig@XQZ3))8t?r?Iiv;H4>9^~bpV_V^U;rvB6VbgRaa8E}X;dB3P-Nmlp zNa3W6U)HyjZ0X{V@M{~|e7M7-bj7dOZJ&6QmUZ_a{>n$`;bT0AuKT0(&Pg89Kf}2s z$C1`K8^C2T4XZhWZ<4t)ZpWmNm3z4_N@TJjIMx=IPQ3=ILhV z<}4;;J^p%T9J_@M^ -1); + + actEdit.Enabled := itemSelected; + actRemove.Enabled := itemSelected; +end; + + +procedure TfrmCmpSwConfiguration.RefreshFilters(); +begin + lbFilters.Count := Settings.Filter.Count; +end; + + +procedure TfrmCmpSwConfiguration.lbFiltersData(Control: TWinControl; Index: Integer; var Data: String); +begin + if (Index >= 0) and (Index < Settings.Filter.Count) then + Data := Settings.Filter[Index].Name; +end; + + +procedure TfrmCmpSwConfiguration.lbFiltersDataObject(Control: TWinControl; Index: Integer; var DataObject: TObject); +begin + if (Index >= 0) and (Index < Settings.Filter.Count) then + DataObject := Settings.Filter[Index]; +end; + +end. diff --git a/Source/CmpSwDialog.dfm b/Source/CmpSwDialog.dfm index 641a28b..1ca437d 100644 --- a/Source/CmpSwDialog.dfm +++ b/Source/CmpSwDialog.dfm @@ -37,6 +37,15 @@ inherited frmCmpSwDialog: TfrmCmpSwDialog inherited btnOK: TButton Left = 190 end + object btnConfiguration: TButton + Left = 4 + Top = 5 + Width = 85 + Height = 25 + Caption = '&Configuration' + TabOrder = 2 + OnClick = btnConfigurationClick + end end object pnlFilters: TPanel [3] Left = 0 diff --git a/Source/CmpSwDialog.pas b/Source/CmpSwDialog.pas index 2ed592d..42dba27 100644 --- a/Source/CmpSwDialog.pas +++ b/Source/CmpSwDialog.pas @@ -51,10 +51,12 @@ type pmnItemsSortByName: TMenuItem; pmnItemsSortByType: TMenuItem; pmnItemsSep2: TMenuItem; - + btnConfiguration: TButton; + procedure btnMoreFiltersClick(Sender: TObject); procedure FormShow(Sender: TObject); procedure SortExecute(Sender: TObject); + procedure btnConfigurationClick(Sender: TObject); private FClassFilteredList: TBaseSwItemList; FClassFilter: TCmpSwComponentClassFilter; @@ -93,6 +95,7 @@ uses SysUtils, ToolsAPI, + CmpSwConfiguration, CmpSwObjects, CmpSwSettings; @@ -247,6 +250,8 @@ begin FFilterCheckBoxes := TObjectList.Create(); FOtherGroup := TCmpSwFilterGroup.Create(nil); try + ClassFilter.Groups := Settings.Filter; + FOtherGroup.Name := 'Other'; FOtherGroup.Enabled := False; FOtherGroup.Visible := False; @@ -471,8 +476,6 @@ begin Self.ClientHeight := Settings.Dialog.Height; MRUList.Assign(Settings.Dialog.MRUList); - Settings.LoadFilter(ClassFilter.Groups); - inherited LoadSettings(); end; @@ -486,8 +489,6 @@ begin Settings.Dialog.MRUList.Assign(MRUList); Settings.Save(); - Settings.SaveFilter(ClassFilter.Groups); - inherited SaveSettings(); end; @@ -495,7 +496,7 @@ end; function TfrmCmpSwDialog.AllowEmptyResult(): Boolean; begin - Result := True; + Result := Settings.AllowEmptyResult; end; @@ -533,4 +534,14 @@ begin ClassFilteredList.Sort(SortByName); end; + +procedure TfrmCmpSwDialog.btnConfigurationClick(Sender: TObject); +begin + if TfrmCmpSwConfiguration.Execute() then + begin + UpdateClassFilter(); + UpdateSubFilters(); + end; +end; + end. diff --git a/Source/CmpSwFilterConfiguration.dfm b/Source/CmpSwFilterConfiguration.dfm new file mode 100644 index 0000000..7a5d428 --- /dev/null +++ b/Source/CmpSwFilterConfiguration.dfm @@ -0,0 +1,62 @@ +object frmCmpSwFilterConfiguration: TfrmCmpSwFilterConfiguration + Left = 317 + Top = 192 + BorderIcons = [biSystemMenu] + BorderStyle = bsDialog + BorderWidth = 8 + Caption = 'Filter' + ClientHeight = 343 + ClientWidth = 345 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + Position = poScreenCenter + PixelsPerInch = 96 + TextHeight = 13 + object gbMain: TGroupBox + Left = 0 + Top = 0 + Width = 345 + Height = 308 + Align = alClient + TabOrder = 0 + end + object pnlButtons: TPanel + Left = 0 + Top = 308 + Width = 345 + Height = 35 + Align = alBottom + BevelOuter = bvNone + TabOrder = 1 + DesignSize = ( + 345 + 35) + object btnOk: TButton + Left = 189 + Top = 10 + Width = 75 + Height = 25 + Anchors = [akRight, akBottom] + Caption = 'OK' + Default = True + ModalResult = 1 + TabOrder = 0 + end + object btnCancel: TButton + Left = 270 + Top = 10 + Width = 75 + Height = 25 + Anchors = [akRight, akBottom] + Cancel = True + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 1 + end + end +end diff --git a/Source/CmpSwFilterConfiguration.pas b/Source/CmpSwFilterConfiguration.pas new file mode 100644 index 0000000..6adcbe3 --- /dev/null +++ b/Source/CmpSwFilterConfiguration.pas @@ -0,0 +1,57 @@ +{: Contains the filter configuration dialog. + + Last changed: $Date$ + Revision: $Rev$ + Author: $Author$ +} +unit CmpSwFilterConfiguration; + +interface +uses + Classes, + Controls, + ExtCtrls, + Forms, + StdCtrls, + + CmpSwFilters; + + +type + TfrmCmpSwFilterConfiguration = class(TForm) + gbMain: TGroupBox; + pnlButtons: TPanel; + btnOk: TButton; + btnCancel: TButton; + protected + function InternalExecute(AGroup: TCmpSwFilterGroup): Boolean; + public + class function Execute(AGroup: TCmpSwFilterGroup): Boolean; + end; + + +implementation + + +{$R *.dfm} + + +{ TfrmCmpSwFilterConfiguration } +class function TfrmCmpSwFilterConfiguration.Execute(AGroup: TCmpSwFilterGroup): Boolean; +begin + with Self.Create(nil) do + try + Result := InternalExecute(AGroup); + finally + Free(); + end; +end; + + +function TfrmCmpSwFilterConfiguration.InternalExecute(AGroup: TCmpSwFilterGroup): Boolean; +begin + Result := (ShowModal() = mrOk); +end; + +end. + diff --git a/Source/CmpSwFilters.pas b/Source/CmpSwFilters.pas index be247fc..0808ae9 100644 --- a/Source/CmpSwFilters.pas +++ b/Source/CmpSwFilters.pas @@ -60,14 +60,17 @@ type private FFilterUnmatched: Boolean; FGroups: TCmpSwFilterGroups; + FOwnsGroups: Boolean; + + function GetGroups(): TCmpSwFilterGroups; + procedure SetGroups(const Value: TCmpSwFilterGroups); protected procedure VisitItem(const AItem: TBaseSwItem); override; public - constructor Create(); destructor Destroy(); override; property FilterUnmatched: Boolean read FFilterUnmatched write FFilterUnmatched; - property Groups: TCmpSwFilterGroups read FGroups; + property Groups: TCmpSwFilterGroups read GetGroups write SetGroups; end; @@ -243,19 +246,37 @@ end; { TCmpSwComponentClassFilter } -constructor TCmpSwComponentClassFilter.Create(); +destructor TCmpSwComponentClassFilter.Destroy(); begin - inherited; + if FOwnsGroups then + FreeAndNil(FGroups); - FGroups := TCmpSwFilterGroups.Create(); + inherited; end; -destructor TCmpSwComponentClassFilter.Destroy(); +function TCmpSwComponentClassFilter.GetGroups(): TCmpSwFilterGroups; begin - FreeAndNil(FGroups); + if not Assigned(FGroups) then + begin + FGroups := TCmpSwFilterGroups.Create(); + FOwnsGroups := True; + end; - inherited; + Result := FGroups; +end; + + +procedure TCmpSwComponentClassFilter.SetGroups(const Value: TCmpSwFilterGroups); +begin + if Value <> FGroups then + begin + if FOwnsGroups then + FreeAndNil(FGroups); + + FGroups := Value; + FOwnsGroups := False; + end; end; diff --git a/Source/CmpSwSettings.pas b/Source/CmpSwSettings.pas index 061549c..e8c17d5 100644 --- a/Source/CmpSwSettings.pas +++ b/Source/CmpSwSettings.pas @@ -36,12 +36,17 @@ type TCmpSwSettings = class(TObject) private + FAllowEmptyResult: Boolean; FDialog: TCmpSwDialogSettings; - + FFilter: TCmpSwFilterGroups; + FRegistryKey: String; protected procedure Load(); + procedure LoadFilter(const AKey: String; AGroups: TCmpSwFilterGroups); + procedure SaveFilter(const AKey: String; AGroups: TCmpSwFilterGroups); + procedure LoadFilterGroup(ARegistry: TRegistry; AGroup: TCmpSwFilterGroup); procedure SaveFilterGroup(ARegistry: TRegistry; AGroup: TCmpSwFilterGroup); public @@ -51,10 +56,9 @@ type procedure ResetDefaults(); procedure Save(); - procedure LoadFilter(AGroups: TCmpSwFilterGroups); - procedure SaveFilter(AGroups: TCmpSwFilterGroups); - - property Dialog: TCmpSwDialogSettings read FDialog write FDialog; + property AllowEmptyResult: Boolean read FAllowEmptyResult write FAllowEmptyResult; + property Dialog: TCmpSwDialogSettings read FDialog write FDialog; + property Filter: TCmpSwFilterGroups read FFilter; end; function Settings(): TCmpSwSettings; @@ -144,6 +148,7 @@ begin '\ComponentSwitcher'; FDialog := TCmpSwDialogSettings.Create(); + FFilter := TCmpSwFilterGroups.Create(); ResetDefaults(); Load(); @@ -152,6 +157,7 @@ end; destructor TCmpSwSettings.Destroy(); begin + FreeAndNil(FFilter); FreeAndNil(FDialog); inherited; @@ -171,6 +177,7 @@ begin if OpenKey(FRegistryKey, False) then begin FDialog.Load(ideRegistry); + LoadFilter('\Filter', Filter); CloseKey(); end; @@ -182,8 +189,46 @@ end; procedure TCmpSwSettings.ResetDefaults(); begin + AllowEmptyResult := True; + Dialog.Width := 350; Dialog.Height := 530; + + { Fill default groups } + Filter.Clear(); + with Filter.Add() do + begin + Name := 'Actions'; + + Filter.Add('TAction'); + IncludeDescendants := True; + Visible := True; + end; + + with Filter.Add() do + begin + Name := 'Menu items'; + + Filter.Add('TMenuItem'); + Visible := True; + end; + + with Filter.Add() do + begin + Name := 'Dataset fields'; + + Filter.Add('TField'); + IncludeDescendants := True; + Visible := True; + end; + + with Filter.Add() do + begin + Name := 'DevEx Grid columns'; + + Filter.Add('TcxGridDBColumn'); + Filter.Add('TcxGridColumn'); + end; end; @@ -200,6 +245,7 @@ begin if OpenKey(FRegistryKey, True) then begin FDialog.Save(ideRegistry); + SaveFilter('\Filter', Filter); CloseKey(); end; @@ -209,7 +255,7 @@ begin end; -procedure TCmpSwSettings.LoadFilter(AGroups: TCmpSwFilterGroups); +procedure TCmpSwSettings.LoadFilter(const AKey: String; AGroups: TCmpSwFilterGroups); var ideRegistry: TRegistry; groupCount: Integer; @@ -222,7 +268,7 @@ begin try RootKey := HKEY_CURRENT_USER; - if OpenKey(FRegistryKey + '\Filter', False) then + if OpenKey(FRegistryKey + AKey, False) then begin AGroups.Clear(); groupCount := 0; @@ -240,42 +286,6 @@ begin CloseKey(); end; end; - end else - begin - { Fill default groups } - with AGroups.Add() do - begin - Name := 'Actions'; - - Filter.Add('TAction'); - IncludeDescendants := True; - Visible := True; - end; - - with AGroups.Add() do - begin - Name := 'Menu items'; - - Filter.Add('TMenuItem'); - Visible := True; - end; - - with AGroups.Add() do - begin - Name := 'Dataset fields'; - - Filter.Add('TField'); - IncludeDescendants := True; - Visible := True; - end; - - with AGroups.Add() do - begin - Name := 'DevEx Grid columns'; - - Filter.Add('TcxGridDBColumn'); - Filter.Add('TcxGridColumn'); - end; end; finally Free(); @@ -283,7 +293,7 @@ begin end; -procedure TCmpSwSettings.SaveFilter(AGroups: TCmpSwFilterGroups); +procedure TCmpSwSettings.SaveFilter(const AKey: String; AGroups: TCmpSwFilterGroups); var ideRegistry: TRegistry; subKeys: TStringList; @@ -296,7 +306,7 @@ begin try RootKey := HKEY_CURRENT_USER; - if OpenKey(FRegistryKey + '\Filter', True) then + if OpenKey(FRegistryKey + AKey, True) then begin subKeys := TStringList.Create(); try