|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.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><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.SqlBrowser.SqlBrowserWidget</h1> |
|
23 <p> |
|
24 Module implementing the SQL Browser widget. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#SqlBrowserWidget">SqlBrowserWidget</a></td> |
|
34 <td>Class implementing the SQL Browser widget.</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="SqlBrowserWidget" ID="SqlBrowserWidget"></a> |
|
43 <h2>SqlBrowserWidget</h2> |
|
44 <p> |
|
45 Class implementing the SQL Browser widget. |
|
46 </p><h3>Signals</h3> |
|
47 <dl> |
|
48 <dt>statusMessage(str)</dt> |
|
49 <dd> |
|
50 emitted to show a status message |
|
51 </dd> |
|
52 </dl> |
|
53 <h3>Derived from</h3> |
|
54 QWidget, Ui_SqlBrowserWidget |
|
55 <h3>Class Attributes</h3> |
|
56 <table> |
|
57 <tr><td>cCount</td></tr> |
|
58 </table> |
|
59 <h3>Class Methods</h3> |
|
60 <table> |
|
61 <tr><td>None</td></tr> |
|
62 </table> |
|
63 <h3>Methods</h3> |
|
64 <table> |
|
65 <tr> |
|
66 <td><a href="#SqlBrowserWidget.__init__">SqlBrowserWidget</a></td> |
|
67 <td>Constructor</td> |
|
68 </tr><tr> |
|
69 <td><a href="#SqlBrowserWidget.__deleteRow">__deleteRow</a></td> |
|
70 <td>Private slot to delete a row from the database table.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#SqlBrowserWidget.__insertRow">__insertRow</a></td> |
|
73 <td>Private slot to insert a row into the database table.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#SqlBrowserWidget.addConnection">addConnection</a></td> |
|
76 <td>Public method to add a database connection.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#SqlBrowserWidget.addConnectionByDialog">addConnectionByDialog</a></td> |
|
79 <td>Public slot to add a database connection via an input dialog.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#SqlBrowserWidget.executeQuery">executeQuery</a></td> |
|
82 <td>Public slot to execute the entered query.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#SqlBrowserWidget.on_clearButton_clicked">on_clearButton_clicked</a></td> |
|
85 <td>Private slot to clear the SQL entry widget.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#SqlBrowserWidget.on_connections_cleared">on_connections_cleared</a></td> |
|
88 <td>Private slot to clear the table.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#SqlBrowserWidget.on_connections_schemaRequested">on_connections_schemaRequested</a></td> |
|
91 <td>Private slot to show the schema of a table.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#SqlBrowserWidget.on_connections_tableActivated">on_connections_tableActivated</a></td> |
|
94 <td>Private slot to show the contents of a table.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#SqlBrowserWidget.on_deleteRowAction_triggered">on_deleteRowAction_triggered</a></td> |
|
97 <td>Private slot handling the action to delete a row.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#SqlBrowserWidget.on_executeButton_clicked">on_executeButton_clicked</a></td> |
|
100 <td>Private slot to execute the entered SQL query.</td> |
|
101 </tr><tr> |
|
102 <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> |
|
104 </tr><tr> |
|
105 <td><a href="#SqlBrowserWidget.showSchema">showSchema</a></td> |
|
106 <td>Public slot to show the schema of a table.</td> |
|
107 </tr><tr> |
|
108 <td><a href="#SqlBrowserWidget.showTable">showTable</a></td> |
|
109 <td>Public slot to show the contents of a table.</td> |
|
110 </tr><tr> |
|
111 <td><a href="#SqlBrowserWidget.updateActions">updateActions</a></td> |
|
112 <td>Public slot to update the actions.</td> |
|
113 </tr> |
|
114 </table> |
|
115 <h3>Static Methods</h3> |
|
116 <table> |
|
117 <tr><td>None</td></tr> |
|
118 </table> |
|
119 <a NAME="SqlBrowserWidget.__init__" ID="SqlBrowserWidget.__init__"></a> |
|
120 <h4>SqlBrowserWidget (Constructor)</h4> |
|
121 <b>SqlBrowserWidget</b>(<i>parent=None</i>) |
|
122 <p> |
|
123 Constructor |
|
124 </p><dl> |
|
125 <dt><i>parent</i></dt> |
|
126 <dd> |
|
127 reference to the parent widget (QWidget) |
|
128 </dd> |
|
129 </dl><a NAME="SqlBrowserWidget.__deleteRow" ID="SqlBrowserWidget.__deleteRow"></a> |
|
130 <h4>SqlBrowserWidget.__deleteRow</h4> |
|
131 <b>__deleteRow</b>(<i></i>) |
|
132 <p> |
|
133 Private slot to delete a row from the database table. |
|
134 </p><a NAME="SqlBrowserWidget.__insertRow" ID="SqlBrowserWidget.__insertRow"></a> |
|
135 <h4>SqlBrowserWidget.__insertRow</h4> |
|
136 <b>__insertRow</b>(<i></i>) |
|
137 <p> |
|
138 Private slot to insert a row into the database table. |
|
139 </p><a NAME="SqlBrowserWidget.addConnection" ID="SqlBrowserWidget.addConnection"></a> |
|
140 <h4>SqlBrowserWidget.addConnection</h4> |
|
141 <b>addConnection</b>(<i>driver, dbName, user, password, host, port</i>) |
|
142 <p> |
|
143 Public method to add a database connection. |
|
144 </p><dl> |
|
145 <dt><i>driver</i></dt> |
|
146 <dd> |
|
147 name of the Qt database driver (string) |
|
148 </dd><dt><i>dbName</i></dt> |
|
149 <dd> |
|
150 name of the database (string) |
|
151 </dd><dt><i>user</i></dt> |
|
152 <dd> |
|
153 user name (string) |
|
154 </dd><dt><i>password</i></dt> |
|
155 <dd> |
|
156 password (string) |
|
157 </dd><dt><i>host</i></dt> |
|
158 <dd> |
|
159 host name (string) |
|
160 </dd><dt><i>port</i></dt> |
|
161 <dd> |
|
162 port number (integer) |
|
163 </dd> |
|
164 </dl><dl> |
|
165 <dt>Returns:</dt> |
|
166 <dd> |
|
167 SQL error object (QSqlError) |
|
168 </dd> |
|
169 </dl><a NAME="SqlBrowserWidget.addConnectionByDialog" ID="SqlBrowserWidget.addConnectionByDialog"></a> |
|
170 <h4>SqlBrowserWidget.addConnectionByDialog</h4> |
|
171 <b>addConnectionByDialog</b>(<i></i>) |
|
172 <p> |
|
173 Public slot to add a database connection via an input dialog. |
|
174 </p><a NAME="SqlBrowserWidget.executeQuery" ID="SqlBrowserWidget.executeQuery"></a> |
|
175 <h4>SqlBrowserWidget.executeQuery</h4> |
|
176 <b>executeQuery</b>(<i></i>) |
|
177 <p> |
|
178 Public slot to execute the entered query. |
|
179 </p><a NAME="SqlBrowserWidget.on_clearButton_clicked" ID="SqlBrowserWidget.on_clearButton_clicked"></a> |
|
180 <h4>SqlBrowserWidget.on_clearButton_clicked</h4> |
|
181 <b>on_clearButton_clicked</b>(<i></i>) |
|
182 <p> |
|
183 Private slot to clear the SQL entry widget. |
|
184 </p><a NAME="SqlBrowserWidget.on_connections_cleared" ID="SqlBrowserWidget.on_connections_cleared"></a> |
|
185 <h4>SqlBrowserWidget.on_connections_cleared</h4> |
|
186 <b>on_connections_cleared</b>(<i></i>) |
|
187 <p> |
|
188 Private slot to clear the table. |
|
189 </p><a NAME="SqlBrowserWidget.on_connections_schemaRequested" ID="SqlBrowserWidget.on_connections_schemaRequested"></a> |
|
190 <h4>SqlBrowserWidget.on_connections_schemaRequested</h4> |
|
191 <b>on_connections_schemaRequested</b>(<i>table</i>) |
|
192 <p> |
|
193 Private slot to show the schema of a table. |
|
194 </p><dl> |
|
195 <dt><i>table</i></dt> |
|
196 <dd> |
|
197 name of the table for which to show the schema (string) |
|
198 </dd> |
|
199 </dl><a NAME="SqlBrowserWidget.on_connections_tableActivated" ID="SqlBrowserWidget.on_connections_tableActivated"></a> |
|
200 <h4>SqlBrowserWidget.on_connections_tableActivated</h4> |
|
201 <b>on_connections_tableActivated</b>(<i>table</i>) |
|
202 <p> |
|
203 Private slot to show the contents of a table. |
|
204 </p><dl> |
|
205 <dt><i>table</i></dt> |
|
206 <dd> |
|
207 name of the table for which to show the contents (string) |
|
208 </dd> |
|
209 </dl><a NAME="SqlBrowserWidget.on_deleteRowAction_triggered" ID="SqlBrowserWidget.on_deleteRowAction_triggered"></a> |
|
210 <h4>SqlBrowserWidget.on_deleteRowAction_triggered</h4> |
|
211 <b>on_deleteRowAction_triggered</b>(<i></i>) |
|
212 <p> |
|
213 Private slot handling the action to delete a row. |
|
214 </p><a NAME="SqlBrowserWidget.on_executeButton_clicked" ID="SqlBrowserWidget.on_executeButton_clicked"></a> |
|
215 <h4>SqlBrowserWidget.on_executeButton_clicked</h4> |
|
216 <b>on_executeButton_clicked</b>(<i></i>) |
|
217 <p> |
|
218 Private slot to execute the entered SQL query. |
|
219 </p><a NAME="SqlBrowserWidget.on_insertRowAction_triggered" ID="SqlBrowserWidget.on_insertRowAction_triggered"></a> |
|
220 <h4>SqlBrowserWidget.on_insertRowAction_triggered</h4> |
|
221 <b>on_insertRowAction_triggered</b>(<i></i>) |
|
222 <p> |
|
223 Private slot handling the action to insert a new row. |
|
224 </p><a NAME="SqlBrowserWidget.showSchema" ID="SqlBrowserWidget.showSchema"></a> |
|
225 <h4>SqlBrowserWidget.showSchema</h4> |
|
226 <b>showSchema</b>(<i>table</i>) |
|
227 <p> |
|
228 Public slot to show the schema of a table. |
|
229 </p><dl> |
|
230 <dt><i>table</i></dt> |
|
231 <dd> |
|
232 name of the table to be shown (string) |
|
233 </dd> |
|
234 </dl><a NAME="SqlBrowserWidget.showTable" ID="SqlBrowserWidget.showTable"></a> |
|
235 <h4>SqlBrowserWidget.showTable</h4> |
|
236 <b>showTable</b>(<i>table</i>) |
|
237 <p> |
|
238 Public slot to show the contents of a table. |
|
239 </p><dl> |
|
240 <dt><i>table</i></dt> |
|
241 <dd> |
|
242 name of the table to be shown (string) |
|
243 </dd> |
|
244 </dl><a NAME="SqlBrowserWidget.updateActions" ID="SqlBrowserWidget.updateActions"></a> |
|
245 <h4>SqlBrowserWidget.updateActions</h4> |
|
246 <b>updateActions</b>(<i></i>) |
|
247 <p> |
|
248 Public slot to update the actions. |
|
249 </p> |
|
250 <div align="right"><a href="#top">Up</a></div> |
|
251 <hr /> |
|
252 </body></html> |