-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathqtwsfactory.pas
596 lines (508 loc) · 15.2 KB
/
qtwsfactory.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
unit QtWSFactory;
{$mode objfpc}{$H+}
interface
uses
Classes, Controls, ComCtrls, Calendar, StdCtrls, Spin, Grids,
Dialogs, ExtCtrls, Buttons, CheckLst, Forms, Menus, RubberBand, PairSplitter,
WSLCLClasses, WSDialogs;
// imglist
function RegisterCustomImageListResolution: Boolean;
// controls
function RegisterDragImageListResolution: Boolean;
function RegisterLazAccessibleObject: Boolean;
function RegisterControl: Boolean;
function RegisterWinControl: Boolean;
function RegisterGraphicControl: Boolean;
function RegisterCustomControl: Boolean;
// comctrls
function RegisterStatusBar: Boolean;
function RegisterTabSheet: Boolean;
function RegisterPageControl: Boolean;
function RegisterCustomListView: Boolean;
function RegisterCustomProgressBar: Boolean;
function RegisterCustomUpDown: Boolean;
function RegisterCustomToolButton: Boolean;
function RegisterToolBar: Boolean;
function RegisterCustomTrackBar: Boolean;
function RegisterCustomTreeView: Boolean;
// calendar
function RegisterCustomCalendar: Boolean;
// dialogs
function RegisterCommonDialog: Boolean;
function RegisterFileDialog: Boolean;
function RegisterOpenDialog: Boolean;
function RegisterSaveDialog: Boolean;
function RegisterSelectDirectoryDialog: Boolean;
function RegisterColorDialog: Boolean;
function RegisterColorButton: Boolean;
function RegisterFontDialog: Boolean;
function RegisterTaskDialog: Boolean;
// StdCtrls
function RegisterCustomScrollBar: Boolean;
function RegisterCustomGroupBox: Boolean;
function RegisterCustomComboBox: Boolean;
function RegisterCustomListBox: Boolean;
function RegisterCustomEdit: Boolean;
function RegisterCustomMemo: Boolean;
function RegisterButtonControl: Boolean;
function RegisterCustomButton: Boolean;
function RegisterCustomCheckBox: Boolean;
function RegisterToggleBox: Boolean;
function RegisterRadioButton: Boolean;
function RegisterCustomStaticText: Boolean;
function RegisterCustomLabel: Boolean;
// extctrls
function RegisterCustomPage: Boolean;
function RegisterCustomNotebook: Boolean;
function RegisterCustomShape: Boolean;
function RegisterCustomSplitter: Boolean;
function RegisterPaintBox: Boolean;
function RegisterCustomImage: Boolean;
function RegisterBevel: Boolean;
function RegisterCustomRadioGroup: Boolean;
function RegisterCustomCheckGroup: Boolean;
function RegisterCustomLabeledEdit: Boolean;
function RegisterCustomPanel: Boolean;
function RegisterCustomTrayIcon: Boolean;
//ExtDlgs
function RegisterPreviewFileControl: Boolean;
function RegisterPreviewFileDialog: Boolean;
function RegisterOpenPictureDialog: Boolean;
function RegisterSavePictureDialog: Boolean;
function RegisterCalculatorDialog: Boolean;
function RegisterCalculatorForm: Boolean;
function RegisterCalendarDialog: Boolean;
// Buttons
function RegisterCustomBitBtn: Boolean;
function RegisterCustomSpeedButton: Boolean;
// CheckLst
function RegisterCustomCheckListBox: Boolean;
// Forms
function RegisterScrollingWinControl: Boolean;
function RegisterScrollBox: Boolean;
function RegisterCustomFrame: Boolean;
function RegisterCustomForm: Boolean;
function RegisterHintWindow: Boolean;
function RegisterCustomGrid: Boolean;
function RegisterMenuItem: Boolean;
function RegisterMenu: Boolean;
function RegisterMainMenu: Boolean;
function RegisterPopupMenu: Boolean;
function RegisterPairSplitterSide: Boolean;
function RegisterCustomPairSplitter: Boolean;
function RegisterCustomFloatSpinEdit: Boolean;
function RegisterCustomRubberBand: Boolean;
// ShellCtrls
function RegisterCustomShellTreeView: Boolean;
function RegisterCustomShellListView: Boolean;
// LazDeviceAPIs
function RegisterLazDeviceAPIs: Boolean;
implementation
uses
QtWSButtons,
QtWSCalendar,
QtWSCheckLst,
QtWSComCtrls,
QtWSControls,
QtWSDialogs,
QtWSExtCtrls,
QtWSForms,
QtWSMenus,
QtWSPairSplitter,
QtWSSpin,
QtWSStdCtrls,
QtWSGrids,
QtWSDesigner;
// imglist
function RegisterCustomImageListResolution: Boolean; alias : 'WSRegisterCustomImageListResolution';
begin
Result := False;
end;
// controls
function RegisterDragImageListResolution: Boolean; alias : 'WSRegisterDragImageListResolution';
begin
RegisterWSComponent(TDragImageListResolution, TQtWSDragImageListResolution);
Result := True;
end;
function RegisterLazAccessibleObject: Boolean; alias : 'WSRegisterLazAccessibleObject';
begin
{$IFDEF QTACCESSIBILITY}
RegisterWSLazAccessibleObject(TQtWSLazAccessibleObject);
Result := True;
{$ELSE}
Result := False;
{$ENDIF}
end;
function RegisterControl: Boolean; alias : 'WSRegisterControl';
begin
Result := False;
end;
function RegisterWinControl: Boolean; alias : 'WSRegisterWinControl';
begin
RegisterWSComponent(TWinControl, TQtWSWinControl);
Result := True;
end;
function RegisterGraphicControl: Boolean; alias : 'WSRegisterGraphicControl';
begin
Result := False;
end;
function RegisterCustomControl: Boolean; alias : 'WSRegisterCustomControl';
begin
RegisterWSComponent(TCustomControl, TQtWSCustomControl);
Result := True;
end;
// comctrls
function RegisterStatusBar: Boolean; alias : 'WSRegisterStatusBar';
begin
RegisterWSComponent(TStatusBar, TQtWSStatusBar);
Result := True;
end;
function RegisterTabSheet: Boolean; alias : 'WSRegisterTabSheet';
begin
Result := False;
end;
function RegisterPageControl: Boolean; alias : 'WSRegisterPageControl';
begin
Result := False;
end;
function RegisterCustomListView: Boolean; alias : 'WSRegisterCustomListView';
begin
RegisterWSComponent(TCustomListView, TQtWSCustomListView);
Result := True;
end;
function RegisterCustomProgressBar: Boolean; alias : 'WSRegisterCustomProgressBar';
begin
RegisterWSComponent(TCustomProgressBar, TQtWSProgressBar);
Result := True;
end;
function RegisterCustomUpDown: Boolean; alias : 'WSRegisterCustomUpDown';
begin
Result := False;
end;
function RegisterCustomToolButton: Boolean; alias : 'WSRegisterCustomToolButton';
begin
Result := False;
end;
function RegisterToolBar: Boolean; alias : 'WSRegisterToolBar';
begin
RegisterWSComponent(TToolBar, TQtWSToolBar);
Result := True;
end;
function RegisterCustomTrackBar: Boolean; alias : 'WSRegisterCustomTrackBar';
begin
RegisterWSComponent(TCustomTrackBar, TQtWSTrackBar);
Result := True;
end;
function RegisterCustomTreeView: Boolean; alias : 'WSRegisterCustomTreeView';
begin
Result := False;
end;
// calendar
function RegisterCustomCalendar: Boolean; alias : 'WSRegisterCustomCalendar';
begin
RegisterWSComponent(TCustomCalendar, TQtWSCustomCalendar);
Result := True;
end;
// dialogs
function RegisterCommonDialog: Boolean; alias : 'WSRegisterCommonDialog';
begin
RegisterWSComponent(TCommonDialog, TQtWSCommonDialog);
Result := True;
end;
function RegisterFileDialog: Boolean; alias : 'WSRegisterFileDialog';
begin
RegisterWSComponent(TFileDialog, TQtWSFileDialog);
Result := True;
end;
function RegisterOpenDialog: Boolean; alias : 'WSRegisterOpenDialog';
begin
RegisterWSComponent(TOpenDialog, TQtWSOpenDialog);
Result := True;
end;
function RegisterSaveDialog: Boolean; alias : 'WSRegisterSaveDialog';
begin
Result := False;
end;
function RegisterSelectDirectoryDialog: Boolean; alias : 'WSRegisterSelectDirectoryDialog';
begin
RegisterWSComponent(TSelectDirectoryDialog, TQtWSSelectDirectoryDialog);
Result := True;
end;
function RegisterColorDialog: Boolean; alias : 'WSRegisterColorDialog';
begin
RegisterWSComponent(TColorDialog, TQtWSColorDialog);
Result := True;
end;
function RegisterColorButton: Boolean; alias : 'WSRegisterColorButton';
begin
Result := False;
end;
function RegisterFontDialog: Boolean; alias : 'WSRegisterFontDialog';
begin
RegisterWSComponent(TFontDialog, TQtWSFontDialog);
Result := True;
end;
function RegisterTaskDialog: Boolean; alias : 'WSRegisterTaskDialog';
begin
RegisterWSComponent(TTaskDialog, TWSTaskDialog);
Result := True;
end;
// StdCtrls
function RegisterCustomScrollBar: Boolean; alias : 'WSRegisterCustomScrollBar';
begin
RegisterWSComponent(TCustomScrollBar, TQtWSScrollBar);
Result := True;
end;
function RegisterCustomGroupBox: Boolean; alias : 'WSRegisterCustomGroupBox';
begin
RegisterWSComponent(TCustomGroupBox, TQtWSCustomGroupBox);
Result := True;
end;
function RegisterCustomComboBox: Boolean; alias : 'WSRegisterCustomComboBox';
begin
RegisterWSComponent(TCustomComboBox, TQtWSCustomComboBox);
Result := True;
end;
function RegisterCustomListBox: Boolean; alias : 'WSRegisterCustomListBox';
begin
RegisterWSComponent(TCustomListBox, TQtWSCustomListBox);
Result := True;
end;
function RegisterCustomEdit: Boolean; alias : 'WSRegisterCustomEdit';
begin
RegisterWSComponent(TCustomEdit, TQtWSCustomEdit);
Result := True;
end;
function RegisterCustomMemo: Boolean; alias : 'WSRegisterCustomMemo';
begin
RegisterWSComponent(TCustomMemo, TQtWSCustomMemo);
Result := True;
end;
function RegisterButtonControl: Boolean; alias : 'WSRegisterButtonControl';
begin
Result := False;
end;
function RegisterCustomButton: Boolean; alias : 'WSRegisterCustomButton';
begin
RegisterWSComponent(TCustomButton, TQtWSButton);
Result := True;
end;
function RegisterCustomCheckBox: Boolean; alias : 'WSRegisterCustomCheckBox';
begin
RegisterWSComponent(TCustomCheckBox, TQtWSCustomCheckBox);
Result := True;
end;
function RegisterToggleBox: Boolean; alias : 'WSRegisterToggleBox';
begin
RegisterWSComponent(TToggleBox, TQtWSToggleBox);
Result := True;
end;
function RegisterRadioButton: Boolean; alias : 'WSRegisterRadioButton';
begin
RegisterWSComponent(TRadioButton, TQtWSRadioButton);
Result := True;
end;
function RegisterCustomStaticText: Boolean; alias : 'WSRegisterCustomStaticText';
begin
RegisterWSComponent(TCustomStaticText, TQtWSCustomStaticText);
Result := True;
end;
function RegisterCustomLabel: Boolean; alias : 'WSRegisterCustomLabel';
begin
Result := False;
end;
// extctrls
function RegisterCustomPage: Boolean; alias : 'WSRegisterCustomPage';
begin
RegisterWSComponent(TCustomPage, TQtWSCustomPage);
Result := True;
end;
function RegisterCustomNotebook: Boolean; alias : 'WSRegisterCustomNotebook';
begin
RegisterWSComponent(TCustomTabControl, TQtWSCustomTabControl);
Result := True;
end;
function RegisterCustomShape: Boolean; alias : 'WSRegisterCustomShape';
begin
Result := False;
end;
function RegisterCustomSplitter: Boolean; alias : 'WSRegisterCustomSplitter';
begin
Result := False;
end;
function RegisterPaintBox: Boolean; alias : 'WSRegisterPaintBox';
begin
Result := False;
end;
function RegisterCustomImage: Boolean; alias : 'WSRegisterCustomImage';
begin
Result := False;
end;
function RegisterBevel: Boolean; alias : 'WSRegisterBevel';
begin
Result := False;
end;
function RegisterCustomRadioGroup: Boolean; alias : 'WSRegisterCustomRadioGroup';
begin
RegisterWSComponent(TCustomRadioGroup, TQtWSCustomRadioGroup);
Result := True;
end;
function RegisterCustomCheckGroup: Boolean; alias : 'WSRegisterCustomCheckGroup';
begin
RegisterWSComponent(TCustomCheckGroup, TQtWSCustomCheckGroup);
Result := True;
end;
function RegisterCustomLabeledEdit: Boolean; alias : 'WSRegisterCustomLabeledEdit';
begin
Result := False;
end;
function RegisterCustomPanel: Boolean; alias : 'WSRegisterCustomPanel';
begin
RegisterWSComponent(TCustomPanel, TQtWSCustomPanel);
Result := True;
end;
function RegisterCustomTrayIcon: Boolean; alias : 'WSRegisterCustomTrayIcon';
begin
RegisterWSComponent(TCustomTrayIcon, TQtWSCustomTrayIcon);
Result := True;
end;
//ExtDlgs
function RegisterPreviewFileControl: Boolean; alias : 'WSRegisterPreviewFileControl';
begin
Result := False;
end;
function RegisterPreviewFileDialog: Boolean; alias : 'WSRegisterPreviewFileDialog';
begin
Result := False;
end;
function RegisterOpenPictureDialog: Boolean; alias : 'WSRegisterOpenPictureDialog';
begin
Result := False;
end;
function RegisterSavePictureDialog: Boolean; alias : 'WSRegisterSavePictureDialog';
begin
Result := False;
end;
function RegisterCalculatorDialog: Boolean; alias : 'WSRegisterCalculatorDialog';
begin
Result := False;
end;
function RegisterCalculatorForm: Boolean; alias : 'WSRegisterCalculatorForm';
begin
Result := False;
end;
(*function RegisterCalendarDialogForm: Boolean; alias : 'WSRegisterCalendarDialogForm';
begin
Result := False;
end;*)
function RegisterCalendarDialog: Boolean; alias : 'WSRegisterCalendarDialog';
begin
Result := False;
end;
// Buttons
function RegisterCustomBitBtn: Boolean; alias : 'WSRegisterCustomBitBtn';
begin
RegisterWSComponent(TCustomBitBtn, TQtWSBitBtn);
Result := True;
end;
function RegisterCustomSpeedButton: Boolean; alias : 'WSRegisterCustomSpeedButton';
begin
Result := False;
end;
// CheckLst
function RegisterCustomCheckListBox: Boolean; alias : 'WSRegisterCustomCheckListBox';
begin
RegisterWSComponent(TCustomCheckListBox, TQtWSCustomCheckListBox);
Result := True;
end;
// Forms
function RegisterScrollingWinControl: Boolean; alias : 'WSRegisterScrollingWinControl';
begin
RegisterWSComponent(TScrollingWinControl, TQtWSScrollingWinControl);
Result := True;
end;
function RegisterScrollBox: Boolean; alias : 'WSRegisterScrollBox';
begin
RegisterWSComponent(TScrollBox, TQtWSScrollBox);
Result := True;
end;
function RegisterCustomFrame: Boolean; alias : 'WSRegisterCustomFrame';
begin
RegisterWSComponent(TCustomFrame, TQtWSCustomFrame);
Result := True;
end;
function RegisterCustomForm: Boolean; alias : 'WSRegisterCustomForm';
begin
RegisterWSComponent(TCustomForm, TQtWSCustomForm);
Result := True;
end;
function RegisterHintWindow: Boolean; alias : 'WSRegisterHintWindow';
begin
RegisterWSComponent(THintWindow, TQtWSHintWindow);
Result := True;
end;
function RegisterCustomGrid: Boolean; alias : 'WSRegisterCustomGrid';
begin
RegisterWSComponent(TCustomGrid, TQtWSCustomGrid);
Result := True;
end;
function RegisterMenuItem: Boolean; alias : 'WSRegisterMenuItem';
begin
RegisterWSComponent(TMenuItem, TQtWSMenuItem);
Result := True;
end;
function RegisterMenu: Boolean; alias : 'WSRegisterMenu';
begin
RegisterWSComponent(TMenu, TQtWSMenu);
Result := True;
end;
function RegisterMainMenu: Boolean; alias : 'WSRegisterMainMenu';
begin
Result := False;
end;
function RegisterPopupMenu: Boolean; alias : 'WSRegisterPopupMenu';
begin
RegisterWSComponent(TPopupMenu, TQtWSPopupMenu);
Result := True;
end;
function RegisterPairSplitterSide: Boolean; alias : 'WSRegisterPairSplitterSide';
begin
RegisterWSComponent(TPairSplitterSide, TQtWSPairSplitterSide);
Result := True;
end;
function RegisterCustomPairSplitter: Boolean; alias : 'WSRegisterCustomPairSplitter';
begin
Result := False;
end;
function RegisterCustomFloatSpinEdit: Boolean; alias : 'WSRegisterCustomFloatSpinEdit';
begin
RegisterWSComponent(TCustomFloatSpinEdit, TQtWSCustomFloatSpinEdit);
Result := True;
end;
function RegisterCustomRubberBand: Boolean; alias : 'WSRegisterCustomRubberBand';
begin
RegisterWSComponent(TCustomRubberBand, TQtWSCustomRubberBand);
Result := True;
end;
// ShellCtrls
function RegisterCustomShellTreeView: Boolean; alias : 'WSRegisterCustomShellTreeView';
begin
Result := False;
end;
function RegisterCustomShellListView: Boolean; alias : 'WSRegisterCustomShellListView';
begin
Result := False;
end;
function RegisterLazDeviceAPIs: Boolean; alias : 'WSRegisterLazDeviceAPIs';
begin
//RegisterWSLazDeviceAPIs(TCDWSLazDeviceAPIs);
Result := False;
end;
procedure Init;
begin
// Keep a dummy Init to hide compiler messages "unit not used".
// The unit is used by the "alias" functions.
end;
initialization
Init;
end.