@@ -16,32 +16,12 @@ configuration of your application, including any global defines that are particu
16
16
See the inline documentation in configuration.sample.inc.php for more information.
17
17
18
18
19
-
20
- ### prepend.inc.php
21
-
22
- This is the top-level include file for any and all PHP scripts which use
23
- Qcubed. Global, application-wide loaders, settings, etc. are in this file.
24
-
25
- Feel free to make modifications/changes/additions to this file as you wish.
26
- Note that the QApplication class is defined in prepend.inc as well. Feel free
27
- to make changes, override methods, or add functionality to QApplication as
28
- needed.
29
-
30
- See the inline documentation in prepend.inc.php for more information.
31
-
32
-
33
19
### codegen_settings.xml
34
20
35
21
This file controls overall settings for parts of the code generation. Feel free
36
22
to change these as needed.
37
23
38
24
39
- ### codegen_options.json
40
-
41
- This file is created and maintained by the ModelConnectorEditor. It has options for
42
- the individual controls that correspond to fields in your database. There may be times
43
- that you need to directly edit this file, and you should feel free to do so.
44
-
45
25
## Codegen Notes
46
26
47
27
QCubed is set up to generate a default set of objects and forms to get you started with your application.
@@ -53,52 +33,9 @@ separate out your hand written code from the generated code, and continue to twe
53
33
The codegen process starts at the QCubed start screen by clicking on the codegen link.
54
34
PHP is executed to generate the files. Therefore, the target directories for codegen will need to be writable by the web server process.
55
35
56
- The codegen process works by instantiating a QCodeGen object. This object then looks in the template directories and begins
36
+ The codegen process works by instantiating a CodeGen object. This object then looks in the template directories and begins
57
37
to include the php files there that start with an underscore (_ ). These templates then include other files, which in turn
58
38
may include other template files. This combination will eventually generate the forms, model connectors, and data table
59
39
interface classes that you will base your application on.
60
40
61
41
62
- ## Model Connectors
63
- Model Connectors are helper classes that have methods which connect form controls to columns in SQLn data tables. Each column
64
- in the data table corresponds to a control that is generated in a model connector class. Your form object calls methods
65
- in the model connector to get copies of the controls and then to place them in the form.
66
-
67
- To customize the generated controls, you have the following choices:
68
- - Use the ModelConnectorEditor (see the example on this), to set specific options on each control.
69
- - Create your own code generating templates and place them in your project/includes/codegen/templates directory. Its best
70
- to do this by copying the corresponding file in the qcubed/qcubed/includes/codegen/templates directory and then
71
- editing the file and placing it in the corresponding location in the above project directory. The project directory
72
- files will override the files in the vendor directory.
73
- - Override the generated code by editing the model connectors in your project/includes/connector directory.
74
-
75
-
76
- ### Version 3
77
-
78
- QCubed Version 3 introduces the concept of having the controls themselves create the code to interact with the database
79
- for the ModelConnector, rather than the templates. Coupled with this is the ModelConnectorEditDlg dialog, which lets you
80
- right click on a control and edit many of the controls options. These changes get embedded into the generated ModelConnector.
81
- You can see a description of each option by hovering over the item in the dialog.
82
-
83
- These new features give the developer the ability to do the following:
84
- - Override the default control type to specify a particular control type
85
- - Allow custom controls and plugins to generate their own model connector code and have that code automatically be used
86
- instead of the default code just by specifying that control in the comments of a column.
87
- - Allow subclasses of standard controls to override the code generation methods to generate different code.
88
- - Specify additional overrides to control many aspects of control creation in the generated model connector.
89
-
90
- ## Notes for Upgrading from version 2
91
-
92
- Many of the problems that caused programmers to create their own templates are now solvable through the new Options
93
- feature available through Comments. However, you are still free to override the templates as needed. In fact, this new
94
- feature is implemented entirely through the templates, so if you want to keep your old templates, simply replace the new
95
- templates with the old ones from version 2.
96
-
97
- QLabel no longer accepts a strFormat parameter at create time. You can always set it using the ->Format parameter after
98
- creating the control, or specify this in an override in a Comment option.
99
-
100
-
101
-
102
-
103
-
104
-
0 commit comments