16 |
16 |
17 a { color: #BA6D36; } |
17 a { color: #BA6D36; } |
18 |
18 |
19 </style> |
19 </style> |
20 </head> |
20 </head> |
21 <body><a NAME="top" ID="top"></a> |
21 <body> |
|
22 <a NAME="top" ID="top"></a> |
22 <h1>eric6.SqlBrowser.SqlBrowserWidget</h1> |
23 <h1>eric6.SqlBrowser.SqlBrowserWidget</h1> |
|
24 |
23 <p> |
25 <p> |
24 Module implementing the SQL Browser widget. |
26 Module implementing the SQL Browser widget. |
25 </p> |
27 </p> |
26 <h3>Global Attributes</h3> |
28 <h3>Global Attributes</h3> |
|
29 |
27 <table> |
30 <table> |
28 <tr><td>None</td></tr> |
31 <tr><td>None</td></tr> |
29 </table> |
32 </table> |
30 <h3>Classes</h3> |
33 <h3>Classes</h3> |
31 <table> |
34 |
|
35 <table> |
|
36 |
32 <tr> |
37 <tr> |
33 <td><a href="#SqlBrowserWidget">SqlBrowserWidget</a></td> |
38 <td><a href="#SqlBrowserWidget">SqlBrowserWidget</a></td> |
34 <td>Class implementing the SQL Browser widget.</td> |
39 <td>Class implementing the SQL Browser widget.</td> |
35 </tr> |
40 </tr> |
36 </table> |
41 </table> |
37 <h3>Functions</h3> |
42 <h3>Functions</h3> |
|
43 |
38 <table> |
44 <table> |
39 <tr><td>None</td></tr> |
45 <tr><td>None</td></tr> |
40 </table> |
46 </table> |
41 <hr /><hr /> |
47 <hr /> |
|
48 <hr /> |
42 <a NAME="SqlBrowserWidget" ID="SqlBrowserWidget"></a> |
49 <a NAME="SqlBrowserWidget" ID="SqlBrowserWidget"></a> |
43 <h2>SqlBrowserWidget</h2> |
50 <h2>SqlBrowserWidget</h2> |
|
51 |
44 <p> |
52 <p> |
45 Class implementing the SQL Browser widget. |
53 Class implementing the SQL Browser widget. |
46 </p><h3>Signals</h3> |
54 </p> |
47 <dl> |
55 <h3>Signals</h3> |
|
56 <dl> |
|
57 |
48 <dt>statusMessage(str)</dt> |
58 <dt>statusMessage(str)</dt> |
49 <dd> |
59 <dd> |
50 emitted to show a status message |
60 emitted to show a status message |
51 </dd> |
61 </dd> |
52 </dl> |
62 </dl> |
53 <h3>Derived from</h3> |
63 <h3>Derived from</h3> |
54 QWidget, Ui_SqlBrowserWidget |
64 QWidget, Ui_SqlBrowserWidget |
55 <h3>Class Attributes</h3> |
65 <h3>Class Attributes</h3> |
|
66 |
56 <table> |
67 <table> |
57 <tr><td>cCount</td></tr> |
68 <tr><td>cCount</td></tr> |
58 </table> |
69 </table> |
59 <h3>Class Methods</h3> |
70 <h3>Class Methods</h3> |
|
71 |
60 <table> |
72 <table> |
61 <tr><td>None</td></tr> |
73 <tr><td>None</td></tr> |
62 </table> |
74 </table> |
63 <h3>Methods</h3> |
75 <h3>Methods</h3> |
64 <table> |
76 |
|
77 <table> |
|
78 |
65 <tr> |
79 <tr> |
66 <td><a href="#SqlBrowserWidget.__init__">SqlBrowserWidget</a></td> |
80 <td><a href="#SqlBrowserWidget.__init__">SqlBrowserWidget</a></td> |
67 <td>Constructor</td> |
81 <td>Constructor</td> |
68 </tr><tr> |
82 </tr> |
|
83 <tr> |
69 <td><a href="#SqlBrowserWidget.__deleteRow">__deleteRow</a></td> |
84 <td><a href="#SqlBrowserWidget.__deleteRow">__deleteRow</a></td> |
70 <td>Private slot to delete a row from the database table.</td> |
85 <td>Private slot to delete a row from the database table.</td> |
71 </tr><tr> |
86 </tr> |
|
87 <tr> |
72 <td><a href="#SqlBrowserWidget.__insertRow">__insertRow</a></td> |
88 <td><a href="#SqlBrowserWidget.__insertRow">__insertRow</a></td> |
73 <td>Private slot to insert a row into the database table.</td> |
89 <td>Private slot to insert a row into the database table.</td> |
74 </tr><tr> |
90 </tr> |
|
91 <tr> |
75 <td><a href="#SqlBrowserWidget.addConnection">addConnection</a></td> |
92 <td><a href="#SqlBrowserWidget.addConnection">addConnection</a></td> |
76 <td>Public method to add a database connection.</td> |
93 <td>Public method to add a database connection.</td> |
77 </tr><tr> |
94 </tr> |
|
95 <tr> |
78 <td><a href="#SqlBrowserWidget.addConnectionByDialog">addConnectionByDialog</a></td> |
96 <td><a href="#SqlBrowserWidget.addConnectionByDialog">addConnectionByDialog</a></td> |
79 <td>Public slot to add a database connection via an input dialog.</td> |
97 <td>Public slot to add a database connection via an input dialog.</td> |
80 </tr><tr> |
98 </tr> |
|
99 <tr> |
81 <td><a href="#SqlBrowserWidget.executeQuery">executeQuery</a></td> |
100 <td><a href="#SqlBrowserWidget.executeQuery">executeQuery</a></td> |
82 <td>Public slot to execute the entered query.</td> |
101 <td>Public slot to execute the entered query.</td> |
83 </tr><tr> |
102 </tr> |
|
103 <tr> |
84 <td><a href="#SqlBrowserWidget.on_clearButton_clicked">on_clearButton_clicked</a></td> |
104 <td><a href="#SqlBrowserWidget.on_clearButton_clicked">on_clearButton_clicked</a></td> |
85 <td>Private slot to clear the SQL entry widget.</td> |
105 <td>Private slot to clear the SQL entry widget.</td> |
86 </tr><tr> |
106 </tr> |
|
107 <tr> |
87 <td><a href="#SqlBrowserWidget.on_connections_cleared">on_connections_cleared</a></td> |
108 <td><a href="#SqlBrowserWidget.on_connections_cleared">on_connections_cleared</a></td> |
88 <td>Private slot to clear the table.</td> |
109 <td>Private slot to clear the table.</td> |
89 </tr><tr> |
110 </tr> |
|
111 <tr> |
90 <td><a href="#SqlBrowserWidget.on_connections_schemaRequested">on_connections_schemaRequested</a></td> |
112 <td><a href="#SqlBrowserWidget.on_connections_schemaRequested">on_connections_schemaRequested</a></td> |
91 <td>Private slot to show the schema of a table.</td> |
113 <td>Private slot to show the schema of a table.</td> |
92 </tr><tr> |
114 </tr> |
|
115 <tr> |
93 <td><a href="#SqlBrowserWidget.on_connections_tableActivated">on_connections_tableActivated</a></td> |
116 <td><a href="#SqlBrowserWidget.on_connections_tableActivated">on_connections_tableActivated</a></td> |
94 <td>Private slot to show the contents of a table.</td> |
117 <td>Private slot to show the contents of a table.</td> |
95 </tr><tr> |
118 </tr> |
|
119 <tr> |
96 <td><a href="#SqlBrowserWidget.on_deleteRowAction_triggered">on_deleteRowAction_triggered</a></td> |
120 <td><a href="#SqlBrowserWidget.on_deleteRowAction_triggered">on_deleteRowAction_triggered</a></td> |
97 <td>Private slot handling the action to delete a row.</td> |
121 <td>Private slot handling the action to delete a row.</td> |
98 </tr><tr> |
122 </tr> |
|
123 <tr> |
99 <td><a href="#SqlBrowserWidget.on_executeButton_clicked">on_executeButton_clicked</a></td> |
124 <td><a href="#SqlBrowserWidget.on_executeButton_clicked">on_executeButton_clicked</a></td> |
100 <td>Private slot to execute the entered SQL query.</td> |
125 <td>Private slot to execute the entered SQL query.</td> |
101 </tr><tr> |
126 </tr> |
|
127 <tr> |
102 <td><a href="#SqlBrowserWidget.on_insertRowAction_triggered">on_insertRowAction_triggered</a></td> |
128 <td><a href="#SqlBrowserWidget.on_insertRowAction_triggered">on_insertRowAction_triggered</a></td> |
103 <td>Private slot handling the action to insert a new row.</td> |
129 <td>Private slot handling the action to insert a new row.</td> |
104 </tr><tr> |
130 </tr> |
|
131 <tr> |
105 <td><a href="#SqlBrowserWidget.showSchema">showSchema</a></td> |
132 <td><a href="#SqlBrowserWidget.showSchema">showSchema</a></td> |
106 <td>Public slot to show the schema of a table.</td> |
133 <td>Public slot to show the schema of a table.</td> |
107 </tr><tr> |
134 </tr> |
|
135 <tr> |
108 <td><a href="#SqlBrowserWidget.showTable">showTable</a></td> |
136 <td><a href="#SqlBrowserWidget.showTable">showTable</a></td> |
109 <td>Public slot to show the contents of a table.</td> |
137 <td>Public slot to show the contents of a table.</td> |
110 </tr><tr> |
138 </tr> |
|
139 <tr> |
111 <td><a href="#SqlBrowserWidget.updateActions">updateActions</a></td> |
140 <td><a href="#SqlBrowserWidget.updateActions">updateActions</a></td> |
112 <td>Public slot to update the actions.</td> |
141 <td>Public slot to update the actions.</td> |
113 </tr> |
142 </tr> |
114 </table> |
143 </table> |
115 <h3>Static Methods</h3> |
144 <h3>Static Methods</h3> |
|
145 |
116 <table> |
146 <table> |
117 <tr><td>None</td></tr> |
147 <tr><td>None</td></tr> |
118 </table> |
148 </table> |
|
149 |
119 <a NAME="SqlBrowserWidget.__init__" ID="SqlBrowserWidget.__init__"></a> |
150 <a NAME="SqlBrowserWidget.__init__" ID="SqlBrowserWidget.__init__"></a> |
120 <h4>SqlBrowserWidget (Constructor)</h4> |
151 <h4>SqlBrowserWidget (Constructor)</h4> |
121 <b>SqlBrowserWidget</b>(<i>parent=None</i>) |
152 <b>SqlBrowserWidget</b>(<i>parent=None</i>) |
|
153 |
122 <p> |
154 <p> |
123 Constructor |
155 Constructor |
124 </p><dl> |
156 </p> |
|
157 <dl> |
|
158 |
125 <dt><i>parent</i></dt> |
159 <dt><i>parent</i></dt> |
126 <dd> |
160 <dd> |
127 reference to the parent widget (QWidget) |
161 reference to the parent widget (QWidget) |
128 </dd> |
162 </dd> |
129 </dl><a NAME="SqlBrowserWidget.__deleteRow" ID="SqlBrowserWidget.__deleteRow"></a> |
163 </dl> |
|
164 <a NAME="SqlBrowserWidget.__deleteRow" ID="SqlBrowserWidget.__deleteRow"></a> |
130 <h4>SqlBrowserWidget.__deleteRow</h4> |
165 <h4>SqlBrowserWidget.__deleteRow</h4> |
131 <b>__deleteRow</b>(<i></i>) |
166 <b>__deleteRow</b>(<i></i>) |
|
167 |
132 <p> |
168 <p> |
133 Private slot to delete a row from the database table. |
169 Private slot to delete a row from the database table. |
134 </p><a NAME="SqlBrowserWidget.__insertRow" ID="SqlBrowserWidget.__insertRow"></a> |
170 </p> |
|
171 <a NAME="SqlBrowserWidget.__insertRow" ID="SqlBrowserWidget.__insertRow"></a> |
135 <h4>SqlBrowserWidget.__insertRow</h4> |
172 <h4>SqlBrowserWidget.__insertRow</h4> |
136 <b>__insertRow</b>(<i></i>) |
173 <b>__insertRow</b>(<i></i>) |
|
174 |
137 <p> |
175 <p> |
138 Private slot to insert a row into the database table. |
176 Private slot to insert a row into the database table. |
139 </p><a NAME="SqlBrowserWidget.addConnection" ID="SqlBrowserWidget.addConnection"></a> |
177 </p> |
|
178 <a NAME="SqlBrowserWidget.addConnection" ID="SqlBrowserWidget.addConnection"></a> |
140 <h4>SqlBrowserWidget.addConnection</h4> |
179 <h4>SqlBrowserWidget.addConnection</h4> |
141 <b>addConnection</b>(<i>driver, dbName, user, password, host, port</i>) |
180 <b>addConnection</b>(<i>driver, dbName, user, password, host, port</i>) |
|
181 |
142 <p> |
182 <p> |
143 Public method to add a database connection. |
183 Public method to add a database connection. |
144 </p><dl> |
184 </p> |
|
185 <dl> |
|
186 |
145 <dt><i>driver</i></dt> |
187 <dt><i>driver</i></dt> |
146 <dd> |
188 <dd> |
147 name of the Qt database driver (string) |
189 name of the Qt database driver (string) |
148 </dd><dt><i>dbName</i></dt> |
190 </dd> |
|
191 <dt><i>dbName</i></dt> |
149 <dd> |
192 <dd> |
150 name of the database (string) |
193 name of the database (string) |
151 </dd><dt><i>user</i></dt> |
194 </dd> |
|
195 <dt><i>user</i></dt> |
152 <dd> |
196 <dd> |
153 user name (string) |
197 user name (string) |
154 </dd><dt><i>password</i></dt> |
198 </dd> |
|
199 <dt><i>password</i></dt> |
155 <dd> |
200 <dd> |
156 password (string) |
201 password (string) |
157 </dd><dt><i>host</i></dt> |
202 </dd> |
|
203 <dt><i>host</i></dt> |
158 <dd> |
204 <dd> |
159 host name (string) |
205 host name (string) |
160 </dd><dt><i>port</i></dt> |
206 </dd> |
|
207 <dt><i>port</i></dt> |
161 <dd> |
208 <dd> |
162 port number (integer) |
209 port number (integer) |
163 </dd> |
210 </dd> |
164 </dl><dl> |
211 </dl> |
|
212 <dl> |
165 <dt>Returns:</dt> |
213 <dt>Returns:</dt> |
166 <dd> |
214 <dd> |
167 SQL error object (QSqlError) |
215 SQL error object (QSqlError) |
168 </dd> |
216 </dd> |
169 </dl><a NAME="SqlBrowserWidget.addConnectionByDialog" ID="SqlBrowserWidget.addConnectionByDialog"></a> |
217 </dl> |
|
218 <a NAME="SqlBrowserWidget.addConnectionByDialog" ID="SqlBrowserWidget.addConnectionByDialog"></a> |
170 <h4>SqlBrowserWidget.addConnectionByDialog</h4> |
219 <h4>SqlBrowserWidget.addConnectionByDialog</h4> |
171 <b>addConnectionByDialog</b>(<i></i>) |
220 <b>addConnectionByDialog</b>(<i></i>) |
|
221 |
172 <p> |
222 <p> |
173 Public slot to add a database connection via an input dialog. |
223 Public slot to add a database connection via an input dialog. |
174 </p><a NAME="SqlBrowserWidget.executeQuery" ID="SqlBrowserWidget.executeQuery"></a> |
224 </p> |
|
225 <a NAME="SqlBrowserWidget.executeQuery" ID="SqlBrowserWidget.executeQuery"></a> |
175 <h4>SqlBrowserWidget.executeQuery</h4> |
226 <h4>SqlBrowserWidget.executeQuery</h4> |
176 <b>executeQuery</b>(<i></i>) |
227 <b>executeQuery</b>(<i></i>) |
|
228 |
177 <p> |
229 <p> |
178 Public slot to execute the entered query. |
230 Public slot to execute the entered query. |
179 </p><a NAME="SqlBrowserWidget.on_clearButton_clicked" ID="SqlBrowserWidget.on_clearButton_clicked"></a> |
231 </p> |
|
232 <a NAME="SqlBrowserWidget.on_clearButton_clicked" ID="SqlBrowserWidget.on_clearButton_clicked"></a> |
180 <h4>SqlBrowserWidget.on_clearButton_clicked</h4> |
233 <h4>SqlBrowserWidget.on_clearButton_clicked</h4> |
181 <b>on_clearButton_clicked</b>(<i></i>) |
234 <b>on_clearButton_clicked</b>(<i></i>) |
|
235 |
182 <p> |
236 <p> |
183 Private slot to clear the SQL entry widget. |
237 Private slot to clear the SQL entry widget. |
184 </p><a NAME="SqlBrowserWidget.on_connections_cleared" ID="SqlBrowserWidget.on_connections_cleared"></a> |
238 </p> |
|
239 <a NAME="SqlBrowserWidget.on_connections_cleared" ID="SqlBrowserWidget.on_connections_cleared"></a> |
185 <h4>SqlBrowserWidget.on_connections_cleared</h4> |
240 <h4>SqlBrowserWidget.on_connections_cleared</h4> |
186 <b>on_connections_cleared</b>(<i></i>) |
241 <b>on_connections_cleared</b>(<i></i>) |
|
242 |
187 <p> |
243 <p> |
188 Private slot to clear the table. |
244 Private slot to clear the table. |
189 </p><a NAME="SqlBrowserWidget.on_connections_schemaRequested" ID="SqlBrowserWidget.on_connections_schemaRequested"></a> |
245 </p> |
|
246 <a NAME="SqlBrowserWidget.on_connections_schemaRequested" ID="SqlBrowserWidget.on_connections_schemaRequested"></a> |
190 <h4>SqlBrowserWidget.on_connections_schemaRequested</h4> |
247 <h4>SqlBrowserWidget.on_connections_schemaRequested</h4> |
191 <b>on_connections_schemaRequested</b>(<i>table</i>) |
248 <b>on_connections_schemaRequested</b>(<i>table</i>) |
|
249 |
192 <p> |
250 <p> |
193 Private slot to show the schema of a table. |
251 Private slot to show the schema of a table. |
194 </p><dl> |
252 </p> |
|
253 <dl> |
|
254 |
195 <dt><i>table</i></dt> |
255 <dt><i>table</i></dt> |
196 <dd> |
256 <dd> |
197 name of the table for which to show the schema (string) |
257 name of the table for which to show the schema (string) |
198 </dd> |
258 </dd> |
199 </dl><a NAME="SqlBrowserWidget.on_connections_tableActivated" ID="SqlBrowserWidget.on_connections_tableActivated"></a> |
259 </dl> |
|
260 <a NAME="SqlBrowserWidget.on_connections_tableActivated" ID="SqlBrowserWidget.on_connections_tableActivated"></a> |
200 <h4>SqlBrowserWidget.on_connections_tableActivated</h4> |
261 <h4>SqlBrowserWidget.on_connections_tableActivated</h4> |
201 <b>on_connections_tableActivated</b>(<i>table</i>) |
262 <b>on_connections_tableActivated</b>(<i>table</i>) |
|
263 |
202 <p> |
264 <p> |
203 Private slot to show the contents of a table. |
265 Private slot to show the contents of a table. |
204 </p><dl> |
266 </p> |
|
267 <dl> |
|
268 |
205 <dt><i>table</i></dt> |
269 <dt><i>table</i></dt> |
206 <dd> |
270 <dd> |
207 name of the table for which to show the contents (string) |
271 name of the table for which to show the contents (string) |
208 </dd> |
272 </dd> |
209 </dl><a NAME="SqlBrowserWidget.on_deleteRowAction_triggered" ID="SqlBrowserWidget.on_deleteRowAction_triggered"></a> |
273 </dl> |
|
274 <a NAME="SqlBrowserWidget.on_deleteRowAction_triggered" ID="SqlBrowserWidget.on_deleteRowAction_triggered"></a> |
210 <h4>SqlBrowserWidget.on_deleteRowAction_triggered</h4> |
275 <h4>SqlBrowserWidget.on_deleteRowAction_triggered</h4> |
211 <b>on_deleteRowAction_triggered</b>(<i></i>) |
276 <b>on_deleteRowAction_triggered</b>(<i></i>) |
|
277 |
212 <p> |
278 <p> |
213 Private slot handling the action to delete a row. |
279 Private slot handling the action to delete a row. |
214 </p><a NAME="SqlBrowserWidget.on_executeButton_clicked" ID="SqlBrowserWidget.on_executeButton_clicked"></a> |
280 </p> |
|
281 <a NAME="SqlBrowserWidget.on_executeButton_clicked" ID="SqlBrowserWidget.on_executeButton_clicked"></a> |
215 <h4>SqlBrowserWidget.on_executeButton_clicked</h4> |
282 <h4>SqlBrowserWidget.on_executeButton_clicked</h4> |
216 <b>on_executeButton_clicked</b>(<i></i>) |
283 <b>on_executeButton_clicked</b>(<i></i>) |
|
284 |
217 <p> |
285 <p> |
218 Private slot to execute the entered SQL query. |
286 Private slot to execute the entered SQL query. |
219 </p><a NAME="SqlBrowserWidget.on_insertRowAction_triggered" ID="SqlBrowserWidget.on_insertRowAction_triggered"></a> |
287 </p> |
|
288 <a NAME="SqlBrowserWidget.on_insertRowAction_triggered" ID="SqlBrowserWidget.on_insertRowAction_triggered"></a> |
220 <h4>SqlBrowserWidget.on_insertRowAction_triggered</h4> |
289 <h4>SqlBrowserWidget.on_insertRowAction_triggered</h4> |
221 <b>on_insertRowAction_triggered</b>(<i></i>) |
290 <b>on_insertRowAction_triggered</b>(<i></i>) |
|
291 |
222 <p> |
292 <p> |
223 Private slot handling the action to insert a new row. |
293 Private slot handling the action to insert a new row. |
224 </p><a NAME="SqlBrowserWidget.showSchema" ID="SqlBrowserWidget.showSchema"></a> |
294 </p> |
|
295 <a NAME="SqlBrowserWidget.showSchema" ID="SqlBrowserWidget.showSchema"></a> |
225 <h4>SqlBrowserWidget.showSchema</h4> |
296 <h4>SqlBrowserWidget.showSchema</h4> |
226 <b>showSchema</b>(<i>table</i>) |
297 <b>showSchema</b>(<i>table</i>) |
|
298 |
227 <p> |
299 <p> |
228 Public slot to show the schema of a table. |
300 Public slot to show the schema of a table. |
229 </p><dl> |
301 </p> |
|
302 <dl> |
|
303 |
230 <dt><i>table</i></dt> |
304 <dt><i>table</i></dt> |
231 <dd> |
305 <dd> |
232 name of the table to be shown (string) |
306 name of the table to be shown (string) |
233 </dd> |
307 </dd> |
234 </dl><a NAME="SqlBrowserWidget.showTable" ID="SqlBrowserWidget.showTable"></a> |
308 </dl> |
|
309 <a NAME="SqlBrowserWidget.showTable" ID="SqlBrowserWidget.showTable"></a> |
235 <h4>SqlBrowserWidget.showTable</h4> |
310 <h4>SqlBrowserWidget.showTable</h4> |
236 <b>showTable</b>(<i>table</i>) |
311 <b>showTable</b>(<i>table</i>) |
|
312 |
237 <p> |
313 <p> |
238 Public slot to show the contents of a table. |
314 Public slot to show the contents of a table. |
239 </p><dl> |
315 </p> |
|
316 <dl> |
|
317 |
240 <dt><i>table</i></dt> |
318 <dt><i>table</i></dt> |
241 <dd> |
319 <dd> |
242 name of the table to be shown (string) |
320 name of the table to be shown (string) |
243 </dd> |
321 </dd> |
244 </dl><a NAME="SqlBrowserWidget.updateActions" ID="SqlBrowserWidget.updateActions"></a> |
322 </dl> |
|
323 <a NAME="SqlBrowserWidget.updateActions" ID="SqlBrowserWidget.updateActions"></a> |
245 <h4>SqlBrowserWidget.updateActions</h4> |
324 <h4>SqlBrowserWidget.updateActions</h4> |
246 <b>updateActions</b>(<i></i>) |
325 <b>updateActions</b>(<i></i>) |
|
326 |
247 <p> |
327 <p> |
248 Public slot to update the actions. |
328 Public slot to update the actions. |
249 </p> |
329 </p> |
250 <div align="right"><a href="#top">Up</a></div> |
330 <div align="right"><a href="#top">Up</a></div> |
251 <hr /> |
331 <hr /> |