* Removed filter property, added tablenamehint

git-svn-id: trunk@15930 -
This commit is contained in:
michael 2008-07-31 12:41:10 +00:00
parent dbd42eaff5
commit 78a1d090fe
4 changed files with 30 additions and 92 deletions

View File

@ -18,6 +18,7 @@ Type
FGenerator : TDDCustomCodeGenerator;
FShowResult: Boolean;
FSQL: TStrings;
FTableNameHint: String;
function SelectGenerator: TCodeGeneratorItem;
procedure SetDataset(const AValue: TDataset);
procedure SetFieldDefs(const AValue: TDDFieldDefs);
@ -35,6 +36,7 @@ Type
Property SQL : TStrings Read FSQL Write SetSQL;
Property ShowResult : Boolean Read FShowResult Write FShowResult default true;
Property FileName : String Read FFileName Write FFileName;
Property TableNameHint : String Read FTableNameHint Write FTableNameHint;
end;
implementation
@ -115,6 +117,8 @@ begin
end;
If FGenerator.NeedsSQL then
FGenerator.SQL:=Self.SQL;
If (TableNameHint<>'') and IsPublishedProp(FGenerator.CodeOptions,'TableName') then
SetStrProp(FGenerator.CodeOptions,'TableName',TableNameHint);
F:=TBaseConfigGeneratorForm.Create(Application);
try
F.ShowExtra:=True;

View File

@ -317,7 +317,6 @@ object BaseConfigGeneratorForm: TBaseConfigGeneratorForm
Top = 28
Width = 283
Align = alClient
Filter = [tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkObject, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw]
ValueFont.Color = clMaroon
end
end
@ -329,7 +328,6 @@ object BaseConfigGeneratorForm: TBaseConfigGeneratorForm
Height = 279
Width = 462
Align = alClient
Filter = [tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkObject, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw]
PrefferedSplitterX = 200
SplitterX = 200
ValueFont.Color = clMaroon

View File

@ -1,7 +1,7 @@
object CodeForm: TCodeForm
Left = 290
Left = 350
Height = 300
Top = 190
Top = 194
Width = 400
ActiveControl = MCode
Caption = 'Generated code'
@ -15,10 +15,10 @@ object CodeForm: TCodeForm
Align = alClient
Font.Height = 14
Font.Name = '-adobe-courier-medium-r-normal-*-*-*-*-*-*-*-iso10646-1'
Font.Pitch = fpFixed
ParentColor = False
TabOrder = 0
BookMarkOptions.Xoffset = 17
BookMarkOptions.OnChange = nil
ExtraLineSpacing = 2
Gutter.DigitCount = 3
Gutter.LeftOffset = 4
@ -349,7 +349,6 @@ object CodeForm: TCodeForm
Lines.Strings = (
''
)
SelectedColor.OnChange = nil
end
object PButtons: TPanel
Height = 44

View File

@ -1,21 +1,21 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TCodeForm','FORMDATA',[
'TPF0'#9'TCodeForm'#8'CodeForm'#4'Left'#3'"'#1#6'Height'#3','#1#3'Top'#3#190#0
'TPF0'#9'TCodeForm'#8'CodeForm'#4'Left'#3'^'#1#6'Height'#3','#1#3'Top'#3#194#0
+#5'Width'#3#144#1#13'ActiveControl'#7#5'MCode'#7'Caption'#6#14'Generated cod'
+'e'#12'ClientHeight'#3','#1#11'ClientWidth'#3#144#1#10'LCLVersion'#6#6'0.9.2'
+'5'#0#8'TSynMemo'#5'MCode'#6'Cursor'#7#7'crIBeam'#6'Height'#3#0#1#5'Width'#3
+#144#1#5'Align'#7#8'alClient'#11'Font.Height'#2#14#9'Font.Name'#6'7-adobe-co'
+'urier-medium-r-normal-*-*-*-*-*-*-*-iso10646-1'#11'ParentColor'#8#8'TabOrde'
+'r'#2#0#23'BookMarkOptions.Xoffset'#2#17#24'BookMarkOptions.OnChange'#13#16
+'ExtraLineSpacing'#2#2#17'Gutter.DigitCount'#2#3#17'Gutter.LeftOffset'#2#4#22
+'Gutter.ShowLineNumbers'#9#23'Gutter.CodeFoldingWidth'#2#14#11'Highlighter'#7
+#17'SynFreePascalSyn1'#10'Keystrokes'#14#1#7'Command'#2#3#8'ShortCut'#2'&'#0
+#1#7'Command'#2'g'#8'ShortCut'#3'& '#0#1#7'Command'#3#211#0#8'ShortCut'#3'&@'
+#0#1#7'Command'#2#4#8'ShortCut'#2'('#0#1#7'Command'#2'h'#8'ShortCut'#3'( '#0
+#1#7'Command'#3#212#0#8'ShortCut'#3'(@'#0#1#7'Command'#2#1#8'ShortCut'#2'%'#0
+#1#7'Command'#2'e'#8'ShortCut'#3'% '#0#1#7'Command'#2#5#8'ShortCut'#3'%@'#0#1
+#7'Command'#2'i'#8'ShortCut'#3'%`'#0#1#7'Command'#2#2#8'ShortCut'#2''''#0#1#7
+'urier-medium-r-normal-*-*-*-*-*-*-*-iso10646-1'#10'Font.Pitch'#7#7'fpFixed'
+#11'ParentColor'#8#8'TabOrder'#2#0#23'BookMarkOptions.Xoffset'#2#17#16'Extra'
+'LineSpacing'#2#2#17'Gutter.DigitCount'#2#3#17'Gutter.LeftOffset'#2#4#22'Gut'
+'ter.ShowLineNumbers'#9#23'Gutter.CodeFoldingWidth'#2#14#11'Highlighter'#7#17
+'SynFreePascalSyn1'#10'Keystrokes'#14#1#7'Command'#2#3#8'ShortCut'#2'&'#0#1#7
+'Command'#2'g'#8'ShortCut'#3'& '#0#1#7'Command'#3#211#0#8'ShortCut'#3'&@'#0#1
+#7'Command'#2#4#8'ShortCut'#2'('#0#1#7'Command'#2'h'#8'ShortCut'#3'( '#0#1#7
+'Command'#3#212#0#8'ShortCut'#3'(@'#0#1#7'Command'#2#1#8'ShortCut'#2'%'#0#1#7
+'Command'#2'e'#8'ShortCut'#3'% '#0#1#7'Command'#2#5#8'ShortCut'#3'%@'#0#1#7
+'Command'#2'i'#8'ShortCut'#3'%`'#0#1#7'Command'#2#2#8'ShortCut'#2''''#0#1#7
+'Command'#2'f'#8'ShortCut'#3''' '#0#1#7'Command'#2#6#8'ShortCut'#3'''@'#0#1#7
+'Command'#2'j'#8'ShortCut'#3'''`'#0#1#7'Command'#2#10#8'ShortCut'#2'"'#0#1#7
+'Command'#2'n'#8'ShortCut'#3'" '#0#1#7'Command'#2#14#8'ShortCut'#3'"@'#0#1#7
@ -52,79 +52,16 @@ LazarusResources.Add('TCodeForm','FORMDATA',[
+#7'Command'#3#231#0#8'ShortCut'#3'N`'#0#1#7'Command'#3#232#0#8'ShortCut'#3'C'
+'`'#0#1#7'Command'#3#233#0#8'ShortCut'#3'L`'#0#1#7'Command'#3'd'#2#8'ShortCu'
+'t'#2#9#0#1#7'Command'#3'e'#2#8'ShortCut'#3#9' '#0#1#7'Command'#3#250#0#8'Sh'
+'ortCut'#3'B`'#0#0#13'Lines.Strings'#1#6#0#0#22'SelectedColor.OnChange'#13#0
+#0#6'TPanel'#8'PButtons'#6'Height'#2','#3'Top'#3#0#1#5'Width'#3#144#1#5'Alig'
+'n'#7#8'alBottom'#12'ClientHeight'#2','#11'ClientWidth'#3#144#1#8'TabOrder'#2
+#1#0#7'TButton'#6'BClose'#4'Left'#3'8'#1#6'Height'#2#25#3'Top'#2#8#5'Width'#2
+'K'#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Caption'#6#6'&Close'#11'ModalResul'
+'t'#2#1#8'TabOrder'#2#0#0#0#7'TButton'#5'BSave'#4'Left'#2#8#6'Height'#2#25#3
+'Top'#2#8#5'Width'#2'K'#7'Caption'#6#5'&Save'#7'OnClick'#7#10'BSaveClick'#8
+'TabOrder'#2#1#0#0#0#17'TSynFreePascalSyn'#17'SynFreePascalSyn1'#7'Enabled'#8
+#14'NestedComments'#9#4'left'#2'j'#3'top'#2#27#0#0#11'TSaveDialog'#6'SDCode'
+#10'DefaultExt'#6#3'.pp'#6'Filter'#6'+Pascal files|*.pp;*.pas;*.inc|All file'
+'s|*.*'#7'Options'#11#17'ofOverwritePrompt'#15'ofPathMustExist'#14'ofEnableS'
+'izing'#12'ofViewDetail'#0#4'left'#3#144#0#3'top'#3#7#1#0#0#0#9'TCodeForm'#8
+'CodeForm'#4'Left'#3'"'#1#6'Height'#3','#1#3'Top'#3#190#0#5'Width'#3#144#1#13
,'ActiveControl'#7#5'MCode'#7'Caption'#6#14'Generated code'#12'ClientHeight'#3
+','#1#11'ClientWidth'#3#144#1#10'LCLVersion'#6#6'0.9.25'#0#8'TSynMemo'#5'MCo'
+'de'#6'Cursor'#7#7'crIBeam'#6'Height'#3#0#1#5'Width'#3#144#1#5'Align'#7#8'al'
+'Client'#11'Font.Height'#2#14#9'Font.Name'#6'7-adobe-courier-medium-r-normal'
+'-*-*-*-*-*-*-*-iso10646-1'#11'ParentColor'#8#8'TabOrder'#2#0#23'BookMarkOpt'
+'ions.Xoffset'#2#17#24'BookMarkOptions.OnChange'#13#16'ExtraLineSpacing'#2#2
+#17'Gutter.DigitCount'#2#3#17'Gutter.LeftOffset'#2#4#22'Gutter.ShowLineNumbe'
+'rs'#9#23'Gutter.CodeFoldingWidth'#2#14#11'Highlighter'#7#17'SynFreePascalSy'
+'n1'#10'Keystrokes'#14#1#7'Command'#2#3#8'ShortCut'#2'&'#0#1#7'Command'#2'g'
+#8'ShortCut'#3'& '#0#1#7'Command'#3#211#0#8'ShortCut'#3'&@'#0#1#7'Command'#2
+#4#8'ShortCut'#2'('#0#1#7'Command'#2'h'#8'ShortCut'#3'( '#0#1#7'Command'#3
+#212#0#8'ShortCut'#3'(@'#0#1#7'Command'#2#1#8'ShortCut'#2'%'#0#1#7'Command'#2
+'e'#8'ShortCut'#3'% '#0#1#7'Command'#2#5#8'ShortCut'#3'%@'#0#1#7'Command'#2
+'i'#8'ShortCut'#3'%`'#0#1#7'Command'#2#2#8'ShortCut'#2''''#0#1#7'Command'#2
+'f'#8'ShortCut'#3''' '#0#1#7'Command'#2#6#8'ShortCut'#3'''@'#0#1#7'Command'#2
+'j'#8'ShortCut'#3'''`'#0#1#7'Command'#2#10#8'ShortCut'#2'"'#0#1#7'Command'#2
+'n'#8'ShortCut'#3'" '#0#1#7'Command'#2#14#8'ShortCut'#3'"@'#0#1#7'Command'#2
+'r'#8'ShortCut'#3'"`'#0#1#7'Command'#2#9#8'ShortCut'#2'!'#0#1#7'Command'#2'm'
+#8'ShortCut'#3'! '#0#1#7'Command'#2#13#8'ShortCut'#3'!@'#0#1#7'Command'#2'q'
+#8'ShortCut'#3'!`'#0#1#7'Command'#2#7#8'ShortCut'#2'$'#0#1#7'Command'#2'k'#8
+'ShortCut'#3'$ '#0#1#7'Command'#2#15#8'ShortCut'#3'$@'#0#1#7'Command'#2's'#8
+'ShortCut'#3'$`'#0#1#7'Command'#2#8#8'ShortCut'#2'#'#0#1#7'Command'#2'l'#8'S'
+'hortCut'#3'# '#0#1#7'Command'#2#16#8'ShortCut'#3'#@'#0#1#7'Command'#2't'#8
+'ShortCut'#3'#`'#0#1#7'Command'#3#223#0#8'ShortCut'#2'-'#0#1#7'Command'#3#201
+#0#8'ShortCut'#3'-@'#0#1#7'Command'#3'\'#2#8'ShortCut'#3'- '#0#1#7'Command'#3
+#246#1#8'ShortCut'#2'.'#0#1#7'Command'#3'['#2#8'ShortCut'#3'. '#0#1#7'Comman'
+'d'#3#245#1#8'ShortCut'#2#8#0#1#7'Command'#3#245#1#8'ShortCut'#3#8' '#0#1#7
+'Command'#3#248#1#8'ShortCut'#3#8'@'#0#1#7'Command'#3'Y'#2#8'ShortCut'#4#8
+#128#0#0#0#1#7'Command'#3'Z'#2#8'ShortCut'#4#8#160#0#0#0#1#7'Command'#3#253#1
+#8'ShortCut'#2#13#0#1#7'Command'#3#199#0#8'ShortCut'#3'A@'#0#1#7'Command'#3
+#201#0#8'ShortCut'#3'C@'#0#1#7'Command'#3'b'#2#8'ShortCut'#3'I`'#0#1#7'Comma'
+'nd'#3#253#1#8'ShortCut'#3'M@'#0#1#7'Command'#3#254#1#8'ShortCut'#3'N@'#0#1#7
+'Command'#3#247#1#8'ShortCut'#3'T@'#0#1#7'Command'#3'c'#2#8'ShortCut'#3'U`'#0
+#1#7'Command'#3'\'#2#8'ShortCut'#3'V@'#0#1#7'Command'#3'['#2#8'ShortCut'#3'X'
+'@'#0#1#7'Command'#3#251#1#8'ShortCut'#3'Y@'#0#1#7'Command'#3#250#1#8'ShortC'
+'ut'#3'Y`'#0#1#7'Command'#3'Y'#2#8'ShortCut'#3'Z@'#0#1#7'Command'#3'Z'#2#8'S'
+'hortCut'#3'Z`'#0#1#7'Command'#3'-'#1#8'ShortCut'#3'0@'#0#1#7'Command'#3'.'#1
+#8'ShortCut'#3'1@'#0#1#7'Command'#3'/'#1#8'ShortCut'#3'2@'#0#1#7'Command'#3
+'0'#1#8'ShortCut'#3'3@'#0#1#7'Command'#3'1'#1#8'ShortCut'#3'4@'#0#1#7'Comman'
+'d'#3'2'#1#8'ShortCut'#3'5@'#0#1#7'Command'#3'3'#1#8'ShortCut'#3'6@'#0#1#7'C'
+'ommand'#3'4'#1#8'ShortCut'#3'7@'#0#1#7'Command'#3'5'#1#8'ShortCut'#3'8@'#0#1
+#7'Command'#3'6'#1#8'ShortCut'#3'9@'#0#1#7'Command'#3'_'#1#8'ShortCut'#3'0`'
+#0#1#7'Command'#3'`'#1#8'ShortCut'#3'1`'#0#1#7'Command'#3'a'#1#8'ShortCut'#3
+'2`'#0#1#7'Command'#3'b'#1#8'ShortCut'#3'3`'#0#1#7'Command'#3'c'#1#8'ShortCu'
+'t'#3'4`'#0#1#7'Command'#3'd'#1#8'ShortCut'#3'5`'#0#1#7'Command'#3'e'#1#8'Sh'
+'ortCut'#3'6`'#0#1#7'Command'#3'f'#1#8'ShortCut'#3'7`'#0#1#7'Command'#3'g'#1
+#8'ShortCut'#3'8`'#0#1#7'Command'#3'h'#1#8'ShortCut'#3'9`'#0#1#7'Command'#3
+#231#0#8'ShortCut'#3'N`'#0#1#7'Command'#3#232#0#8'ShortCut'#3'C`'#0#1#7'Comm'
+'and'#3#233#0#8'ShortCut'#3'L`'#0#1#7'Command'#3'd'#2#8'ShortCut'#2#9#0#1#7
+'Command'#3'e'#2#8'ShortCut'#3#9' '#0#1#7'Command'#3#250#0#8'ShortCut'#3'B`'
+#0#0#13'Lines.Strings'#1#6#0#0#22'SelectedColor.OnChange'#13#0#0#6'TPanel'#8
+'PButtons'#6'Height'#2','#3'Top'#3#0#1#5'Width'#3#144#1#5'Align'#7#8'alBotto'
+'m'#12'ClientHeight'#2','#11'ClientWidth'#3#144#1#8'TabOrder'#2#1#0#7'TButto'
+'n'#6'BClose'#4'Left'#3'8'#1#6'Height'#2#25#3'Top'#2#8#5'Width'#2'K'#7'Ancho'
+'rs'#11#5'akTop'#7'akRight'#0#7'Caption'#6#6'&Close'#11'ModalResult'#2#1#8'T'
+'abOrder'#2#0#0#0#7'TButton'#5'BSave'#4'Left'#2#8#6'Height'#2#25#3'Top'#2#8#5
+'Width'#2'K'#7'Caption'#6#5'&Save'#7'OnClick'#7#10'BSaveClick'#8'TabOrder'#2
+#1#0#0#0#17'TSynFreePascalSyn'#17'SynFreePascalSyn1'#7'Enabled'#8#14'NestedC'
+'omments'#9#4'left'#2'j'#3'top'#2#27#0#0#11'TSaveDialog'#6'SDCode'#10'Defaul'
+'tExt'#6#3'.pp'#6'Filter'#6'+Pascal files|*.pp;*.pas;*.inc|All files|*.*'#7
+'Options'#11#17'ofOverwritePrompt'#15'ofPathMustExist'#14'ofEnableSizing'#12
+'ofViewDetail'#0#4'left'#3#144#0#3'top'#3#7#1#0#0#0
+'ortCut'#3'B`'#0#0#13'Lines.Strings'#1#6#0#0#0#0#6'TPanel'#8'PButtons'#6'Hei'
+'ght'#2','#3'Top'#3#0#1#5'Width'#3#144#1#5'Align'#7#8'alBottom'#12'ClientHei'
+'ght'#2','#11'ClientWidth'#3#144#1#8'TabOrder'#2#1#0#7'TButton'#6'BClose'#4
+'Left'#3'8'#1#6'Height'#2#25#3'Top'#2#8#5'Width'#2'K'#7'Anchors'#11#5'akTop'
+#7'akRight'#0#7'Caption'#6#6'&Close'#11'ModalResult'#2#1#8'TabOrder'#2#0#0#0
+#7'TButton'#5'BSave'#4'Left'#2#8#6'Height'#2#25#3'Top'#2#8#5'Width'#2'K'#7'C'
+'aption'#6#5'&Save'#7'OnClick'#7#10'BSaveClick'#8'TabOrder'#2#1#0#0#0#17'TSy'
+'nFreePascalSyn'#17'SynFreePascalSyn1'#7'Enabled'#8#4'left'#2'j'#3'top'#2#27
+#0#0#11'TSaveDialog'#6'SDCode'#10'DefaultExt'#6#3'.pp'#6'Filter'#6'+Pascal f'
+'iles|*.pp;*.pas;*.inc|All files|*.*'#7'Options'#11#17'ofOverwritePrompt'#15
+'ofPathMustExist'#14'ofEnableSizing'#12'ofViewDetail'#0#4'left'#3#144#0#3'to'
+'p'#3#7#1#0#0#0
]);