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