|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.SqlBrowser.SqlConnectionWidget</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.SqlBrowser.SqlConnectionWidget</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing a widget showing the SQL connections. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 |
|
23 <tr> |
|
24 <td><a href="#SqlConnectionWidget">SqlConnectionWidget</a></td> |
|
25 <td>Class implementing a widget showing the SQL connections.</td> |
|
26 </tr> |
|
27 </table> |
|
28 <h3>Functions</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <hr /> |
|
34 <hr /> |
|
35 <a NAME="SqlConnectionWidget" ID="SqlConnectionWidget"></a> |
|
36 <h2>SqlConnectionWidget</h2> |
|
37 |
|
38 <p> |
|
39 Class implementing a widget showing the SQL connections. |
|
40 </p> |
|
41 <h3>Signals</h3> |
|
42 <dl> |
|
43 |
|
44 <dt>cleared()</dt> |
|
45 <dd> |
|
46 emitted after the connection tree has been cleared |
|
47 </dd> |
|
48 <dt>schemaRequested(str)</dt> |
|
49 <dd> |
|
50 emitted when the schema display is requested |
|
51 </dd> |
|
52 <dt>tableActivated(str)</dt> |
|
53 <dd> |
|
54 emitted after the entry for a table has been |
|
55 activated |
|
56 </dd> |
|
57 </dl> |
|
58 <h3>Derived from</h3> |
|
59 QWidget |
|
60 <h3>Class Attributes</h3> |
|
61 |
|
62 <table> |
|
63 <tr><td>None</td></tr> |
|
64 </table> |
|
65 <h3>Class Methods</h3> |
|
66 |
|
67 <table> |
|
68 <tr><td>None</td></tr> |
|
69 </table> |
|
70 <h3>Methods</h3> |
|
71 |
|
72 <table> |
|
73 |
|
74 <tr> |
|
75 <td><a href="#SqlConnectionWidget.__init__">SqlConnectionWidget</a></td> |
|
76 <td>Constructor</td> |
|
77 </tr> |
|
78 <tr> |
|
79 <td><a href="#SqlConnectionWidget.__currentItemChanged">__currentItemChanged</a></td> |
|
80 <td>Private slot handling a change of the current item.</td> |
|
81 </tr> |
|
82 <tr> |
|
83 <td><a href="#SqlConnectionWidget.__dbCaption">__dbCaption</a></td> |
|
84 <td>Private method to assemble a string for the caption.</td> |
|
85 </tr> |
|
86 <tr> |
|
87 <td><a href="#SqlConnectionWidget.__itemActivated">__itemActivated</a></td> |
|
88 <td>Private slot handling the activation of an item.</td> |
|
89 </tr> |
|
90 <tr> |
|
91 <td><a href="#SqlConnectionWidget.__setActive">__setActive</a></td> |
|
92 <td>Private slot to set an item to active.</td> |
|
93 </tr> |
|
94 <tr> |
|
95 <td><a href="#SqlConnectionWidget.__setBold">__setBold</a></td> |
|
96 <td>Private slot to set the font to bold.</td> |
|
97 </tr> |
|
98 <tr> |
|
99 <td><a href="#SqlConnectionWidget.currentDatabase">currentDatabase</a></td> |
|
100 <td>Public method to get the current database.</td> |
|
101 </tr> |
|
102 <tr> |
|
103 <td><a href="#SqlConnectionWidget.refresh">refresh</a></td> |
|
104 <td>Public slot to refresh the connection tree.</td> |
|
105 </tr> |
|
106 <tr> |
|
107 <td><a href="#SqlConnectionWidget.showSchema">showSchema</a></td> |
|
108 <td>Public slot to show schema data of a database.</td> |
|
109 </tr> |
|
110 </table> |
|
111 <h3>Static Methods</h3> |
|
112 |
|
113 <table> |
|
114 <tr><td>None</td></tr> |
|
115 </table> |
|
116 |
|
117 <a NAME="SqlConnectionWidget.__init__" ID="SqlConnectionWidget.__init__"></a> |
|
118 <h4>SqlConnectionWidget (Constructor)</h4> |
|
119 <b>SqlConnectionWidget</b>(<i>parent=None</i>) |
|
120 |
|
121 <p> |
|
122 Constructor |
|
123 </p> |
|
124 <dl> |
|
125 |
|
126 <dt><i>parent</i></dt> |
|
127 <dd> |
|
128 reference to the parent widget (QWidget) |
|
129 </dd> |
|
130 </dl> |
|
131 <a NAME="SqlConnectionWidget.__currentItemChanged" ID="SqlConnectionWidget.__currentItemChanged"></a> |
|
132 <h4>SqlConnectionWidget.__currentItemChanged</h4> |
|
133 <b>__currentItemChanged</b>(<i>current, previous</i>) |
|
134 |
|
135 <p> |
|
136 Private slot handling a change of the current item. |
|
137 </p> |
|
138 <dl> |
|
139 |
|
140 <dt><i>current</i></dt> |
|
141 <dd> |
|
142 reference to the new current item (QTreeWidgetItem) |
|
143 </dd> |
|
144 <dt><i>previous</i></dt> |
|
145 <dd> |
|
146 reference to the previous current item |
|
147 (QTreeWidgetItem) |
|
148 </dd> |
|
149 </dl> |
|
150 <a NAME="SqlConnectionWidget.__dbCaption" ID="SqlConnectionWidget.__dbCaption"></a> |
|
151 <h4>SqlConnectionWidget.__dbCaption</h4> |
|
152 <b>__dbCaption</b>(<i>db</i>) |
|
153 |
|
154 <p> |
|
155 Private method to assemble a string for the caption. |
|
156 </p> |
|
157 <dl> |
|
158 |
|
159 <dt><i>db</i></dt> |
|
160 <dd> |
|
161 reference to the database object (QSqlDatabase) |
|
162 </dd> |
|
163 </dl> |
|
164 <dl> |
|
165 <dt>Return:</dt> |
|
166 <dd> |
|
167 caption string (string) |
|
168 </dd> |
|
169 </dl> |
|
170 <a NAME="SqlConnectionWidget.__itemActivated" ID="SqlConnectionWidget.__itemActivated"></a> |
|
171 <h4>SqlConnectionWidget.__itemActivated</h4> |
|
172 <b>__itemActivated</b>(<i>itm, column</i>) |
|
173 |
|
174 <p> |
|
175 Private slot handling the activation of an item. |
|
176 </p> |
|
177 <dl> |
|
178 |
|
179 <dt><i>itm</i></dt> |
|
180 <dd> |
|
181 reference to the item (QTreeWidgetItem) |
|
182 </dd> |
|
183 <dt><i>column</i></dt> |
|
184 <dd> |
|
185 column that was activated (integer) |
|
186 </dd> |
|
187 </dl> |
|
188 <a NAME="SqlConnectionWidget.__setActive" ID="SqlConnectionWidget.__setActive"></a> |
|
189 <h4>SqlConnectionWidget.__setActive</h4> |
|
190 <b>__setActive</b>(<i>itm</i>) |
|
191 |
|
192 <p> |
|
193 Private slot to set an item to active. |
|
194 </p> |
|
195 <dl> |
|
196 |
|
197 <dt><i>itm</i></dt> |
|
198 <dd> |
|
199 reference to the item to set as the active item |
|
200 (QTreeWidgetItem) |
|
201 </dd> |
|
202 </dl> |
|
203 <a NAME="SqlConnectionWidget.__setBold" ID="SqlConnectionWidget.__setBold"></a> |
|
204 <h4>SqlConnectionWidget.__setBold</h4> |
|
205 <b>__setBold</b>(<i>itm, bold</i>) |
|
206 |
|
207 <p> |
|
208 Private slot to set the font to bold. |
|
209 </p> |
|
210 <dl> |
|
211 |
|
212 <dt><i>itm</i></dt> |
|
213 <dd> |
|
214 reference to the item to be changed (QTreeWidgetItem) |
|
215 </dd> |
|
216 <dt><i>bold</i></dt> |
|
217 <dd> |
|
218 flag indicating bold (boolean) |
|
219 </dd> |
|
220 </dl> |
|
221 <a NAME="SqlConnectionWidget.currentDatabase" ID="SqlConnectionWidget.currentDatabase"></a> |
|
222 <h4>SqlConnectionWidget.currentDatabase</h4> |
|
223 <b>currentDatabase</b>(<i></i>) |
|
224 |
|
225 <p> |
|
226 Public method to get the current database. |
|
227 </p> |
|
228 <dl> |
|
229 <dt>Return:</dt> |
|
230 <dd> |
|
231 reference to the current database (QSqlDatabase) |
|
232 </dd> |
|
233 </dl> |
|
234 <a NAME="SqlConnectionWidget.refresh" ID="SqlConnectionWidget.refresh"></a> |
|
235 <h4>SqlConnectionWidget.refresh</h4> |
|
236 <b>refresh</b>(<i></i>) |
|
237 |
|
238 <p> |
|
239 Public slot to refresh the connection tree. |
|
240 </p> |
|
241 <a NAME="SqlConnectionWidget.showSchema" ID="SqlConnectionWidget.showSchema"></a> |
|
242 <h4>SqlConnectionWidget.showSchema</h4> |
|
243 <b>showSchema</b>(<i></i>) |
|
244 |
|
245 <p> |
|
246 Public slot to show schema data of a database. |
|
247 </p> |
|
248 <div align="right"><a href="#top">Up</a></div> |
|
249 <hr /> |
|
250 </body></html> |