|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' |
|
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> |
|
4 <html><head> |
|
5 <title>eric4.SqlBrowser.SqlBrowserWidget</title> |
|
6 <style> |
|
7 body { |
|
8 background:white; |
|
9 margin: 0em 1em 10em 1em; |
|
10 color: black; |
|
11 } |
|
12 |
|
13 h1 { color: white; background: #4FA4FF; } |
|
14 h2 { color: white; background: #4FA4FF; } |
|
15 h3 { color: white; background: #00557F; } |
|
16 h4 { color: white; background: #00557F; } |
|
17 |
|
18 a { color: #AA5500; } |
|
19 |
|
20 </style> |
|
21 </head> |
|
22 <body><a NAME="top" ID="top"></a> |
|
23 <h1>eric4.SqlBrowser.SqlBrowserWidget</h1> |
|
24 <p> |
|
25 Module implementing the SQL Browser widget. |
|
26 </p> |
|
27 <h3>Global Attributes</h3> |
|
28 <table> |
|
29 <tr><td>None</td></tr> |
|
30 </table> |
|
31 <h3>Classes</h3> |
|
32 <table> |
|
33 <tr> |
|
34 <td><a href="#SqlBrowserWidget">SqlBrowserWidget</a></td> |
|
35 <td>Class implementing the SQL Browser widget.</td> |
|
36 </tr> |
|
37 </table> |
|
38 <h3>Functions</h3> |
|
39 <table> |
|
40 <tr><td>None</td></tr> |
|
41 </table> |
|
42 <hr /><hr /> |
|
43 <a NAME="SqlBrowserWidget" ID="SqlBrowserWidget"></a> |
|
44 <h2>SqlBrowserWidget</h2> |
|
45 <p> |
|
46 Class implementing the SQL Browser widget. |
|
47 </p><h4>Signals</h4> |
|
48 <dl> |
|
49 <dt>statusMessage(string)</dt> |
|
50 <dd> |
|
51 emitted to show a status message |
|
52 </dd> |
|
53 </dl> |
|
54 <h3>Derived from</h3> |
|
55 QWidget, Ui_SqlBrowserWidget |
|
56 <h3>Class Attributes</h3> |
|
57 <table> |
|
58 <tr><td>cCount</td></tr> |
|
59 </table> |
|
60 <h3>Methods</h3> |
|
61 <table> |
|
62 <tr> |
|
63 <td><a href="#SqlBrowserWidget.__init__">SqlBrowserWidget</a></td> |
|
64 <td>Constructor</td> |
|
65 </tr><tr> |
|
66 <td><a href="#SqlBrowserWidget.__deleteRow">__deleteRow</a></td> |
|
67 <td>Privat slot to delete a row from the database table.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#SqlBrowserWidget.__insertRow">__insertRow</a></td> |
|
70 <td>Privat slot to insert a row into the database table.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#SqlBrowserWidget.addConnection">addConnection</a></td> |
|
73 <td>Public method to add a database connection.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#SqlBrowserWidget.addConnectionByDialog">addConnectionByDialog</a></td> |
|
76 <td>Public slot to add a database connection via an input dialog.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#SqlBrowserWidget.executeQuery">executeQuery</a></td> |
|
79 <td>Public slot to execute the entered query.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#SqlBrowserWidget.on_clearButton_clicked">on_clearButton_clicked</a></td> |
|
82 <td>Private slot to clear the SQL entry widget.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#SqlBrowserWidget.on_connections_cleared">on_connections_cleared</a></td> |
|
85 <td>Private slot to clear the table.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#SqlBrowserWidget.on_connections_schemaRequested">on_connections_schemaRequested</a></td> |
|
88 <td>Private slot to show the schema of a table.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#SqlBrowserWidget.on_connections_tableActivated">on_connections_tableActivated</a></td> |
|
91 <td>Private slot to show the contents of a table.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#SqlBrowserWidget.on_deleteRowAction_triggered">on_deleteRowAction_triggered</a></td> |
|
94 <td>Private slot handling the action to delete a row.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#SqlBrowserWidget.on_executeButton_clicked">on_executeButton_clicked</a></td> |
|
97 <td>Private slot to execute the entered SQL query.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#SqlBrowserWidget.on_insertRowAction_triggered">on_insertRowAction_triggered</a></td> |
|
100 <td>Private slot handling the action to insert a new row.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#SqlBrowserWidget.showSchema">showSchema</a></td> |
|
103 <td>Public slot to show the schema of a table.</td> |
|
104 </tr><tr> |
|
105 <td><a href="#SqlBrowserWidget.showTable">showTable</a></td> |
|
106 <td>Public slot to show the contents of a table.</td> |
|
107 </tr><tr> |
|
108 <td><a href="#SqlBrowserWidget.updateActions">updateActions</a></td> |
|
109 <td>Public slot to update the actions.</td> |
|
110 </tr> |
|
111 </table> |
|
112 <a NAME="SqlBrowserWidget.__init__" ID="SqlBrowserWidget.__init__"></a> |
|
113 <h4>SqlBrowserWidget (Constructor)</h4> |
|
114 <b>SqlBrowserWidget</b>(<i>parent = None</i>) |
|
115 <p> |
|
116 Constructor |
|
117 </p><dl> |
|
118 <dt><i>parent</i></dt> |
|
119 <dd> |
|
120 reference to the parent widget (QWidget) |
|
121 </dd> |
|
122 </dl><a NAME="SqlBrowserWidget.__deleteRow" ID="SqlBrowserWidget.__deleteRow"></a> |
|
123 <h4>SqlBrowserWidget.__deleteRow</h4> |
|
124 <b>__deleteRow</b>(<i></i>) |
|
125 <p> |
|
126 Privat slot to delete a row from the database table. |
|
127 </p><a NAME="SqlBrowserWidget.__insertRow" ID="SqlBrowserWidget.__insertRow"></a> |
|
128 <h4>SqlBrowserWidget.__insertRow</h4> |
|
129 <b>__insertRow</b>(<i></i>) |
|
130 <p> |
|
131 Privat slot to insert a row into the database table. |
|
132 </p><a NAME="SqlBrowserWidget.addConnection" ID="SqlBrowserWidget.addConnection"></a> |
|
133 <h4>SqlBrowserWidget.addConnection</h4> |
|
134 <b>addConnection</b>(<i>driver, dbName, user, password, host, port</i>) |
|
135 <p> |
|
136 Public method to add a database connection. |
|
137 </p><dl> |
|
138 <dt><i>driver</i></dt> |
|
139 <dd> |
|
140 name of the Qt database driver (string) |
|
141 </dd><dt><i>dbName</i></dt> |
|
142 <dd> |
|
143 name of the database (string) |
|
144 </dd><dt><i>user</i></dt> |
|
145 <dd> |
|
146 user name (string) |
|
147 </dd><dt><i>password</i></dt> |
|
148 <dd> |
|
149 password (string) |
|
150 </dd><dt><i>host</i></dt> |
|
151 <dd> |
|
152 host name (string) |
|
153 </dd><dt><i>port</i></dt> |
|
154 <dd> |
|
155 port number (integer) |
|
156 </dd> |
|
157 </dl><a NAME="SqlBrowserWidget.addConnectionByDialog" ID="SqlBrowserWidget.addConnectionByDialog"></a> |
|
158 <h4>SqlBrowserWidget.addConnectionByDialog</h4> |
|
159 <b>addConnectionByDialog</b>(<i></i>) |
|
160 <p> |
|
161 Public slot to add a database connection via an input dialog. |
|
162 </p><a NAME="SqlBrowserWidget.executeQuery" ID="SqlBrowserWidget.executeQuery"></a> |
|
163 <h4>SqlBrowserWidget.executeQuery</h4> |
|
164 <b>executeQuery</b>(<i></i>) |
|
165 <p> |
|
166 Public slot to execute the entered query. |
|
167 </p><a NAME="SqlBrowserWidget.on_clearButton_clicked" ID="SqlBrowserWidget.on_clearButton_clicked"></a> |
|
168 <h4>SqlBrowserWidget.on_clearButton_clicked</h4> |
|
169 <b>on_clearButton_clicked</b>(<i></i>) |
|
170 <p> |
|
171 Private slot to clear the SQL entry widget. |
|
172 </p><a NAME="SqlBrowserWidget.on_connections_cleared" ID="SqlBrowserWidget.on_connections_cleared"></a> |
|
173 <h4>SqlBrowserWidget.on_connections_cleared</h4> |
|
174 <b>on_connections_cleared</b>(<i></i>) |
|
175 <p> |
|
176 Private slot to clear the table. |
|
177 </p><a NAME="SqlBrowserWidget.on_connections_schemaRequested" ID="SqlBrowserWidget.on_connections_schemaRequested"></a> |
|
178 <h4>SqlBrowserWidget.on_connections_schemaRequested</h4> |
|
179 <b>on_connections_schemaRequested</b>(<i>table</i>) |
|
180 <p> |
|
181 Private slot to show the schema of a table. |
|
182 </p><dl> |
|
183 <dt><i>table</i></dt> |
|
184 <dd> |
|
185 name of the table for which to show the schema (string) |
|
186 </dd> |
|
187 </dl><a NAME="SqlBrowserWidget.on_connections_tableActivated" ID="SqlBrowserWidget.on_connections_tableActivated"></a> |
|
188 <h4>SqlBrowserWidget.on_connections_tableActivated</h4> |
|
189 <b>on_connections_tableActivated</b>(<i>table</i>) |
|
190 <p> |
|
191 Private slot to show the contents of a table. |
|
192 </p><dl> |
|
193 <dt><i>table</i></dt> |
|
194 <dd> |
|
195 name of the table for which to show the contents (string) |
|
196 </dd> |
|
197 </dl><a NAME="SqlBrowserWidget.on_deleteRowAction_triggered" ID="SqlBrowserWidget.on_deleteRowAction_triggered"></a> |
|
198 <h4>SqlBrowserWidget.on_deleteRowAction_triggered</h4> |
|
199 <b>on_deleteRowAction_triggered</b>(<i></i>) |
|
200 <p> |
|
201 Private slot handling the action to delete a row. |
|
202 </p><a NAME="SqlBrowserWidget.on_executeButton_clicked" ID="SqlBrowserWidget.on_executeButton_clicked"></a> |
|
203 <h4>SqlBrowserWidget.on_executeButton_clicked</h4> |
|
204 <b>on_executeButton_clicked</b>(<i></i>) |
|
205 <p> |
|
206 Private slot to execute the entered SQL query. |
|
207 </p><a NAME="SqlBrowserWidget.on_insertRowAction_triggered" ID="SqlBrowserWidget.on_insertRowAction_triggered"></a> |
|
208 <h4>SqlBrowserWidget.on_insertRowAction_triggered</h4> |
|
209 <b>on_insertRowAction_triggered</b>(<i></i>) |
|
210 <p> |
|
211 Private slot handling the action to insert a new row. |
|
212 </p><a NAME="SqlBrowserWidget.showSchema" ID="SqlBrowserWidget.showSchema"></a> |
|
213 <h4>SqlBrowserWidget.showSchema</h4> |
|
214 <b>showSchema</b>(<i>table</i>) |
|
215 <p> |
|
216 Public slot to show the schema of a table. |
|
217 </p><dl> |
|
218 <dt><i>table</i></dt> |
|
219 <dd> |
|
220 name of the table to be shown (string) |
|
221 </dd> |
|
222 </dl><a NAME="SqlBrowserWidget.showTable" ID="SqlBrowserWidget.showTable"></a> |
|
223 <h4>SqlBrowserWidget.showTable</h4> |
|
224 <b>showTable</b>(<i>table</i>) |
|
225 <p> |
|
226 Public slot to show the contents of a table. |
|
227 </p><dl> |
|
228 <dt><i>table</i></dt> |
|
229 <dd> |
|
230 name of the table to be shown (string) |
|
231 </dd> |
|
232 </dl><a NAME="SqlBrowserWidget.updateActions" ID="SqlBrowserWidget.updateActions"></a> |
|
233 <h4>SqlBrowserWidget.updateActions</h4> |
|
234 <b>updateActions</b>(<i></i>) |
|
235 <p> |
|
236 Public slot to update the actions. |
|
237 </p> |
|
238 <div align="right"><a href="#top">Up</a></div> |
|
239 <hr /> |
|
240 </body></html> |