zeoslib  UNKNOWN
 All Files
ZComponentReg.pas
Go to the documentation of this file.
1 {*********************************************************}
2 { }
3 { Zeos Database Objects }
4 { Database Components Registration }
5 { }
6 { Originally written by Sergey Seroukhov }
7 { }
8 {*********************************************************}
9 
10 {@********************************************************}
11 { Copyright (c) 1999-2012 Zeos Development Group }
12 { }
13 { License Agreement: }
14 { }
15 { This library is distributed in the hope that it will be }
16 { useful, but WITHOUT ANY WARRANTY; without even the }
17 { implied warranty of MERCHANTABILITY or FITNESS FOR }
18 { A PARTICULAR PURPOSE. See the GNU Lesser General }
19 { Public License for more details. }
20 { }
21 { The source code of the ZEOS Libraries and packages are }
22 { distributed under the Library GNU General Public }
23 { License (see the file COPYING / COPYING.ZEOS) }
24 { with the following modification: }
25 { As a special exception, the copyright holders of this }
26 { library give you permission to link this library with }
27 { independent modules to produce an executable, }
28 { regardless of the license terms of these independent }
29 { modules, and to copy and distribute the resulting }
30 { executable under terms of your choice, provided that }
31 { you also meet, for each linked independent module, }
32 { the terms and conditions of the license of that module. }
33 { An independent module is a module which is not derived }
34 { from or based on this library. If you modify this }
35 { library, you may extend this exception to your version }
36 { of the library, but you are not obligated to do so. }
37 { If you do not wish to do so, delete this exception }
38 { statement from your version. }
39 { }
40 { }
41 { The project web site is located on: }
42 { http://zeos.firmos.at (FORUM) }
43 { http://sourceforge.net/p/zeoslib/tickets/ (BUGTRACKER)}
44 { svn://svn.code.sf.net/p/zeoslib/code-0/trunk (SVN) }
45 { }
46 { http://www.sourceforge.net/projects/zeoslib. }
47 { }
48 { }
49 { Zeos Development Group. }
50 {********************************************************@}
51 
52 unit ZComponentReg;
53 
54 interface
55 
56 {$I ZComponent.inc}
57 
58 { Zeos palette names }
59 const
60  ZEOS_DB_PALETTE = 'Zeos Access';
61 
62 procedure Register;
63 
64 implementation
65 
66 uses
67 {$IFDEF WITH_PROPERTY_EDITOR}
68  ZPropertyEditor,
69 {$IFDEF FPC}
70  PropEdits,
71  ZUpdateSqlEditor,
72  ComponentEditors,
73  LResources,
74 {$ELSE}
75 {$IFNDEF UNIX}
76 {$IFNDEF FPC}
77  ZUpdateSqlEditor,
78 {$ENDIF}
79 {$ENDIF}
80  DesignIntf,
81  SysUtils, // **** Pitfiend addition, required to be able to put info in the delphi ide splash screen and about box
82  ToolsAPI, //
83 {$ENDIF}
84 {$ENDIF}
85  Classes, ZConnection, ZAbstractConnection, ZDataset, ZSqlUpdate, ZSqlProcessor,
86  ZStoredProcedure, ZGroupedConnection, ZConnectionGroup ,
87  ZSqlMonitor, ZSqlMetadata, ZSequence
88  {$IFDEF ENABLE_INTERBASE}, ZIBEventAlerter {$ENDIF}
89  {$IFDEF ENABLE_POSTGRESQL}, ZPgEventAlerter {$ENDIF};
90 
91 {**
92  Registers components in a component palette.
93 }
94 procedure Register;
95 {$IFNDEF FPC} // **** Pitfiend addition start
96 {$IF DECLARED(IOTAAboutBoxServices)} // this allow to put a nice and pro entry in the delphi ide splash screen and about box
97 var //
98  AboutSvcs: IOTAAboutBoxServices; //
99 {$IFEND} //
100 {$ENDIF} // **** Pitfiend addition end
101 begin
102  RegisterComponents(ZEOS_DB_PALETTE, [
103  TZConnection, TZReadOnlyQuery, TZQuery, TZTable, TZUpdateSQL,
104  TZConnectionGroup, TZGroupedConnection,
105  TZStoredProc, TZSQLMetadata, TZSQLProcessor, TZSQLMonitor, TZSequence
106  {$IFDEF ENABLE_INTERBASE}, TZIBEventAlerter {$ENDIF}
107  {$IFDEF ENABLE_POSTGRESQL}, TZPgEventAlerter{$ENDIF}]) ;
108 
109  {$IFDEF WITH_ZSTRINGFIELDS}
110  RegisterClasses([TZWideStringField, TZStringField]);
111  {$ENDIF}
112 {$IFNDEF FPC} // **** Pitfiend addition start
113 {$IF DECLARED(IOTAAboutBoxServices)}
114  if Assigned(SplashScreenServices) then
115  SplashScreenServices.AddPluginBitmap('ZEOSLib Open Source Database Objects', 0); // to have a nice icon, a .res file must be included, then replace 0 by loadbitmap(HInstance, 'RESOURCENAME')
116  if (BorlandIDEServices<>nil) and supports(BorlandIDEServices, IOTAAboutBoxServices, AboutSvcs) then
117  AboutSvcs.AddPluginInfo('ZEOSLib', 'ZEOSLib'+sLineBreak+'OpenSource database components collection'+sLineBreak+sLineBreak+'Forum:http://zeoslib.sourceforge.net', 0, False, 'OpenSource'); // replace 0 by loadbitmap(HInstance, 'RESOURCENAME')
118 {$IFEND}
119 {$ENDIF} // **** Pitfiend addition end
120 
121 {$IFDEF WITH_PROPERTY_EDITOR}
122 
123  RegisterPropertyEditor(TypeInfo(string), TZConnection, 'ClientCodepage', TZClientCodePagePropertyEditor); {EgonHugeist}
124  RegisterPropertyEditor(TypeInfo(string), TZConnection, 'Protocol', TZProtocolPropertyEditor);
125  RegisterPropertyEditor(TypeInfo(string), TZConnection, 'Database', TZDatabasePropertyEditor);
126  RegisterPropertyEditor(TypeInfo(string), TZConnection, 'Catalog', TZCatalogPropertyEditor);
127  RegisterPropertyEditor(TypeInfo(string), TZConnection, 'LibraryLocation', TZLibLocationPropertyEditor);
128 
129  RegisterPropertyEditor(TypeInfo(string), TZConnectionGroup, 'Protocol', TZProtocolPropertyEditor);
130  RegisterPropertyEditor(TypeInfo(string), TZConnectionGroup, 'Database', TZConnectionGroupPropertyEditor);
131  RegisterPropertyEditor(TypeInfo(string), TZGroupedConnection, 'Catalog', TZGroupedConnectionCatalogPropertyEditor);
132  RegisterPropertyEditor(TypeInfo(string), TZConnectionGroup, 'LibraryLocation', TZConnectionGroupLibLocationPropertyEditor);
133 
134  RegisterPropertyEditor(TypeInfo(string), TZQuery, 'LinkedFields', TZDataFieldPropertyEditor); {renamed by bangfauzan}
135  RegisterPropertyEditor(TypeInfo(string), TZQuery, 'MasterFields', TZMasterFieldPropertyEditor);
136  RegisterPropertyEditor(TypeInfo(string), TZQuery, 'SortedFields', TZDataFieldPropertyEditor);
137  RegisterPropertyEditor(TypeInfo(string), TZQuery, 'SequenceField', TZDataFieldPropertyEditor);
138 
139  RegisterPropertyEditor(TypeInfo(string), TZReadOnlyQuery, 'LinkedFields', TZDataFieldPropertyEditor); {renamed by bangfauzan}
140  RegisterPropertyEditor(TypeInfo(string), TZReadOnlyQuery, 'MasterFields', TZMasterFieldPropertyEditor);
141  RegisterPropertyEditor(TypeInfo(string), TZReadOnlyQuery, 'SortedFields', TZDataFieldPropertyEditor);
142 
143  RegisterPropertyEditor(TypeInfo(string), TZTable, 'TableName', TZTableNamePropertyEditor);
144  RegisterPropertyEditor(TypeInfo(string), TZTable, 'LinkedFields', TZDataFieldPropertyEditor); {renamed by bangfauzan}
145  RegisterPropertyEditor(TypeInfo(string), TZTable, 'MasterFields', TZMasterFieldPropertyEditor);
146  RegisterPropertyEditor(TypeInfo(string), TZTable, 'SortedFields', TZDataFieldPropertyEditor);
147  RegisterPropertyEditor(TypeInfo(string), TZTable, 'SequenceField', TZDataFieldPropertyEditor);
148 
149  RegisterPropertyEditor(TypeInfo(string), TZStoredProc, 'StoredProcName', TZProcedureNamePropertyEditor);
150  RegisterPropertyEditor(TypeInfo(string), TZStoredProc, 'SortedFields', TZDataFieldPropertyEditor);
151 
152  RegisterPropertyEditor(TypeInfo(string), TZSequence, 'SequenceName', TZSequenceNamePropertyEditor);
153 
154 {$IFDEF USE_METADATA}
155  RegisterPropertyEditor(TypeInfo(string), TZSQLMetadata, 'Catalog', TZCatalogProperty);
156  RegisterPropertyEditor(TypeInfo(string), TZSQLMetadata, 'ColumnName', TZColumnNamePropertyEditor);
157  RegisterPropertyEditor(TypeInfo(string), TZSQLMetadata, 'ForeignCatalog', TZCatalogProperty);
158  RegisterPropertyEditor(TypeInfo(string), TZSQLMetadata, 'ForeignSchema', TZSchemaPropertyEditor);
159  RegisterPropertyEditor(TypeInfo(string), TZSQLMetadata, 'ForeignTableName', TZTableNamePropertyEditor);
160  RegisterPropertyEditor(TypeInfo(string), TZSQLMetadata, 'LinkedFields', TZDataFieldPropertyEditor); {renamed by bangfauzan}
161  RegisterPropertyEditor(TypeInfo(string), TZSQLMetadata, 'MasterFields', TZMasterFieldPropertyEditor);
162  RegisterPropertyEditor(TypeInfo(string), TZSQLMetadata, 'ProcedureName', TZProcedureNamePropertyEditor);
163  RegisterPropertyEditor(TypeInfo(string), TZSQLMetadata, 'Schema', TZSchemaPropertyEditor);
164  RegisterPropertyEditor(TypeInfo(string), TZSQLMetadata, 'SequenceName', TZSequenceNamePropertyEditor);
165  RegisterPropertyEditor(TypeInfo(string), TZSQLMetadata, 'SortedFields', TZDataFieldPropertyEditor);
166  RegisterPropertyEditor(TypeInfo(string), TZSQLMetadata, 'TableName', TZTableNamePropertyEditor);
167  RegisterPropertyEditor(TypeInfo(string), TZSQLMetadata, 'TypeName', TZTypeNamePropertyEditor);
168 {$ENDIF}
169 {$IFDEF FPC}
170  RegisterComponentEditor(TZUpdateSQL, TZUpdateSQLEditor);
171 {$ELSE}
172  {$IFNDEF UNIX}
173  RegisterComponentEditor(TZUpdateSQL, TZUpdateSQLEditor);
174  {$ENDIF}
175  {$ENDIF}
176 {$ENDIF}
177 end;
178 
179 {$IFDEF FPC}
180 initialization
181  {$I ZComponentReg.lrs}
182 {$ENDIF}
183 
184 end.
185