|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.Project.CreateDialogCodeDialog</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.Project.CreateDialogCodeDialog</h1> |
|
23 <p> |
|
24 Module implementing a dialog to generate code for a Qt4/Qt5 dialog. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>parameterNamesListRole</td></tr><tr><td>parameterTypesListRole</td></tr><tr><td>pyqtSignatureRole</td></tr><tr><td>pythonSignatureRole</td></tr><tr><td>returnTypeRole</td></tr><tr><td>rubySignatureRole</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#CreateDialogCodeDialog">CreateDialogCodeDialog</a></td> |
|
34 <td>Class implementing a dialog to generate code for a Qt4/Qt5 dialog.</td> |
|
35 </tr> |
|
36 </table> |
|
37 <h3>Functions</h3> |
|
38 <table> |
|
39 <tr><td>None</td></tr> |
|
40 </table> |
|
41 <hr /><hr /> |
|
42 <a NAME="CreateDialogCodeDialog" ID="CreateDialogCodeDialog"></a> |
|
43 <h2>CreateDialogCodeDialog</h2> |
|
44 <p> |
|
45 Class implementing a dialog to generate code for a Qt4/Qt5 dialog. |
|
46 </p> |
|
47 <h3>Derived from</h3> |
|
48 QDialog, Ui_CreateDialogCodeDialog |
|
49 <h3>Class Attributes</h3> |
|
50 <table> |
|
51 <tr><td>DialogClasses</td></tr><tr><td>Separator</td></tr> |
|
52 </table> |
|
53 <h3>Class Methods</h3> |
|
54 <table> |
|
55 <tr><td>None</td></tr> |
|
56 </table> |
|
57 <h3>Methods</h3> |
|
58 <table> |
|
59 <tr> |
|
60 <td><a href="#CreateDialogCodeDialog.__init__">CreateDialogCodeDialog</a></td> |
|
61 <td>Constructor</td> |
|
62 </tr><tr> |
|
63 <td><a href="#CreateDialogCodeDialog.__className">__className</a></td> |
|
64 <td>Private method to get the class name of a form.</td> |
|
65 </tr><tr> |
|
66 <td><a href="#CreateDialogCodeDialog.__generateCode">__generateCode</a></td> |
|
67 <td>Private slot to generate the code as requested by the user.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#CreateDialogCodeDialog.__generatePythonCode">__generatePythonCode</a></td> |
|
70 <td>Private slot to generate Python code as requested by the user.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#CreateDialogCodeDialog.__mapType">__mapType</a></td> |
|
73 <td>Private method to map a type as reported by Qt's meta object to the correct Python type.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#CreateDialogCodeDialog.__objectName">__objectName</a></td> |
|
76 <td>Private method to get the object name of a form.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#CreateDialogCodeDialog.__runUicLoadUi">__runUicLoadUi</a></td> |
|
79 <td>Private method to run the UicLoadUi.py script with the given command and return the output.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#CreateDialogCodeDialog.__signatures">__signatures</a></td> |
|
82 <td>Private slot to get the signatures.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#CreateDialogCodeDialog.__updateSlotsModel">__updateSlotsModel</a></td> |
|
85 <td>Private slot to update the slots tree display.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#CreateDialogCodeDialog.initError">initError</a></td> |
|
88 <td>Public method to determine, if there was an initialzation error.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#CreateDialogCodeDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
|
91 <td>Private slot to handle the buttonBox clicked signal.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#CreateDialogCodeDialog.on_classNameCombo_activated">on_classNameCombo_activated</a></td> |
|
94 <td>Private slot to handle the activated signal of the classname combo.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#CreateDialogCodeDialog.on_filterEdit_textChanged">on_filterEdit_textChanged</a></td> |
|
97 <td>Private slot called, when thext of the filter edit has changed.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#CreateDialogCodeDialog.on_newButton_clicked">on_newButton_clicked</a></td> |
|
100 <td>Private slot called to enter the data for a new dialog class.</td> |
|
101 </tr> |
|
102 </table> |
|
103 <h3>Static Methods</h3> |
|
104 <table> |
|
105 <tr><td>None</td></tr> |
|
106 </table> |
|
107 <a NAME="CreateDialogCodeDialog.__init__" ID="CreateDialogCodeDialog.__init__"></a> |
|
108 <h4>CreateDialogCodeDialog (Constructor)</h4> |
|
109 <b>CreateDialogCodeDialog</b>(<i>formName, project, parent=None</i>) |
|
110 <p> |
|
111 Constructor |
|
112 </p><dl> |
|
113 <dt><i>formName</i></dt> |
|
114 <dd> |
|
115 name of the file containing the form (string) |
|
116 </dd><dt><i>project</i></dt> |
|
117 <dd> |
|
118 reference to the project object |
|
119 </dd><dt><i>parent</i></dt> |
|
120 <dd> |
|
121 parent widget if the dialog (QWidget) |
|
122 </dd> |
|
123 </dl><a NAME="CreateDialogCodeDialog.__className" ID="CreateDialogCodeDialog.__className"></a> |
|
124 <h4>CreateDialogCodeDialog.__className</h4> |
|
125 <b>__className</b>(<i></i>) |
|
126 <p> |
|
127 Private method to get the class name of a form. |
|
128 </p><dl> |
|
129 <dt>Returns:</dt> |
|
130 <dd> |
|
131 class name |
|
132 </dd> |
|
133 </dl><dl> |
|
134 <dt>Return Type:</dt> |
|
135 <dd> |
|
136 str |
|
137 </dd> |
|
138 </dl><a NAME="CreateDialogCodeDialog.__generateCode" ID="CreateDialogCodeDialog.__generateCode"></a> |
|
139 <h4>CreateDialogCodeDialog.__generateCode</h4> |
|
140 <b>__generateCode</b>(<i></i>) |
|
141 <p> |
|
142 Private slot to generate the code as requested by the user. |
|
143 </p><a NAME="CreateDialogCodeDialog.__generatePythonCode" ID="CreateDialogCodeDialog.__generatePythonCode"></a> |
|
144 <h4>CreateDialogCodeDialog.__generatePythonCode</h4> |
|
145 <b>__generatePythonCode</b>(<i></i>) |
|
146 <p> |
|
147 Private slot to generate Python code as requested by the user. |
|
148 </p><a NAME="CreateDialogCodeDialog.__mapType" ID="CreateDialogCodeDialog.__mapType"></a> |
|
149 <h4>CreateDialogCodeDialog.__mapType</h4> |
|
150 <b>__mapType</b>(<i>type_</i>) |
|
151 <p> |
|
152 Private method to map a type as reported by Qt's meta object to the |
|
153 correct Python type. |
|
154 </p><dl> |
|
155 <dt><i>type_</i></dt> |
|
156 <dd> |
|
157 type as reported by Qt (QByteArray) |
|
158 </dd> |
|
159 </dl><dl> |
|
160 <dt>Returns:</dt> |
|
161 <dd> |
|
162 mapped Python type (string) |
|
163 </dd> |
|
164 </dl><a NAME="CreateDialogCodeDialog.__objectName" ID="CreateDialogCodeDialog.__objectName"></a> |
|
165 <h4>CreateDialogCodeDialog.__objectName</h4> |
|
166 <b>__objectName</b>(<i></i>) |
|
167 <p> |
|
168 Private method to get the object name of a form. |
|
169 </p><dl> |
|
170 <dt>Returns:</dt> |
|
171 <dd> |
|
172 object name |
|
173 </dd> |
|
174 </dl><dl> |
|
175 <dt>Return Type:</dt> |
|
176 <dd> |
|
177 str |
|
178 </dd> |
|
179 </dl><a NAME="CreateDialogCodeDialog.__runUicLoadUi" ID="CreateDialogCodeDialog.__runUicLoadUi"></a> |
|
180 <h4>CreateDialogCodeDialog.__runUicLoadUi</h4> |
|
181 <b>__runUicLoadUi</b>(<i>command</i>) |
|
182 <p> |
|
183 Private method to run the UicLoadUi.py script with the given command |
|
184 and return the output. |
|
185 </p><dl> |
|
186 <dt><i>command</i> (str)</dt> |
|
187 <dd> |
|
188 uic command to be run |
|
189 </dd> |
|
190 </dl><dl> |
|
191 <dt>Returns:</dt> |
|
192 <dd> |
|
193 tuple of process output and error flag |
|
194 </dd> |
|
195 </dl><dl> |
|
196 <dt>Return Type:</dt> |
|
197 <dd> |
|
198 tuple of (str, bool) |
|
199 </dd> |
|
200 </dl><a NAME="CreateDialogCodeDialog.__signatures" ID="CreateDialogCodeDialog.__signatures"></a> |
|
201 <h4>CreateDialogCodeDialog.__signatures</h4> |
|
202 <b>__signatures</b>(<i></i>) |
|
203 <p> |
|
204 Private slot to get the signatures. |
|
205 </p><dl> |
|
206 <dt>Returns:</dt> |
|
207 <dd> |
|
208 list of signatures (list of strings) |
|
209 </dd> |
|
210 </dl><a NAME="CreateDialogCodeDialog.__updateSlotsModel" ID="CreateDialogCodeDialog.__updateSlotsModel"></a> |
|
211 <h4>CreateDialogCodeDialog.__updateSlotsModel</h4> |
|
212 <b>__updateSlotsModel</b>(<i></i>) |
|
213 <p> |
|
214 Private slot to update the slots tree display. |
|
215 </p><a NAME="CreateDialogCodeDialog.initError" ID="CreateDialogCodeDialog.initError"></a> |
|
216 <h4>CreateDialogCodeDialog.initError</h4> |
|
217 <b>initError</b>(<i></i>) |
|
218 <p> |
|
219 Public method to determine, if there was an initialzation error. |
|
220 </p><dl> |
|
221 <dt>Returns:</dt> |
|
222 <dd> |
|
223 flag indicating an initialzation error (boolean) |
|
224 </dd> |
|
225 </dl><a NAME="CreateDialogCodeDialog.on_buttonBox_clicked" ID="CreateDialogCodeDialog.on_buttonBox_clicked"></a> |
|
226 <h4>CreateDialogCodeDialog.on_buttonBox_clicked</h4> |
|
227 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
228 <p> |
|
229 Private slot to handle the buttonBox clicked signal. |
|
230 </p><dl> |
|
231 <dt><i>button</i></dt> |
|
232 <dd> |
|
233 reference to the button that was clicked |
|
234 (QAbstractButton) |
|
235 </dd> |
|
236 </dl><a NAME="CreateDialogCodeDialog.on_classNameCombo_activated" ID="CreateDialogCodeDialog.on_classNameCombo_activated"></a> |
|
237 <h4>CreateDialogCodeDialog.on_classNameCombo_activated</h4> |
|
238 <b>on_classNameCombo_activated</b>(<i>index</i>) |
|
239 <p> |
|
240 Private slot to handle the activated signal of the classname combo. |
|
241 </p><dl> |
|
242 <dt><i>index</i></dt> |
|
243 <dd> |
|
244 index of the activated item (integer) |
|
245 </dd> |
|
246 </dl><a NAME="CreateDialogCodeDialog.on_filterEdit_textChanged" ID="CreateDialogCodeDialog.on_filterEdit_textChanged"></a> |
|
247 <h4>CreateDialogCodeDialog.on_filterEdit_textChanged</h4> |
|
248 <b>on_filterEdit_textChanged</b>(<i>text</i>) |
|
249 <p> |
|
250 Private slot called, when thext of the filter edit has changed. |
|
251 </p><dl> |
|
252 <dt><i>text</i></dt> |
|
253 <dd> |
|
254 changed text (string) |
|
255 </dd> |
|
256 </dl><a NAME="CreateDialogCodeDialog.on_newButton_clicked" ID="CreateDialogCodeDialog.on_newButton_clicked"></a> |
|
257 <h4>CreateDialogCodeDialog.on_newButton_clicked</h4> |
|
258 <b>on_newButton_clicked</b>(<i></i>) |
|
259 <p> |
|
260 Private slot called to enter the data for a new dialog class. |
|
261 </p> |
|
262 <div align="right"><a href="#top">Up</a></div> |
|
263 <hr /> |
|
264 </body></html> |